20 this.application = application ??
throw new ArgumentNullException(nameof(application));
27 GitHubClient CreateBaseClient() =>
new GitHubClient(
new ProductHeaderValue(application.VersionPrefix, application.Version.ToString()));
30 public IGitHubClient CreateClient() => CreateBaseClient();
35 if (accessToken == null)
36 throw new ArgumentNullException(nameof(accessToken));
37 var result = CreateBaseClient();
38 result.Credentials =
new Credentials(accessToken);
IGitHubClient CreateClient(string accessToken)
Create a client with authentication using a personal access token
Configures the ASP.NET Core web application
Use server authentication
GitHubClientFactory(IApplication application)
Construct a GitHubClientFactory
For creating IGitHubClients
readonly IApplication application
The IApplication for the GitHubClientFactory