public static IServiceCollection AddLykkeTemplateWebClient(this IServiceCollection services, LykkeTemplateRestClientConfig config) { services.AddSingleton(config); services.AddSingleton <ISamplesRepository, SamplesRepositoryClient>(); return(services); }
public static IServiceCollection AddLykkeTemplateWebClient(this IServiceCollection services, Action <LykkeTemplateRestClientConfig> configurator) { var config = new LykkeTemplateRestClientConfig(); configurator.Invoke(config); return(AddLykkeTemplateWebClient(services, config)); }
public SamplesRepositoryClient(LykkeTemplateRestClientConfig config) { _restClient = new RestClient(config); }