Files
octokit.net/Octokit.Tests.Integration/Helpers/CopilotUserLicenseContext.cs
Dylan Morley a2a4f09c24 [FEAT]: Adding Copilot for Business support (#2826)
* initial tests and implementation of Copilot for Business client API

* updated billing settings documentation

* renames and refactors - clarity and simplified

* using context to ensure license clean up

* extra documentation and used ApiOptions instead of custom class

* implemented observable clients

* Fixing convention issues

* renaming for clarity

---------

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
2024-01-02 15:57:14 -06:00

25 lines
662 B
C#

using System;
namespace Octokit.Tests.Integration.Helpers
{
internal sealed class CopilotUserLicenseContext : IDisposable
{
internal CopilotUserLicenseContext(IConnection connection, string organization, string user)
{
_connection = connection;
Organization = organization;
UserLogin = user;
}
private readonly IConnection _connection;
internal string Organization { get; }
internal string UserLogin { get; private set; }
public void Dispose()
{
CopilotHelper.RemoveUserLicense(_connection, Organization, UserLogin);
}
}
}