public static IServiceCollection AddGitHubAuthenticator(this IServiceCollection services,
string organization, string repository, string baseAddress = "https://api.github.com/")
{
services.AddSingleton(new GitHubLfsAuthenticatorOptions
{
BaseAddress = new Uri(baseAddress),
Organization = organization,
Repository = repository
});
services.AddSingleton<GitHubLfsAuthenticator>();
services.AddSingleton<ILfsAuthenticator>(static x => x.GetRequiredService<GitHubLfsAuthenticator>());
return services;
}
public static IServiceCollection AddGitHubAuthenticator(this IServiceCollection services,
string organization, string repository, string baseAddress = "https://api.github.com/")
{
services.AddSingleton(new GitHubLfsAuthenticatorOptions
{
BaseAddress = new Uri(baseAddress),
Organization = organization,
Repository = repository
});
services.AddSingleton<GitHubLfsAuthenticator>();
services.AddSingleton<ILfsAuthenticator>(static x => x.GetRequiredService<GitHubLfsAuthenticator>());
return services;
}