public static IServiceCollection AddKaikoClient( this IServiceCollection services, KaikoApiConfiguration apiConfiguration) { var options = Options.Create(apiConfiguration); services.AddSingleton(options); AddCommonDependencies(services); return(services); }
public KaikoClientTestsBase() { var configuration = new KaikoApiConfiguration { ApiKey = Secrets.KaikoApiKey }; var serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton(configuration); serviceCollection.AddKaikoClient(configuration); ServiceProvider = serviceCollection.BuildServiceProvider(); }