Beispiel #1
0
        public static IServiceCollection AddLykkeTemplateWebClient(this IServiceCollection services,
                                                                   LykkeTemplateRestClientConfig config)
        {
            services.AddSingleton(config);
            services.AddSingleton <ISamplesRepository, SamplesRepositoryClient>();

            return(services);
        }
Beispiel #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);
 }