mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
Co-authored-by: Lehonti Ramos <john@doe> Co-authored-by: Keegan Campbell <me@kfcampbell.com>
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Octokit.Reactive;
|
|
|
|
namespace Octokit.Tests.Integration.Helpers
|
|
{
|
|
internal sealed class RepositoryContext : IDisposable
|
|
{
|
|
internal RepositoryContext(IConnection connection, Repository repo)
|
|
{
|
|
_connection = connection;
|
|
Repository = repo;
|
|
RepositoryId = repo.Id;
|
|
RepositoryOwner = repo.Owner.Login;
|
|
RepositoryName = repo.Name;
|
|
RepositoryDefaultBranch = repo.DefaultBranch;
|
|
}
|
|
|
|
private readonly IConnection _connection;
|
|
internal long RepositoryId { get; private set; }
|
|
internal string RepositoryOwner { get; private set; }
|
|
internal string RepositoryName { get; private set; }
|
|
internal string RepositoryDefaultBranch { get; private set; }
|
|
|
|
internal Repository Repository { get; private set; }
|
|
|
|
public void Dispose()
|
|
{
|
|
Helper.DeleteRepo(_connection, Repository);
|
|
}
|
|
}
|
|
}
|