Пример #1
0
        public static IServiceCollection AddLykkeTemplateWebClient(this IServiceCollection services,
                                                                   LykkeTemplateRestClientConfig config)
        {
            services.AddSingleton(config);
            services.AddSingleton <ISamplesRepository, SamplesRepositoryClient>();

            return(services);
        }
Пример #2
0
        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);
 }