21 this.assemblyInformationProvider = assemblyInformationProvider ??
throw new ArgumentNullException(nameof(assemblyInformationProvider));
28 GitHubClient CreateBaseClient() =>
new GitHubClient(
new ProductHeaderValue(assemblyInformationProvider.VersionPrefix, assemblyInformationProvider.Version.ToString()));
31 public IGitHubClient CreateClient() => CreateBaseClient();
36 if (accessToken == null)
37 throw new ArgumentNullException(nameof(accessToken));
38 var result = CreateBaseClient();
39 result.Credentials =
new Credentials(accessToken);
IGitHubClient CreateClient(string accessToken)
Create a client with authentication using a personal access token
Use server authentication
GitHubClientFactory(IAssemblyInformationProvider assemblyInformationProvider)
Construct a GitHubClientFactory
For creating IGitHubClients
readonly IAssemblyInformationProvider assemblyInformationProvider
The IAssemblyInformationProvider for the GitHubClientFactory