mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
Co-authored-by: Lehonti Ramos <john@doe> Co-authored-by: Keegan Campbell <me@kfcampbell.com>
36 lines
875 B
C#
36 lines
875 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Octokit.Tests.Integration.Helpers
|
|
{
|
|
public class GpgKeyContext : IDisposable
|
|
{
|
|
internal GpgKeyContext(IConnection connection, GpgKey key)
|
|
{
|
|
_connection = connection;
|
|
Key = key;
|
|
GpgKeyId = key.Id;
|
|
KeyId = key.KeyId;
|
|
PublicKeyData = key.PublicKey;
|
|
}
|
|
|
|
private readonly IConnection _connection;
|
|
internal int GpgKeyId { get; set; }
|
|
internal string KeyId { get; set; }
|
|
internal string PublicKeyData { get; set; }
|
|
|
|
internal GpgKey Key { get; set; }
|
|
|
|
public void Dispose()
|
|
{
|
|
if (Key != null)
|
|
{
|
|
Helper.DeleteGpgKey(_connection, Key);
|
|
}
|
|
}
|
|
}
|
|
}
|