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

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