Files
octokit.net/Octokit.Tests.Integration/Helpers/PublicKeyContext.cs
Lehonti Ramos d46527d143 Added readonly to fields that are never modified (#2759)
Co-authored-by: Lehonti Ramos <john@doe>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2023-08-11 09:53:51 -07:00

33 lines
846 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Octokit.Tests.Integration.Helpers
{
internal sealed class PublicKeyContext : IDisposable
{
internal PublicKeyContext(IConnection connection, PublicKey key)
{
_connection = connection;
Key = key;
KeyId = key.Id;
KeyTitle = key.Title;
KeyData = key.Key;
}
private readonly IConnection _connection;
internal int KeyId { get; private set; }
internal string KeyTitle { get; private set; }
internal string KeyData { get; private set; }
internal PublicKey Key { get; private set; }
public void Dispose()
{
Helper.DeleteKey(_connection, Key);
}
}
}