public FileOcelotConfigurationCreator(
     IOptions <FileConfiguration> options,
     IConfigurationValidator configurationValidator,
     IOcelotLoggerFactory loggerFactory,
     IClaimsToThingCreator claimsToThingCreator,
     IAuthenticationOptionsCreator authOptionsCreator,
     IUpstreamTemplatePatternCreator upstreamTemplatePatternCreator,
     IRequestIdKeyCreator requestIdKeyCreator,
     IServiceProviderConfigurationCreator serviceProviderConfigCreator,
     IQoSOptionsCreator qosOptionsCreator,
     IReRouteOptionsCreator fileReRouteOptionsCreator,
     IRateLimitOptionsCreator rateLimitOptionsCreator,
     IRegionCreator regionCreator,
     IHttpHandlerOptionsCreator httpHandlerOptionsCreator,
     IAdministrationPath adminPath
     )
 {
     _adminPath                      = adminPath;
     _regionCreator                  = regionCreator;
     _rateLimitOptionsCreator        = rateLimitOptionsCreator;
     _requestIdKeyCreator            = requestIdKeyCreator;
     _upstreamTemplatePatternCreator = upstreamTemplatePatternCreator;
     _authOptionsCreator             = authOptionsCreator;
     _options = options;
     _configurationValidator = configurationValidator;
     _logger = loggerFactory.CreateLogger <FileOcelotConfigurationCreator>();
     _claimsToThingCreator         = claimsToThingCreator;
     _serviceProviderConfigCreator = serviceProviderConfigCreator;
     _qosOptionsCreator            = qosOptionsCreator;
     _fileReRouteOptionsCreator    = fileReRouteOptionsCreator;
     _httpHandlerOptionsCreator    = httpHandlerOptionsCreator;
 }
 public FileInternalConfigurationCreator(
     IConfigurationValidator configurationValidator,
     IOcelotLoggerFactory loggerFactory,
     IClaimsToThingCreator claimsToThingCreator,
     IAuthenticationOptionsCreator authOptionsCreator,
     IUpstreamTemplatePatternCreator upstreamTemplatePatternCreator,
     IRequestIdKeyCreator requestIdKeyCreator,
     IServiceProviderConfigurationCreator serviceProviderConfigCreator,
     IQoSOptionsCreator qosOptionsCreator,
     IReRouteOptionsCreator fileReRouteOptionsCreator,
     IRateLimitOptionsCreator rateLimitOptionsCreator,
     IRegionCreator regionCreator,
     IHttpHandlerOptionsCreator httpHandlerOptionsCreator,
     IAdministrationPath adminPath,
     IHeaderFindAndReplaceCreator headerFAndRCreator,
     IDownstreamAddressesCreator downstreamAddressesCreator
     )
 {
     _downstreamAddressesCreator = downstreamAddressesCreator;
     _headerFAndRCreator         = headerFAndRCreator;
     _adminPath                      = adminPath;
     _regionCreator                  = regionCreator;
     _rateLimitOptionsCreator        = rateLimitOptionsCreator;
     _requestIdKeyCreator            = requestIdKeyCreator;
     _upstreamTemplatePatternCreator = upstreamTemplatePatternCreator;
     _authOptionsCreator             = authOptionsCreator;
     _configurationValidator         = configurationValidator;
     _logger = loggerFactory.CreateLogger <FileInternalConfigurationCreator>();
     _claimsToThingCreator         = claimsToThingCreator;
     _serviceProviderConfigCreator = serviceProviderConfigCreator;
     _qosOptionsCreator            = qosOptionsCreator;
     _fileReRouteOptionsCreator    = fileReRouteOptionsCreator;
     _httpHandlerOptionsCreator    = httpHandlerOptionsCreator;
 }
        private static SwaggerServiceDiscoveryProvider CreateProvider(Service service = null)
        {
            IServiceDiscoveryProviderFactory     serviceDiscovery     = Substitute.For <IServiceDiscoveryProviderFactory>();
            IServiceProviderConfigurationCreator configurationCreator = Substitute.For <IServiceProviderConfigurationCreator>();
            IOptionsMonitor <FileConfiguration>  options  = Substitute.For <IOptionsMonitor <FileConfiguration> >();
            IHttpContextAccessor      httpContextAccessor = Substitute.For <IHttpContextAccessor>();
            IOptions <SwaggerOptions> swaggerOptions      = Substitute.For <IOptions <SwaggerOptions> >();

            options.CurrentValue.Returns(new FileConfiguration());

            IServiceDiscoveryProvider serviceProvider = Substitute.For <IServiceDiscoveryProvider>();

            serviceProvider.Get().Returns(new List <Service>()
            {
                service
            });
            var response = new OkResponse <IServiceDiscoveryProvider>(serviceProvider);

            serviceDiscovery.Get(Arg.Any <ServiceProviderConfiguration>(), Arg.Any <DownstreamRoute>()).Returns(response);

            var provider = new SwaggerServiceDiscoveryProvider(
                serviceDiscovery, configurationCreator, options, httpContextAccessor, swaggerOptions);

            return(provider);
        }
 public FileOcelotConfigurationCreator(
     IOptions <FileConfiguration> options,
     IConfigurationValidator configurationValidator,
     ILogger <FileOcelotConfigurationCreator> logger,
     ILoadBalancerFactory loadBalancerFactory,
     ILoadBalancerHouse loadBalancerHouse,
     IQoSProviderFactory qoSProviderFactory,
     IQosProviderHouse qosProviderHouse,
     IClaimsToThingCreator claimsToThingCreator,
     IAuthenticationOptionsCreator authOptionsCreator,
     IUpstreamTemplatePatternCreator upstreamTemplatePatternCreator,
     IRequestIdKeyCreator requestIdKeyCreator,
     IServiceProviderConfigurationCreator serviceProviderConfigCreator,
     IQoSOptionsCreator qosOptionsCreator,
     IReRouteOptionsCreator fileReRouteOptionsCreator,
     IRateLimitOptionsCreator rateLimitOptionsCreator
     )
 {
     _rateLimitOptionsCreator        = rateLimitOptionsCreator;
     _requestIdKeyCreator            = requestIdKeyCreator;
     _upstreamTemplatePatternCreator = upstreamTemplatePatternCreator;
     _authOptionsCreator             = authOptionsCreator;
     _loadBalanceFactory             = loadBalancerFactory;
     _loadBalancerHouse      = loadBalancerHouse;
     _qoSProviderFactory     = qoSProviderFactory;
     _qosProviderHouse       = qosProviderHouse;
     _options                = options;
     _configurationValidator = configurationValidator;
     _logger = logger;
     _claimsToThingCreator         = claimsToThingCreator;
     _serviceProviderConfigCreator = serviceProviderConfigCreator;
     _qosOptionsCreator            = qosOptionsCreator;
     _fileReRouteOptionsCreator    = fileReRouteOptionsCreator;
 }
 public SwaggerServiceDiscoveryProvider(
     IServiceDiscoveryProviderFactory serviceDiscovery,
     IServiceProviderConfigurationCreator configurationCreator,
     IOptionsMonitor <FileConfiguration> options)
 {
     _serviceDiscovery     = serviceDiscovery;
     _configurationCreator = configurationCreator;
     _options = options;
 }
Example #6
0
 public SwaggerServiceDiscoveryProvider(
     IServiceDiscoveryProviderFactory serviceDiscovery,
     IServiceProviderConfigurationCreator configurationCreator,
     IOptionsMonitor <FileConfiguration> options,
     IHttpContextAccessor httpContextAccessor,
     IOptions <SwaggerOptions> swaggerOptions)
 {
     _serviceDiscovery     = serviceDiscovery;
     _configurationCreator = configurationCreator;
     _options             = options;
     _httpContextAccessor = httpContextAccessor;
     _swaggerOptions      = swaggerOptions;
 }
Example #7
0
 public ConfigurationCreator(
     IServiceProviderConfigurationCreator serviceProviderConfigCreator,
     IQoSOptionsCreator qosOptionsCreator,
     IHttpHandlerOptionsCreator httpHandlerOptionsCreator,
     IServiceProvider serviceProvider,
     ILoadBalancerOptionsCreator loadBalancerOptionsCreator
     )
 {
     _adminPath = serviceProvider.GetService <IAdministrationPath>();
     _loadBalancerOptionsCreator   = loadBalancerOptionsCreator;
     _serviceProviderConfigCreator = serviceProviderConfigCreator;
     _qosOptionsCreator            = qosOptionsCreator;
     _httpHandlerOptionsCreator    = httpHandlerOptionsCreator;
 }