3using System.Threading.Tasks;
5using Microsoft.Extensions.Logging;
6using Microsoft.Extensions.Options;
41 IOptions<UpdatesConfiguration> updatesConfigurationOptions)
45 updatesConfiguration = updatesConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(updatesConfigurationOptions));
49 public async ValueTask<IGitHubService>
CreateService(CancellationToken cancellationToken)
54 public async ValueTask<IAuthenticatedGitHubService>
CreateService(
string accessToken, CancellationToken cancellationToken)
57 accessToken ??
throw new ArgumentNullException(nameof(accessToken)),
64 accessString ??
throw new ArgumentNullException(nameof(accessString)),
Configuration for the automatic update system.
async ValueTask< IAuthenticatedGitHubService?> CreateService(string accessString, RepositoryIdentifier repositoryIdentifier, CancellationToken cancellationToken)
Create an IAuthenticatedGitHubService.A ValueTask<TResult> resulting in a new IAuthenticatedGitHubSer...
readonly UpdatesConfiguration updatesConfiguration
The UpdatesConfiguration for the GitHubServiceFactory.
GitHubService CreateServiceImpl(IGitHubClient gitHubClient)
Create a GitHubService.
async ValueTask< IGitHubService > CreateService(CancellationToken cancellationToken)
Create a IGitHubService.A ValueTask<TResult> resulting in a new IGitHubService.
readonly ILoggerFactory loggerFactory
The ILoggerFactory for the GitHubServiceFactory.
readonly IGitHubClientFactory gitHubClientFactory
The IGitHubClientFactory for the GitHubServiceFactory.
GitHubServiceFactory(IGitHubClientFactory gitHubClientFactory, ILoggerFactory loggerFactory, IOptions< UpdatesConfiguration > updatesConfigurationOptions)
Initializes a new instance of the GitHubServiceFactory class.
async ValueTask< IAuthenticatedGitHubService > CreateService(string accessToken, CancellationToken cancellationToken)
Create an IAuthenticatedGitHubService.A ValueTask<TResult> resulting in a new IAuthenticatedGitHubSer...
Service for interacting with the GitHub API. Authenticated or otherwise.
Identifies a repository either by its RepositoryId or Owner and Name.
For creating IGitHubClients.
ValueTask< IGitHubClient?> CreateClientForRepository(string accessString, RepositoryIdentifier repositoryIdentifier, CancellationToken cancellationToken)
Creates a GitHub client that will only be used for a given repositoryIdentifier .
ValueTask< IGitHubClient > CreateClient(CancellationToken cancellationToken)
Create a IGitHubClient client. Low rate limit unless the server's GitHubAccessToken is set to bypass ...
Factory for IGitHubServices.