From 4afdea350d63df00b3393049da3a5977372abd92 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 14 Apr 2023 09:44:29 +0200 Subject: [PATCH] code cleaning --- samples/OcelotBasic/Program.cs | 3 +- samples/OcelotOpenTracing/Program.cs | 1 + src/Ocelot.Provider.Eureka/Eureka.cs | 3 +- .../OcelotBuilderExtensions.cs | 1 + src/Ocelot.Provider.Polly/PollyQoSProvider.cs | 3 +- .../OcelotBuilderExtensions.cs | 5 +-- .../Middleware/AuthenticationMiddleware.cs | 6 ++-- src/Ocelot/Authorization/ClaimsAuthorizer.cs | 2 ++ .../Middleware/AuthorizationMiddleware.cs | 7 ++-- .../Cache/Middleware/OutputCacheMiddleware.cs | 3 +- .../Middleware/ClaimsToClaimsMiddleware.cs | 3 +- .../Configuration/Builder/RouteBuilder.cs | 3 +- .../Creator/HttpHandlerOptionsCreator.cs | 4 +-- .../Creator/QoSOptionsCreator.cs | 1 + .../Creator/RouteOptionsCreator.cs | 3 +- .../Configuration/Creator/RoutesCreator.cs | 4 ++- src/Ocelot/Configuration/DownstreamRoute.cs | 3 +- src/Ocelot/Configuration/Route.cs | 1 + .../ServiceProviderConfiguration.cs | 2 +- .../Validator/HostAndPortValidator.cs | 4 +-- .../Validator/IConfigurationValidator.cs | 3 +- .../Validator/RouteFluentValidator.cs | 4 +-- .../ConfigurationBuilderExtensions.cs | 4 +-- .../DependencyInjection/OcelotBuilder.cs | 34 +++++++++++++++---- .../ClaimsToDownstreamPathMiddleware.cs | 4 ++- .../DownstreamRouteHolder.cs | 1 + .../Finder/DownstreamRouteCreator.cs | 5 ++- .../Finder/DownstreamRouteProviderFactory.cs | 4 +-- .../DownstreamRouteFinderMiddleware.cs | 7 ++-- .../DownstreamUrlCreatorMiddleware.cs | 12 +++++-- .../Middleware/ExceptionHandlerMiddleware.cs | 7 ++-- src/Ocelot/Headers/AddHeadersToRequest.cs | 6 ++-- src/Ocelot/Headers/AddHeadersToResponse.cs | 3 ++ .../Headers/HttpResponseHeaderReplacer.cs | 7 ++-- src/Ocelot/Headers/IAddHeadersToRequest.cs | 6 ++-- .../Headers/IHttpResponseHeaderReplacer.cs | 3 +- .../Middleware/ClaimsToHeadersMiddleware.cs | 3 +- .../HttpHeadersTransformationMiddleware.cs | 3 +- src/Ocelot/Infrastructure/Placeholders.cs | 5 ++- .../LoadBalancers/CookieStickySessions.cs | 4 ++- .../CookieStickySessionsCreator.cs | 9 +++-- .../DelegateInvokingLoadBalancerCreator.cs | 6 ++-- .../LoadBalancers/ILoadBalancer.cs | 1 + .../LoadBalancers/ILoadBalancerCreator.cs | 6 ++-- .../LoadBalancers/ILoadBalancerFactory.cs | 3 +- .../LoadBalancers/LeastConnection.cs | 1 + .../LoadBalancers/LeastConnectionCreator.cs | 6 ++-- .../LoadBalancers/LoadBalancerFactory.cs | 6 ++-- .../LoadBalancers/NoLoadBalancer.cs | 1 + .../LoadBalancers/NoLoadBalancerCreator.cs | 6 ++-- .../LoadBalancer/LoadBalancers/RoundRobin.cs | 1 + .../LoadBalancers/RoundRobinCreator.cs | 6 ++-- .../Middleware/LoadBalancingMiddleware.cs | 6 ++-- .../Middleware/ConfigurationMiddleware.cs | 6 ++-- .../Middleware/OcelotMiddlewareExtensions.cs | 13 ++++--- .../Middleware/OcelotPipelineExtensions.cs | 3 +- src/Ocelot/Multiplexer/IResponseAggregator.cs | 4 +-- .../Multiplexer/MultiplexingMiddleware.cs | 7 ++-- .../UserDefinedResponseAggregator.cs | 3 +- .../ClaimsToQueryStringMiddleware.cs | 3 +- .../Middleware/ClientRateLimitMiddleware.cs | 6 ++-- src/Ocelot/Request/Mapper/IRequestMapper.cs | 3 +- src/Ocelot/Request/Mapper/RequestMapper.cs | 3 +- .../DownstreamRequestInitialiserMiddleware.cs | 6 ++-- .../Middleware/RequestIdMiddleware.cs | 6 ++-- .../DelegatingHandlerHandlerFactory.cs | 9 ++--- src/Ocelot/Requester/HttpClientBuilder.cs | 1 + .../Requester/HttpClientHttpRequester.cs | 4 ++- .../Requester/HttpExeptionToErrorMapper.cs | 4 +-- .../IDelegatingHandlerHandlerFactory.cs | 3 +- .../Middleware/HttpRequesterMiddleware.cs | 4 ++- .../Requester/OcelotHttpTracingHandler.cs | 4 +-- src/Ocelot/Requester/TracingHandlerFactory.cs | 4 +-- .../Middleware/ResponderMiddleware.cs | 7 ++-- .../Security/IPSecurity/IPSecurityPolicy.cs | 4 ++- src/Ocelot/Security/ISecurityPolicy.cs | 3 +- .../Security/Middleware/SecurityMiddleware.cs | 3 +- .../IServiceDiscoveryProviderFactory.cs | 4 ++- .../ServiceDiscoveryProviderFactory.cs | 11 ++++-- .../Middleware/WebSocketsProxyMiddleware.cs | 3 +- .../AuthenticationTests.cs | 4 +-- .../AuthorizationTests.cs | 4 +-- .../ButterflyTracingTests.cs | 4 +-- .../CaseSensitiveRoutingTests.cs | 4 +-- .../ClaimsToDownstreamPathTests.cs | 4 +-- .../ClaimsToHeadersForwardingTests.cs | 4 +-- .../ClaimsToQueryStringForwardingTests.cs | 3 +- .../ClientRateLimitTests.cs | 4 +-- test/Ocelot.AcceptanceTests/ContentTests.cs | 4 +-- .../CustomMiddlewareTests.cs | 3 +- .../EurekaServiceDiscoveryTests.cs | 4 +-- test/Ocelot.AcceptanceTests/HeaderTests.cs | 4 +-- .../HttpClientCachingTests.cs | 3 +- .../HttpDelegatingHandlersTests.cs | 4 +-- test/Ocelot.AcceptanceTests/HttpTests.cs | 4 +-- .../LoadBalancerTests.cs | 6 ++-- test/Ocelot.AcceptanceTests/MethodTests.cs | 4 +-- .../OpenTracingTests.cs | 4 +-- .../ReasonPhraseTests.cs | 4 +-- test/Ocelot.AcceptanceTests/RoutingTests.cs | 4 +-- .../RoutingWithQueryStringTests.cs | 4 +-- .../ServiceFabricTests.cs | 4 +-- test/Ocelot.AcceptanceTests/SslTests.cs | 4 +-- test/Ocelot.AcceptanceTests/StartupTests.cs | 3 +- test/Ocelot.AcceptanceTests/Steps.cs | 21 +++++++----- .../StickySessionsTests.cs | 4 +-- .../UpstreamHostTests.cs | 4 +-- .../Ocelot.Benchmarks/DictionaryBenchmarks.cs | 3 +- ...wnstreamRouteFinderMiddlewareBenchmarks.cs | 15 +++++--- .../ExceptionHandlerMiddlewareBenchmarks.cs | 9 +++-- .../CacheManagerTests.cs | 17 ++++++---- test/Ocelot.IntegrationTests/HeaderTests.cs | 10 +++--- test/Ocelot.ManualTest/Program.cs | 3 +- .../AuthorizationMiddlewareTests.cs | 1 + .../Claims/ClaimsToClaimsMiddlewareTests.cs | 1 + .../FileInternalConfigurationCreatorTests.cs | 4 ++- .../Configuration/RoutesCreatorTests.cs | 3 +- .../DependencyInjection/OcelotBuilderTests.cs | 10 ++++-- .../ClaimsToDownstreamPathMiddlewareTests.cs | 7 ++-- .../DownstreamRouteFinderMiddlewareTests.cs | 1 + .../DownstreamUrlCreatorMiddlewareTests.cs | 4 ++- ...ekaMiddlewareConfigurationProviderTests.cs | 1 + .../EurekaServiceDiscoveryProviderTests.cs | 3 +- .../Headers/ClaimsToHeadersMiddlewareTests.cs | 1 + .../HttpContextRequestHeaderReplacerTests.cs | 2 +- .../HttpResponseHeaderReplacerTests.cs | 1 + .../Infrastructure/PlaceholdersTests.cs | 1 + .../CookieStickySessionsCreatorTests.cs | 3 +- .../LoadBalancer/CookieStickySessionsTests.cs | 7 ++-- .../LeastConnectionCreatorTests.cs | 3 +- .../LoadBalancerMiddlewareTests.cs | 4 ++- .../NoLoadBalancerCreatorTests.cs | 3 +- .../LoadBalancer/RoundRobinCreatorTests.cs | 3 +- .../MultiplexingMiddlewareTests.cs | 3 +- .../ResponseAggregatorFactoryTests.cs | 3 +- .../UserDefinedResponseAggregatorTests.cs | 7 ++-- .../ClaimsToQueryStringMiddlewareTests.cs | 1 + ...streamRequestInitialiserMiddlewareTests.cs | 1 + .../RequestId/RequestIdMiddlewareTests.cs | 1 + ...atingHandlerHandlerProviderFactoryTests.cs | 3 +- .../Requester/HttpRequesterMiddlewareTests.cs | 4 ++- .../Security/IPSecurityPolicyTests.cs | 3 +- .../ServiceDiscoveryProviderFactoryTests.cs | 3 +- ...viceFabricServiceDiscoveryProviderTests.cs | 3 +- 144 files changed, 428 insertions(+), 223 deletions(-) diff --git a/samples/OcelotBasic/Program.cs b/samples/OcelotBasic/Program.cs index dfc77fc75..cf24b431a 100644 --- a/samples/OcelotBasic/Program.cs +++ b/samples/OcelotBasic/Program.cs @@ -1,7 +1,8 @@ using System.IO; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; + using Ocelot.DependencyInjection; using Ocelot.Middleware; diff --git a/samples/OcelotOpenTracing/Program.cs b/samples/OcelotOpenTracing/Program.cs index 435e39883..eb662beb9 100644 --- a/samples/OcelotOpenTracing/Program.cs +++ b/samples/OcelotOpenTracing/Program.cs @@ -13,6 +13,7 @@ using Ocelot.DependencyInjection; using Ocelot.Middleware; using Ocelot.Tracing.OpenTracing; + using OpenTracing.Util; internal static class Program diff --git a/src/Ocelot.Provider.Eureka/Eureka.cs b/src/Ocelot.Provider.Eureka/Eureka.cs index 4eebe40a3..4c8bbc1c5 100644 --- a/src/Ocelot.Provider.Eureka/Eureka.cs +++ b/src/Ocelot.Provider.Eureka/Eureka.cs @@ -5,9 +5,10 @@ using System.Threading.Tasks; using ServiceDiscovery.Providers; - using Values; using Steeltoe.Discovery; + + using Values; public class Eureka : IServiceDiscoveryProvider { diff --git a/src/Ocelot.Provider.Eureka/OcelotBuilderExtensions.cs b/src/Ocelot.Provider.Eureka/OcelotBuilderExtensions.cs index 61c03a96f..1a8ba4875 100644 --- a/src/Ocelot.Provider.Eureka/OcelotBuilderExtensions.cs +++ b/src/Ocelot.Provider.Eureka/OcelotBuilderExtensions.cs @@ -3,6 +3,7 @@ using DependencyInjection; using Microsoft.Extensions.DependencyInjection; + using Steeltoe.Discovery.Client; public static class OcelotBuilderExtensions diff --git a/src/Ocelot.Provider.Polly/PollyQoSProvider.cs b/src/Ocelot.Provider.Polly/PollyQoSProvider.cs index 1e0522041..0bd532292 100644 --- a/src/Ocelot.Provider.Polly/PollyQoSProvider.cs +++ b/src/Ocelot.Provider.Polly/PollyQoSProvider.cs @@ -3,11 +3,12 @@ namespace Ocelot.Provider.Polly using System; using System.Net.Http; + using Configuration; + using global::Polly; using global::Polly.CircuitBreaker; using global::Polly.Timeout; - using Configuration; using Logging; public class PollyQoSProvider diff --git a/src/Ocelot.Tracing.OpenTracing/OcelotBuilderExtensions.cs b/src/Ocelot.Tracing.OpenTracing/OcelotBuilderExtensions.cs index 90c781bb8..c60254eeb 100644 --- a/src/Ocelot.Tracing.OpenTracing/OcelotBuilderExtensions.cs +++ b/src/Ocelot.Tracing.OpenTracing/OcelotBuilderExtensions.cs @@ -1,10 +1,11 @@ namespace Ocelot.Tracing.OpenTracing { - using Microsoft.Extensions.DependencyInjection.Extensions; - using DependencyInjection; + using Logging; + using Microsoft.Extensions.DependencyInjection.Extensions; + public static class OcelotBuilderExtensions { public static IOcelotBuilder AddOpenTracing(this IOcelotBuilder builder) diff --git a/src/Ocelot/Authentication/Middleware/AuthenticationMiddleware.cs b/src/Ocelot/Authentication/Middleware/AuthenticationMiddleware.cs index 7ec564210..4013ccb33 100644 --- a/src/Ocelot/Authentication/Middleware/AuthenticationMiddleware.cs +++ b/src/Ocelot/Authentication/Middleware/AuthenticationMiddleware.cs @@ -2,11 +2,13 @@ { using System.Threading.Tasks; + using Configuration; + + using Logging; + using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; - using Configuration; - using Logging; using Ocelot.Middleware; public class AuthenticationMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Authorization/ClaimsAuthorizer.cs b/src/Ocelot/Authorization/ClaimsAuthorizer.cs index fec621362..4de9c86b2 100644 --- a/src/Ocelot/Authorization/ClaimsAuthorizer.cs +++ b/src/Ocelot/Authorization/ClaimsAuthorizer.cs @@ -6,7 +6,9 @@ using System.Text.RegularExpressions; using DownstreamRouteFinder.UrlMatcher; + using Ocelot.Infrastructure.Claims.Parser; + using Responses; public class ClaimsAuthorizer : IClaimsAuthorizer diff --git a/src/Ocelot/Authorization/Middleware/AuthorizationMiddleware.cs b/src/Ocelot/Authorization/Middleware/AuthorizationMiddleware.cs index 24ef10233..e8752b716 100644 --- a/src/Ocelot/Authorization/Middleware/AuthorizationMiddleware.cs +++ b/src/Ocelot/Authorization/Middleware/AuthorizationMiddleware.cs @@ -2,11 +2,14 @@ { using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; + using Responses; public class AuthorizationMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs b/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs index a155993dd..1fc67175b 100644 --- a/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs +++ b/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs @@ -6,9 +6,10 @@ using System.Net.Http; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; public class OutputCacheMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Claims/Middleware/ClaimsToClaimsMiddleware.cs b/src/Ocelot/Claims/Middleware/ClaimsToClaimsMiddleware.cs index 153091154..e207b2571 100644 --- a/src/Ocelot/Claims/Middleware/ClaimsToClaimsMiddleware.cs +++ b/src/Ocelot/Claims/Middleware/ClaimsToClaimsMiddleware.cs @@ -3,9 +3,10 @@ using System.Linq; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; public class ClaimsToClaimsMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Configuration/Builder/RouteBuilder.cs b/src/Ocelot/Configuration/Builder/RouteBuilder.cs index e7ba3ec45..72cba8b8c 100644 --- a/src/Ocelot/Configuration/Builder/RouteBuilder.cs +++ b/src/Ocelot/Configuration/Builder/RouteBuilder.cs @@ -4,7 +4,8 @@ using System.Linq; using System.Net.Http; - using File; + using File; + using Values; public class RouteBuilder diff --git a/src/Ocelot/Configuration/Creator/HttpHandlerOptionsCreator.cs b/src/Ocelot/Configuration/Creator/HttpHandlerOptionsCreator.cs index 01741fe34..1369c4edc 100644 --- a/src/Ocelot/Configuration/Creator/HttpHandlerOptionsCreator.cs +++ b/src/Ocelot/Configuration/Creator/HttpHandlerOptionsCreator.cs @@ -2,12 +2,12 @@ { using System; + using File; + using Logging; using Microsoft.Extensions.DependencyInjection; - using File; - public class HttpHandlerOptionsCreator : IHttpHandlerOptionsCreator { private readonly ITracer _tracer; diff --git a/src/Ocelot/Configuration/Creator/QoSOptionsCreator.cs b/src/Ocelot/Configuration/Creator/QoSOptionsCreator.cs index cf1d4155e..b1157aee1 100644 --- a/src/Ocelot/Configuration/Creator/QoSOptionsCreator.cs +++ b/src/Ocelot/Configuration/Creator/QoSOptionsCreator.cs @@ -4,6 +4,7 @@ namespace Ocelot.Configuration.Creator using System.Linq; using Builder; + using File; public class QoSOptionsCreator : IQoSOptionsCreator diff --git a/src/Ocelot/Configuration/Creator/RouteOptionsCreator.cs b/src/Ocelot/Configuration/Creator/RouteOptionsCreator.cs index ebd80d393..887871385 100644 --- a/src/Ocelot/Configuration/Creator/RouteOptionsCreator.cs +++ b/src/Ocelot/Configuration/Creator/RouteOptionsCreator.cs @@ -1,6 +1,7 @@ namespace Ocelot.Configuration.Creator { - using Builder; + using Builder; + using File; public class RouteOptionsCreator : IRouteOptionsCreator diff --git a/src/Ocelot/Configuration/Creator/RoutesCreator.cs b/src/Ocelot/Configuration/Creator/RoutesCreator.cs index 8d0eeb46c..45f81bc27 100644 --- a/src/Ocelot/Configuration/Creator/RoutesCreator.cs +++ b/src/Ocelot/Configuration/Creator/RoutesCreator.cs @@ -3,8 +3,10 @@ namespace Ocelot.Configuration.Creator using System.Collections.Generic; using System.Linq; - using Cache; using Builder; + + using Cache; + using File; public class RoutesCreator : IRoutesCreator diff --git a/src/Ocelot/Configuration/DownstreamRoute.cs b/src/Ocelot/Configuration/DownstreamRoute.cs index ea80fde62..83cf2fbfe 100644 --- a/src/Ocelot/Configuration/DownstreamRoute.cs +++ b/src/Ocelot/Configuration/DownstreamRoute.cs @@ -3,7 +3,8 @@ namespace Ocelot.Configuration using System; using System.Collections.Generic; - using Creator; + using Creator; + using Values; public class DownstreamRoute diff --git a/src/Ocelot/Configuration/Route.cs b/src/Ocelot/Configuration/Route.cs index 301fda11a..67ac3913f 100644 --- a/src/Ocelot/Configuration/Route.cs +++ b/src/Ocelot/Configuration/Route.cs @@ -4,6 +4,7 @@ using System.Net.Http; using File; + using Values; public class Route diff --git a/src/Ocelot/Configuration/ServiceProviderConfiguration.cs b/src/Ocelot/Configuration/ServiceProviderConfiguration.cs index 47e934ff2..545ff4903 100644 --- a/src/Ocelot/Configuration/ServiceProviderConfiguration.cs +++ b/src/Ocelot/Configuration/ServiceProviderConfiguration.cs @@ -2,7 +2,7 @@ { public class ServiceProviderConfiguration { - public ServiceProviderConfiguration(string type, string scheme, string host, int port, string token, string configurationKey, int pollingInterval, string @namespace ="") + public ServiceProviderConfiguration(string type, string scheme, string host, int port, string token, string configurationKey, int pollingInterval, string @namespace = "") { ConfigurationKey = configurationKey; Scheme = scheme; diff --git a/src/Ocelot/Configuration/Validator/HostAndPortValidator.cs b/src/Ocelot/Configuration/Validator/HostAndPortValidator.cs index eede1c48c..6a5ba286b 100644 --- a/src/Ocelot/Configuration/Validator/HostAndPortValidator.cs +++ b/src/Ocelot/Configuration/Validator/HostAndPortValidator.cs @@ -1,8 +1,8 @@ namespace Ocelot.Configuration.Validator { - using FluentValidation; - using File; + + using FluentValidation; public class HostAndPortValidator : AbstractValidator { diff --git a/src/Ocelot/Configuration/Validator/IConfigurationValidator.cs b/src/Ocelot/Configuration/Validator/IConfigurationValidator.cs index eb184fc93..5cefe479e 100644 --- a/src/Ocelot/Configuration/Validator/IConfigurationValidator.cs +++ b/src/Ocelot/Configuration/Validator/IConfigurationValidator.cs @@ -2,7 +2,8 @@ { using System.Threading.Tasks; - using File; + using File; + using Responses; public interface IConfigurationValidator diff --git a/src/Ocelot/Configuration/Validator/RouteFluentValidator.cs b/src/Ocelot/Configuration/Validator/RouteFluentValidator.cs index e7aa2e1b4..5c27f59bf 100644 --- a/src/Ocelot/Configuration/Validator/RouteFluentValidator.cs +++ b/src/Ocelot/Configuration/Validator/RouteFluentValidator.cs @@ -5,11 +5,11 @@ using System.Threading; using System.Threading.Tasks; + using File; + using FluentValidation; using Microsoft.AspNetCore.Authentication; - - using File; public class RouteFluentValidator : AbstractValidator { diff --git a/src/Ocelot/DependencyInjection/ConfigurationBuilderExtensions.cs b/src/Ocelot/DependencyInjection/ConfigurationBuilderExtensions.cs index b3b084f10..83e821775 100644 --- a/src/Ocelot/DependencyInjection/ConfigurationBuilderExtensions.cs +++ b/src/Ocelot/DependencyInjection/ConfigurationBuilderExtensions.cs @@ -6,13 +6,13 @@ namespace Ocelot.DependencyInjection using System.Linq; using System.Text.RegularExpressions; + using Configuration.File; + using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.Memory; using Newtonsoft.Json; - - using Configuration.File; public static class ConfigurationBuilderExtensions { diff --git a/src/Ocelot/DependencyInjection/OcelotBuilder.cs b/src/Ocelot/DependencyInjection/OcelotBuilder.cs index 43327c4b0..dbf8b11c1 100644 --- a/src/Ocelot/DependencyInjection/OcelotBuilder.cs +++ b/src/Ocelot/DependencyInjection/OcelotBuilder.cs @@ -5,15 +5,12 @@ namespace Ocelot.DependencyInjection using System.Net.Http; using System.Reflection; - using Microsoft.AspNetCore.Http; - using Microsoft.Extensions.Configuration; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.Extensions.DependencyInjection.Extensions; - using Microsoft.Extensions.Options; - using Authorization; + using Cache; + using Claims; + using Configuration; using Configuration.ChangeTracking; using Configuration.Creator; @@ -22,27 +19,50 @@ namespace Ocelot.DependencyInjection using Configuration.Repository; using Configuration.Setter; using Configuration.Validator; + using DownstreamRouteFinder.Finder; using DownstreamRouteFinder.UrlMatcher; + using DownstreamUrlCreator.UrlTemplateReplacer; + using Headers; + using Infrastructure; - using Ocelot.Infrastructure.Claims.Parser; using Infrastructure.RequestData; + using LoadBalancer.LoadBalancers; + using Logging; + + using Microsoft.AspNetCore.Http; + using Microsoft.Extensions.Configuration; + using Microsoft.Extensions.DependencyInjection; + using Microsoft.Extensions.DependencyInjection.Extensions; + using Microsoft.Extensions.Options; + using Middleware; + using Multiplexer; + + using Ocelot.Infrastructure.Claims.Parser; + using PathManipulation; + using QueryStrings; + using RateLimit; + using Request.Creator; using Request.Mapper; + using Requester; using Requester.QoS; + using Responder; + using Security; using Security.IPSecurity; + using ServiceDiscovery; using ServiceDiscovery.Providers; diff --git a/src/Ocelot/DownstreamPathManipulation/Middleware/ClaimsToDownstreamPathMiddleware.cs b/src/Ocelot/DownstreamPathManipulation/Middleware/ClaimsToDownstreamPathMiddleware.cs index f8394fe4c..89bdae6e2 100644 --- a/src/Ocelot/DownstreamPathManipulation/Middleware/ClaimsToDownstreamPathMiddleware.cs +++ b/src/Ocelot/DownstreamPathManipulation/Middleware/ClaimsToDownstreamPathMiddleware.cs @@ -3,10 +3,12 @@ using System.Linq; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; + using PathManipulation; public class ClaimsToDownstreamPathMiddleware : OcelotMiddleware diff --git a/src/Ocelot/DownstreamRouteFinder/DownstreamRouteHolder.cs b/src/Ocelot/DownstreamRouteFinder/DownstreamRouteHolder.cs index 0ae26efa7..e593f463f 100644 --- a/src/Ocelot/DownstreamRouteFinder/DownstreamRouteHolder.cs +++ b/src/Ocelot/DownstreamRouteFinder/DownstreamRouteHolder.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Configuration; + using UrlMatcher; public class DownstreamRouteHolder diff --git a/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteCreator.cs b/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteCreator.cs index cfe9cf635..d3cb835f4 100644 --- a/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteCreator.cs +++ b/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteCreator.cs @@ -7,9 +7,12 @@ using Configuration; using Configuration.Builder; using Configuration.Creator; - using UrlMatcher; + using LoadBalancer.LoadBalancers; + using Responses; + + using UrlMatcher; public class DownstreamRouteCreator : IDownstreamRouteProvider { diff --git a/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteProviderFactory.cs b/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteProviderFactory.cs index cea5672f4..ebbe265db 100644 --- a/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteProviderFactory.cs +++ b/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteProviderFactory.cs @@ -6,9 +6,9 @@ using Configuration; - using Microsoft.Extensions.DependencyInjection; - using Logging; + + using Microsoft.Extensions.DependencyInjection; public class DownstreamRouteProviderFactory : IDownstreamRouteProviderFactory { diff --git a/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs b/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs index b1c7672cf..63e2de2dd 100644 --- a/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs +++ b/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs @@ -3,11 +3,14 @@ namespace Ocelot.DownstreamRouteFinder.Middleware using System.Linq; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Finder; + using Infrastructure.Extensions; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; public class DownstreamRouteFinderMiddleware : OcelotMiddleware diff --git a/src/Ocelot/DownstreamUrlCreator/Middleware/DownstreamUrlCreatorMiddleware.cs b/src/Ocelot/DownstreamUrlCreator/Middleware/DownstreamUrlCreatorMiddleware.cs index f8e7ecc40..aac938b85 100644 --- a/src/Ocelot/DownstreamUrlCreator/Middleware/DownstreamUrlCreatorMiddleware.cs +++ b/src/Ocelot/DownstreamUrlCreator/Middleware/DownstreamUrlCreatorMiddleware.cs @@ -5,15 +5,21 @@ namespace Ocelot.DownstreamUrlCreator.Middleware using System.Text.RegularExpressions; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration; + using DownstreamRouteFinder.UrlMatcher; - using UrlTemplateReplacer; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; using Ocelot.Request.Middleware; + using Responses; + + using UrlTemplateReplacer; + using Values; public class DownstreamUrlCreatorMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Errors/Middleware/ExceptionHandlerMiddleware.cs b/src/Ocelot/Errors/Middleware/ExceptionHandlerMiddleware.cs index 1564f065c..a60288e3b 100644 --- a/src/Ocelot/Errors/Middleware/ExceptionHandlerMiddleware.cs +++ b/src/Ocelot/Errors/Middleware/ExceptionHandlerMiddleware.cs @@ -4,11 +4,14 @@ namespace Ocelot.Errors.Middleware using System.Linq; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration; + using Infrastructure.RequestData; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; /// diff --git a/src/Ocelot/Headers/AddHeadersToRequest.cs b/src/Ocelot/Headers/AddHeadersToRequest.cs index dae609151..1ae0d4721 100644 --- a/src/Ocelot/Headers/AddHeadersToRequest.cs +++ b/src/Ocelot/Headers/AddHeadersToRequest.cs @@ -3,6 +3,9 @@ using System.Collections.Generic; using System.Linq; + using Configuration; + using Configuration.Creator; + using Infrastructure; using Logging; @@ -10,10 +13,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; - using Configuration; - using Configuration.Creator; using Ocelot.Infrastructure.Claims.Parser; using Ocelot.Request.Middleware; + using Responses; public class AddHeadersToRequest : IAddHeadersToRequest diff --git a/src/Ocelot/Headers/AddHeadersToResponse.cs b/src/Ocelot/Headers/AddHeadersToResponse.cs index 8a1d4c1a0..3bbec475a 100644 --- a/src/Ocelot/Headers/AddHeadersToResponse.cs +++ b/src/Ocelot/Headers/AddHeadersToResponse.cs @@ -3,8 +3,11 @@ namespace Ocelot.Headers using System.Collections.Generic; using Configuration.Creator; + using Infrastructure; + using Logging; + using Ocelot.Middleware; public class AddHeadersToResponse : IAddHeadersToResponse diff --git a/src/Ocelot/Headers/HttpResponseHeaderReplacer.cs b/src/Ocelot/Headers/HttpResponseHeaderReplacer.cs index 28d3c68d9..c1d427390 100644 --- a/src/Ocelot/Headers/HttpResponseHeaderReplacer.cs +++ b/src/Ocelot/Headers/HttpResponseHeaderReplacer.cs @@ -3,12 +3,15 @@ namespace Ocelot.Headers using System.Collections.Generic; using System.Linq; - using Microsoft.AspNetCore.Http; - using Configuration; + using Infrastructure; using Infrastructure.Extensions; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; + using Responses; public class HttpResponseHeaderReplacer : IHttpResponseHeaderReplacer diff --git a/src/Ocelot/Headers/IAddHeadersToRequest.cs b/src/Ocelot/Headers/IAddHeadersToRequest.cs index d30b3c81d..ecd508605 100644 --- a/src/Ocelot/Headers/IAddHeadersToRequest.cs +++ b/src/Ocelot/Headers/IAddHeadersToRequest.cs @@ -5,8 +5,10 @@ namespace Ocelot.Headers using System.Collections.Generic; using Configuration; - using Configuration.Creator; - using Ocelot.Request.Middleware; + using Configuration.Creator; + + using Ocelot.Request.Middleware; + using Responses; public interface IAddHeadersToRequest diff --git a/src/Ocelot/Headers/IHttpResponseHeaderReplacer.cs b/src/Ocelot/Headers/IHttpResponseHeaderReplacer.cs index 0b229d1d9..b6d7c3cba 100644 --- a/src/Ocelot/Headers/IHttpResponseHeaderReplacer.cs +++ b/src/Ocelot/Headers/IHttpResponseHeaderReplacer.cs @@ -2,9 +2,10 @@ namespace Ocelot.Headers { using System.Collections.Generic; + using Configuration; + using Microsoft.AspNetCore.Http; - using Configuration; using Responses; public interface IHttpResponseHeaderReplacer diff --git a/src/Ocelot/Headers/Middleware/ClaimsToHeadersMiddleware.cs b/src/Ocelot/Headers/Middleware/ClaimsToHeadersMiddleware.cs index 232c13255..37351126d 100644 --- a/src/Ocelot/Headers/Middleware/ClaimsToHeadersMiddleware.cs +++ b/src/Ocelot/Headers/Middleware/ClaimsToHeadersMiddleware.cs @@ -3,9 +3,10 @@ using System.Linq; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; public class ClaimsToHeadersMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Headers/Middleware/HttpHeadersTransformationMiddleware.cs b/src/Ocelot/Headers/Middleware/HttpHeadersTransformationMiddleware.cs index a3c77a0b8..d13f1e568 100644 --- a/src/Ocelot/Headers/Middleware/HttpHeadersTransformationMiddleware.cs +++ b/src/Ocelot/Headers/Middleware/HttpHeadersTransformationMiddleware.cs @@ -2,9 +2,10 @@ namespace Ocelot.Headers.Middleware { using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; public class HttpHeadersTransformationMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Infrastructure/Placeholders.cs b/src/Ocelot/Infrastructure/Placeholders.cs index fbed19b18..30494131a 100644 --- a/src/Ocelot/Infrastructure/Placeholders.cs +++ b/src/Ocelot/Infrastructure/Placeholders.cs @@ -6,9 +6,12 @@ namespace Ocelot.Infrastructure using Microsoft.AspNetCore.Http; - using RequestData; using Middleware; + using Ocelot.Request.Middleware; + + using RequestData; + using Responses; public class Placeholders : IPlaceholders diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessions.cs b/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessions.cs index b0b241f38..231360f8b 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessions.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessions.cs @@ -4,10 +4,12 @@ namespace Ocelot.LoadBalancer.LoadBalancers using System.Collections.Concurrent; using System.Threading.Tasks; + using Infrastructure; + using Microsoft.AspNetCore.Http; - using Infrastructure; using Responses; + using Values; public class CookieStickySessions : ILoadBalancer diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessionsCreator.cs b/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessionsCreator.cs index ede571537..3f749118d 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessionsCreator.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessionsCreator.cs @@ -1,8 +1,11 @@ namespace Ocelot.LoadBalancer.LoadBalancers { - using Configuration; - using Infrastructure; - using Responses; + using Configuration; + + using Infrastructure; + + using Responses; + using ServiceDiscovery.Providers; public class CookieStickySessionsCreator : ILoadBalancerCreator diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/DelegateInvokingLoadBalancerCreator.cs b/src/Ocelot/LoadBalancer/LoadBalancers/DelegateInvokingLoadBalancerCreator.cs index 413613629..2acebbad7 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/DelegateInvokingLoadBalancerCreator.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/DelegateInvokingLoadBalancerCreator.cs @@ -2,8 +2,10 @@ { using System; - using Configuration; - using Responses; + using Configuration; + + using Responses; + using ServiceDiscovery.Providers; public class DelegateInvokingLoadBalancerCreator : ILoadBalancerCreator diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancer.cs b/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancer.cs index 5ffcd0e1a..d6df557b0 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancer.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancer.cs @@ -5,6 +5,7 @@ namespace Ocelot.LoadBalancer.LoadBalancers using Microsoft.AspNetCore.Http; using Responses; + using Values; public interface ILoadBalancer diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerCreator.cs b/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerCreator.cs index 1c5e5155d..935afc585 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerCreator.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerCreator.cs @@ -1,7 +1,9 @@ namespace Ocelot.LoadBalancer.LoadBalancers { - using Configuration; - using Responses; + using Configuration; + + using Responses; + using ServiceDiscovery.Providers; public interface ILoadBalancerCreator diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerFactory.cs b/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerFactory.cs index 92ee17b98..4679d4290 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerFactory.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/ILoadBalancerFactory.cs @@ -1,6 +1,7 @@ namespace Ocelot.LoadBalancer.LoadBalancers { - using Configuration; + using Configuration; + using Responses; public interface ILoadBalancerFactory diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnection.cs b/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnection.cs index bfd489f02..c871a94e9 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnection.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnection.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Http; using Responses; + using Values; public class LeastConnection : ILoadBalancer diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnectionCreator.cs b/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnectionCreator.cs index 98364a4ef..c8b294db0 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnectionCreator.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/LeastConnectionCreator.cs @@ -1,7 +1,9 @@ namespace Ocelot.LoadBalancer.LoadBalancers { - using Configuration; - using Responses; + using Configuration; + + using Responses; + using ServiceDiscovery.Providers; public class LeastConnectionCreator : ILoadBalancerCreator diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/LoadBalancerFactory.cs b/src/Ocelot/LoadBalancer/LoadBalancers/LoadBalancerFactory.cs index 3c1ec9dea..eb1dd6d2c 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/LoadBalancerFactory.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/LoadBalancerFactory.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.Linq; - using Configuration; - using Responses; + using Configuration; + + using Responses; + using ServiceDiscovery; public class LoadBalancerFactory : ILoadBalancerFactory diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancer.cs b/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancer.cs index 6043d9cd8..f17c85e16 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancer.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancer.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Http; using Responses; + using Values; public class NoLoadBalancer : ILoadBalancer diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancerCreator.cs b/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancerCreator.cs index fe6cfe735..079b04039 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancerCreator.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/NoLoadBalancerCreator.cs @@ -1,7 +1,9 @@ namespace Ocelot.LoadBalancer.LoadBalancers { - using Configuration; - using Responses; + using Configuration; + + using Responses; + using ServiceDiscovery.Providers; public class NoLoadBalancerCreator : ILoadBalancerCreator diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs b/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs index f2b95bc2f..beddde4e7 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Http; using Responses; + using Values; public class RoundRobin : ILoadBalancer diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobinCreator.cs b/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobinCreator.cs index dcab425a3..66ae937dc 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobinCreator.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobinCreator.cs @@ -1,7 +1,9 @@ namespace Ocelot.LoadBalancer.LoadBalancers { - using Configuration; - using Responses; + using Configuration; + + using Responses; + using ServiceDiscovery.Providers; public class RoundRobinCreator : ILoadBalancerCreator diff --git a/src/Ocelot/LoadBalancer/Middleware/LoadBalancingMiddleware.cs b/src/Ocelot/LoadBalancer/Middleware/LoadBalancingMiddleware.cs index 41af754e6..3ed86b452 100644 --- a/src/Ocelot/LoadBalancer/Middleware/LoadBalancingMiddleware.cs +++ b/src/Ocelot/LoadBalancer/Middleware/LoadBalancingMiddleware.cs @@ -3,10 +3,12 @@ using System; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using LoadBalancers; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; public class LoadBalancingMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Middleware/ConfigurationMiddleware.cs b/src/Ocelot/Middleware/ConfigurationMiddleware.cs index 99c18780b..6c9297bbf 100644 --- a/src/Ocelot/Middleware/ConfigurationMiddleware.cs +++ b/src/Ocelot/Middleware/ConfigurationMiddleware.cs @@ -2,11 +2,13 @@ namespace Ocelot.Middleware { using System.Threading.Tasks; + using Configuration.Repository; + + using Logging; + using Microsoft.AspNetCore.Http; - using Configuration.Repository; using Ocelot.Errors.Middleware; - using Logging; public class ConfigurationMiddleware : OcelotMiddleware { diff --git a/src/Ocelot/Middleware/OcelotMiddlewareExtensions.cs b/src/Ocelot/Middleware/OcelotMiddlewareExtensions.cs index 74b59b11e..801a899de 100644 --- a/src/Ocelot/Middleware/OcelotMiddlewareExtensions.cs +++ b/src/Ocelot/Middleware/OcelotMiddlewareExtensions.cs @@ -5,18 +5,21 @@ using System.Linq; using System.Threading.Tasks; - using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.Extensions.Options; - using Configuration; using Configuration.Creator; using Configuration.File; using Configuration.Repository; using Configuration.Setter; + using DependencyInjection; + using Logging; + + using Microsoft.AspNetCore.Builder; + using Microsoft.AspNetCore.Hosting; + using Microsoft.Extensions.DependencyInjection; + using Microsoft.Extensions.Options; + using Responses; public static class OcelotMiddlewareExtensions diff --git a/src/Ocelot/Middleware/OcelotPipelineExtensions.cs b/src/Ocelot/Middleware/OcelotPipelineExtensions.cs index b58f6878a..501f599ca 100644 --- a/src/Ocelot/Middleware/OcelotPipelineExtensions.cs +++ b/src/Ocelot/Middleware/OcelotPipelineExtensions.cs @@ -6,6 +6,8 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; + using Multiplexer; + using Ocelot.Authentication.Middleware; using Ocelot.Authorization.Middleware; using Ocelot.Cache.Middleware; @@ -16,7 +18,6 @@ using Ocelot.Errors.Middleware; using Ocelot.Headers.Middleware; using Ocelot.LoadBalancer.Middleware; - using Multiplexer; using Ocelot.QueryStrings.Middleware; using Ocelot.RateLimit.Middleware; using Ocelot.Request.Middleware; diff --git a/src/Ocelot/Multiplexer/IResponseAggregator.cs b/src/Ocelot/Multiplexer/IResponseAggregator.cs index efaeb2a87..0d23a9515 100644 --- a/src/Ocelot/Multiplexer/IResponseAggregator.cs +++ b/src/Ocelot/Multiplexer/IResponseAggregator.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration; + using Microsoft.AspNetCore.Http; + public interface IResponseAggregator { Task Aggregate(Route route, HttpContext originalContext, List downstreamResponses); diff --git a/src/Ocelot/Multiplexer/MultiplexingMiddleware.cs b/src/Ocelot/Multiplexer/MultiplexingMiddleware.cs index 31b8f0b40..1cd956396 100644 --- a/src/Ocelot/Multiplexer/MultiplexingMiddleware.cs +++ b/src/Ocelot/Multiplexer/MultiplexingMiddleware.cs @@ -4,11 +4,14 @@ using System.Linq; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration; + using DownstreamRouteFinder.UrlMatcher; + using Logging; + + using Microsoft.AspNetCore.Http; + using Middleware; public class MultiplexingMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Multiplexer/UserDefinedResponseAggregator.cs b/src/Ocelot/Multiplexer/UserDefinedResponseAggregator.cs index bca386cc9..7e20d494c 100644 --- a/src/Ocelot/Multiplexer/UserDefinedResponseAggregator.cs +++ b/src/Ocelot/Multiplexer/UserDefinedResponseAggregator.cs @@ -3,9 +3,10 @@ namespace Ocelot.Multiplexer using System.Collections.Generic; using System.Threading.Tasks; + using Configuration; + using Microsoft.AspNetCore.Http; - using Configuration; using Middleware; public class UserDefinedResponseAggregator : IResponseAggregator diff --git a/src/Ocelot/QueryStrings/Middleware/ClaimsToQueryStringMiddleware.cs b/src/Ocelot/QueryStrings/Middleware/ClaimsToQueryStringMiddleware.cs index b384bdb17..22031b8ce 100644 --- a/src/Ocelot/QueryStrings/Middleware/ClaimsToQueryStringMiddleware.cs +++ b/src/Ocelot/QueryStrings/Middleware/ClaimsToQueryStringMiddleware.cs @@ -3,9 +3,10 @@ using System.Linq; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; public class ClaimsToQueryStringMiddleware : OcelotMiddleware diff --git a/src/Ocelot/RateLimit/Middleware/ClientRateLimitMiddleware.cs b/src/Ocelot/RateLimit/Middleware/ClientRateLimitMiddleware.cs index 4763a27e9..65aaa6cac 100644 --- a/src/Ocelot/RateLimit/Middleware/ClientRateLimitMiddleware.cs +++ b/src/Ocelot/RateLimit/Middleware/ClientRateLimitMiddleware.cs @@ -5,10 +5,12 @@ using System.Net.Http; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; public class ClientRateLimitMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Request/Mapper/IRequestMapper.cs b/src/Ocelot/Request/Mapper/IRequestMapper.cs index 2e37ce088..47fe95f47 100644 --- a/src/Ocelot/Request/Mapper/IRequestMapper.cs +++ b/src/Ocelot/Request/Mapper/IRequestMapper.cs @@ -3,9 +3,10 @@ using System.Net.Http; using System.Threading.Tasks; + using Configuration; + using Microsoft.AspNetCore.Http; - using Configuration; using Responses; public interface IRequestMapper diff --git a/src/Ocelot/Request/Mapper/RequestMapper.cs b/src/Ocelot/Request/Mapper/RequestMapper.cs index d3ffd1908..ab55a5039 100644 --- a/src/Ocelot/Request/Mapper/RequestMapper.cs +++ b/src/Ocelot/Request/Mapper/RequestMapper.cs @@ -7,11 +7,12 @@ using System.Net.Http; using System.Threading.Tasks; + using Configuration; + using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; using Microsoft.Extensions.Primitives; - using Configuration; using Responses; public class RequestMapper : IRequestMapper diff --git a/src/Ocelot/Request/Middleware/DownstreamRequestInitialiserMiddleware.cs b/src/Ocelot/Request/Middleware/DownstreamRequestInitialiserMiddleware.cs index b65b5ad4b..e59375d64 100644 --- a/src/Ocelot/Request/Middleware/DownstreamRequestInitialiserMiddleware.cs +++ b/src/Ocelot/Request/Middleware/DownstreamRequestInitialiserMiddleware.cs @@ -2,11 +2,13 @@ namespace Ocelot.Request.Middleware { using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; + using Creator; using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; - using Creator; public class DownstreamRequestInitialiserMiddleware : OcelotMiddleware { diff --git a/src/Ocelot/RequestId/Middleware/RequestIdMiddleware.cs b/src/Ocelot/RequestId/Middleware/RequestIdMiddleware.cs index cb84f7204..378f106c0 100644 --- a/src/Ocelot/RequestId/Middleware/RequestIdMiddleware.cs +++ b/src/Ocelot/RequestId/Middleware/RequestIdMiddleware.cs @@ -4,10 +4,12 @@ namespace Ocelot.RequestId.Middleware using System.Net.Http.Headers; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Infrastructure.RequestData; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; using Ocelot.Request.Middleware; diff --git a/src/Ocelot/Requester/DelegatingHandlerHandlerFactory.cs b/src/Ocelot/Requester/DelegatingHandlerHandlerFactory.cs index a83be43fa..d984d9a22 100644 --- a/src/Ocelot/Requester/DelegatingHandlerHandlerFactory.cs +++ b/src/Ocelot/Requester/DelegatingHandlerHandlerFactory.cs @@ -5,14 +5,15 @@ namespace Ocelot.Requester using System.Linq; using System.Net.Http; + using Configuration; + using Logging; using Microsoft.Extensions.DependencyInjection; - using Configuration; - using Responses; - using QoS; + + using Responses; public class DelegatingHandlerHandlerFactory : IDelegatingHandlerHandlerFactory { @@ -61,7 +62,7 @@ public Response>> Get(DownstreamRoute downstreamRou { var sorted = SortByConfigOrder(downstreamRoute, routeSpecificHandlers); - handlers.AddRange(sorted.Select(handler => (Func) (() => handler))); + handlers.AddRange(sorted.Select(handler => (Func)(() => handler))); } if (downstreamRoute.HttpHandlerOptions.UseTracing) diff --git a/src/Ocelot/Requester/HttpClientBuilder.cs b/src/Ocelot/Requester/HttpClientBuilder.cs index 0df9416b4..6361d2faf 100644 --- a/src/Ocelot/Requester/HttpClientBuilder.cs +++ b/src/Ocelot/Requester/HttpClientBuilder.cs @@ -6,6 +6,7 @@ using System.Net.Http; using Configuration; + using Logging; public class HttpClientBuilder : IHttpClientBuilder diff --git a/src/Ocelot/Requester/HttpClientHttpRequester.cs b/src/Ocelot/Requester/HttpClientHttpRequester.cs index e69bb6d59..483fbc958 100644 --- a/src/Ocelot/Requester/HttpClientHttpRequester.cs +++ b/src/Ocelot/Requester/HttpClientHttpRequester.cs @@ -4,10 +4,12 @@ namespace Ocelot.Requester using System.Net.Http; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; + using Responses; public class HttpClientHttpRequester : IHttpRequester diff --git a/src/Ocelot/Requester/HttpExeptionToErrorMapper.cs b/src/Ocelot/Requester/HttpExeptionToErrorMapper.cs index 4a558591f..c6c8542b5 100644 --- a/src/Ocelot/Requester/HttpExeptionToErrorMapper.cs +++ b/src/Ocelot/Requester/HttpExeptionToErrorMapper.cs @@ -4,10 +4,10 @@ namespace Ocelot.Requester using System.Collections.Generic; using System.Net.Http; - using Microsoft.Extensions.DependencyInjection; - using Errors; + using Microsoft.Extensions.DependencyInjection; + public class HttpExeptionToErrorMapper : IExceptionToErrorMapper { private readonly Dictionary> _mappers; diff --git a/src/Ocelot/Requester/IDelegatingHandlerHandlerFactory.cs b/src/Ocelot/Requester/IDelegatingHandlerHandlerFactory.cs index 54cd1cf80..1915103c5 100644 --- a/src/Ocelot/Requester/IDelegatingHandlerHandlerFactory.cs +++ b/src/Ocelot/Requester/IDelegatingHandlerHandlerFactory.cs @@ -4,7 +4,8 @@ namespace Ocelot.Requester using System.Collections.Generic; using System.Net.Http; - using Configuration; + using Configuration; + using Responses; public interface IDelegatingHandlerHandlerFactory diff --git a/src/Ocelot/Requester/Middleware/HttpRequesterMiddleware.cs b/src/Ocelot/Requester/Middleware/HttpRequesterMiddleware.cs index fb7645000..698ebe76a 100644 --- a/src/Ocelot/Requester/Middleware/HttpRequesterMiddleware.cs +++ b/src/Ocelot/Requester/Middleware/HttpRequesterMiddleware.cs @@ -4,10 +4,12 @@ namespace Ocelot.Requester.Middleware using System.Net.Http; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; + using Responses; public class HttpRequesterMiddleware : OcelotMiddleware diff --git a/src/Ocelot/Requester/OcelotHttpTracingHandler.cs b/src/Ocelot/Requester/OcelotHttpTracingHandler.cs index 9512e2c0c..725b65799 100644 --- a/src/Ocelot/Requester/OcelotHttpTracingHandler.cs +++ b/src/Ocelot/Requester/OcelotHttpTracingHandler.cs @@ -5,10 +5,10 @@ using System.Threading; using System.Threading.Tasks; - using Logging; - using Infrastructure.RequestData; + using Logging; + public class OcelotHttpTracingHandler : DelegatingHandler, ITracingHandler { private readonly ITracer _tracer; diff --git a/src/Ocelot/Requester/TracingHandlerFactory.cs b/src/Ocelot/Requester/TracingHandlerFactory.cs index a6c5114a8..06357bf22 100644 --- a/src/Ocelot/Requester/TracingHandlerFactory.cs +++ b/src/Ocelot/Requester/TracingHandlerFactory.cs @@ -2,12 +2,12 @@ namespace Ocelot.Requester { using System; + using Infrastructure.RequestData; + using Logging; using Microsoft.Extensions.DependencyInjection; - using Infrastructure.RequestData; - public class TracingHandlerFactory : ITracingHandlerFactory { private readonly ITracer _tracer; diff --git a/src/Ocelot/Responder/Middleware/ResponderMiddleware.cs b/src/Ocelot/Responder/Middleware/ResponderMiddleware.cs index f3cdf6457..7dc9b0ea1 100644 --- a/src/Ocelot/Responder/Middleware/ResponderMiddleware.cs +++ b/src/Ocelot/Responder/Middleware/ResponderMiddleware.cs @@ -4,11 +4,14 @@ namespace Ocelot.Responder.Middleware using System.Linq; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Errors; + using Infrastructure.Extensions; + using Logging; + + using Microsoft.AspNetCore.Http; + using Ocelot.Middleware; /// diff --git a/src/Ocelot/Security/IPSecurity/IPSecurityPolicy.cs b/src/Ocelot/Security/IPSecurity/IPSecurityPolicy.cs index cf1f9c14e..c3abe8ba2 100644 --- a/src/Ocelot/Security/IPSecurity/IPSecurityPolicy.cs +++ b/src/Ocelot/Security/IPSecurity/IPSecurityPolicy.cs @@ -2,10 +2,12 @@ { using System.Threading.Tasks; + using Configuration; + using Microsoft.AspNetCore.Http; - using Configuration; using Ocelot.Middleware; + using Responses; public class IPSecurityPolicy : ISecurityPolicy diff --git a/src/Ocelot/Security/ISecurityPolicy.cs b/src/Ocelot/Security/ISecurityPolicy.cs index fefa02cc5..e53022a23 100644 --- a/src/Ocelot/Security/ISecurityPolicy.cs +++ b/src/Ocelot/Security/ISecurityPolicy.cs @@ -2,9 +2,10 @@ { using System.Threading.Tasks; + using Configuration; + using Microsoft.AspNetCore.Http; - using Configuration; using Responses; public interface ISecurityPolicy diff --git a/src/Ocelot/Security/Middleware/SecurityMiddleware.cs b/src/Ocelot/Security/Middleware/SecurityMiddleware.cs index da2f88443..d65ede4b0 100644 --- a/src/Ocelot/Security/Middleware/SecurityMiddleware.cs +++ b/src/Ocelot/Security/Middleware/SecurityMiddleware.cs @@ -3,9 +3,10 @@ using System.Collections.Generic; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; public class SecurityMiddleware : OcelotMiddleware diff --git a/src/Ocelot/ServiceDiscovery/IServiceDiscoveryProviderFactory.cs b/src/Ocelot/ServiceDiscovery/IServiceDiscoveryProviderFactory.cs index 11d1c5417..5ef710222 100644 --- a/src/Ocelot/ServiceDiscovery/IServiceDiscoveryProviderFactory.cs +++ b/src/Ocelot/ServiceDiscovery/IServiceDiscoveryProviderFactory.cs @@ -1,8 +1,10 @@ namespace Ocelot.ServiceDiscovery { using Ocelot.Configuration; - using Responses; + using Providers; + + using Responses; public interface IServiceDiscoveryProviderFactory { diff --git a/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs b/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs index e6ab241a9..fb6c41ffa 100644 --- a/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs +++ b/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs @@ -3,13 +3,18 @@ namespace Ocelot.ServiceDiscovery using System; using System.Collections.Generic; + using Configuration; + + using Logging; + using Microsoft.Extensions.DependencyInjection; using Ocelot.Configuration; - using Logging; - using Responses; - using Configuration; + using Providers; + + using Responses; + using Values; public class ServiceDiscoveryProviderFactory : IServiceDiscoveryProviderFactory diff --git a/src/Ocelot/WebSockets/Middleware/WebSocketsProxyMiddleware.cs b/src/Ocelot/WebSockets/Middleware/WebSocketsProxyMiddleware.cs index bba2f1227..db647f6dc 100644 --- a/src/Ocelot/WebSockets/Middleware/WebSocketsProxyMiddleware.cs +++ b/src/Ocelot/WebSockets/Middleware/WebSocketsProxyMiddleware.cs @@ -10,9 +10,10 @@ namespace Ocelot.WebSockets.Middleware using System.Threading; using System.Threading.Tasks; + using Logging; + using Microsoft.AspNetCore.Http; - using Logging; using Ocelot.Middleware; public class WebSocketsProxyMiddleware : OcelotMiddleware diff --git a/test/Ocelot.AcceptanceTests/AuthenticationTests.cs b/test/Ocelot.AcceptanceTests/AuthenticationTests.cs index 5ff4c707c..f118e0bf6 100644 --- a/test/Ocelot.AcceptanceTests/AuthenticationTests.cs +++ b/test/Ocelot.AcceptanceTests/AuthenticationTests.cs @@ -6,6 +6,8 @@ namespace Ocelot.AcceptanceTests using System.Net; using System.Security.Claims; + using Configuration.File; + using IdentityServer4.AccessTokenValidation; using IdentityServer4.Models; using IdentityServer4.Test; @@ -15,8 +17,6 @@ namespace Ocelot.AcceptanceTests using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; - using Configuration.File; - using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/AuthorizationTests.cs b/test/Ocelot.AcceptanceTests/AuthorizationTests.cs index 134e14816..05acf9a8c 100644 --- a/test/Ocelot.AcceptanceTests/AuthorizationTests.cs +++ b/test/Ocelot.AcceptanceTests/AuthorizationTests.cs @@ -6,6 +6,8 @@ namespace Ocelot.AcceptanceTests using System.Net; using System.Security.Claims; + using Configuration.File; + using IdentityServer4.AccessTokenValidation; using IdentityServer4.Models; using IdentityServer4.Test; @@ -15,8 +17,6 @@ namespace Ocelot.AcceptanceTests using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; - using Configuration.File; - using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs b/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs index 7c7ca23e0..d1b97698f 100644 --- a/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs +++ b/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs @@ -7,12 +7,12 @@ namespace Ocelot.AcceptanceTests using Butterfly.Client.AspNetCore; + using Configuration.File; + using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; - using Configuration.File; - using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/CaseSensitiveRoutingTests.cs b/test/Ocelot.AcceptanceTests/CaseSensitiveRoutingTests.cs index 09363d694..57d444e82 100644 --- a/test/Ocelot.AcceptanceTests/CaseSensitiveRoutingTests.cs +++ b/test/Ocelot.AcceptanceTests/CaseSensitiveRoutingTests.cs @@ -4,10 +4,10 @@ namespace Ocelot.AcceptanceTests using System.Collections.Generic; using System.Net; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/ClaimsToDownstreamPathTests.cs b/test/Ocelot.AcceptanceTests/ClaimsToDownstreamPathTests.cs index 2634ae7bf..48f432d6c 100644 --- a/test/Ocelot.AcceptanceTests/ClaimsToDownstreamPathTests.cs +++ b/test/Ocelot.AcceptanceTests/ClaimsToDownstreamPathTests.cs @@ -7,6 +7,8 @@ namespace Ocelot.AcceptanceTests using System.IO; using System.Net; + using Configuration.File; + using IdentityServer4.AccessTokenValidation; using IdentityServer4.Models; using IdentityServer4.Test; @@ -16,8 +18,6 @@ namespace Ocelot.AcceptanceTests using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; - using Configuration.File; - using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/ClaimsToHeadersForwardingTests.cs b/test/Ocelot.AcceptanceTests/ClaimsToHeadersForwardingTests.cs index cf306840b..87beeec6e 100644 --- a/test/Ocelot.AcceptanceTests/ClaimsToHeadersForwardingTests.cs +++ b/test/Ocelot.AcceptanceTests/ClaimsToHeadersForwardingTests.cs @@ -11,6 +11,8 @@ namespace Ocelot.AcceptanceTests using System.Net; using System.Security.Claims; + using Configuration.File; + using IdentityServer4.AccessTokenValidation; using IdentityServer4.Models; using IdentityServer4.Test; @@ -20,8 +22,6 @@ namespace Ocelot.AcceptanceTests using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; - using Configuration.File; - using TestStack.BDDfy; public class ClaimsToHeadersForwardingTests : IDisposable diff --git a/test/Ocelot.AcceptanceTests/ClaimsToQueryStringForwardingTests.cs b/test/Ocelot.AcceptanceTests/ClaimsToQueryStringForwardingTests.cs index 49feb83cf..8f925a2e4 100644 --- a/test/Ocelot.AcceptanceTests/ClaimsToQueryStringForwardingTests.cs +++ b/test/Ocelot.AcceptanceTests/ClaimsToQueryStringForwardingTests.cs @@ -6,6 +6,8 @@ using System.Net; using System.Security.Claims; + using Configuration.File; + using IdentityServer4.AccessTokenValidation; using IdentityServer4.Models; using IdentityServer4.Test; @@ -14,7 +16,6 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; - using Configuration.File; using Shouldly; diff --git a/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs b/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs index f7f5f9e6a..2acf7fe03 100644 --- a/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs +++ b/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs @@ -4,10 +4,10 @@ using System.Collections.Generic; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/ContentTests.cs b/test/Ocelot.AcceptanceTests/ContentTests.cs index 4a92c43c3..4e9e1baaf 100644 --- a/test/Ocelot.AcceptanceTests/ContentTests.cs +++ b/test/Ocelot.AcceptanceTests/ContentTests.cs @@ -4,10 +4,10 @@ namespace Ocelot.AcceptanceTests using System.Collections.Generic; using System.Net; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs b/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs index ff6fdd328..16e77cb56 100644 --- a/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs +++ b/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs @@ -6,9 +6,10 @@ using System.Net; using System.Threading.Tasks; + using Configuration.File; + using Microsoft.AspNetCore.Http; - using Configuration.File; using Middleware; using Shouldly; diff --git a/test/Ocelot.AcceptanceTests/EurekaServiceDiscoveryTests.cs b/test/Ocelot.AcceptanceTests/EurekaServiceDiscoveryTests.cs index a01154d00..792fbec6a 100644 --- a/test/Ocelot.AcceptanceTests/EurekaServiceDiscoveryTests.cs +++ b/test/Ocelot.AcceptanceTests/EurekaServiceDiscoveryTests.cs @@ -4,12 +4,12 @@ using System.Collections.Generic; using System.Net; + using Configuration.File; + using Microsoft.AspNetCore.Http; using Newtonsoft.Json; - using Configuration.File; - using Steeltoe.Common.Discovery; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/HeaderTests.cs b/test/Ocelot.AcceptanceTests/HeaderTests.cs index b22812250..8661b4fc9 100644 --- a/test/Ocelot.AcceptanceTests/HeaderTests.cs +++ b/test/Ocelot.AcceptanceTests/HeaderTests.cs @@ -6,10 +6,10 @@ namespace Ocelot.AcceptanceTests using System.Net; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/HttpClientCachingTests.cs b/test/Ocelot.AcceptanceTests/HttpClientCachingTests.cs index 9e56db29a..401140754 100644 --- a/test/Ocelot.AcceptanceTests/HttpClientCachingTests.cs +++ b/test/Ocelot.AcceptanceTests/HttpClientCachingTests.cs @@ -6,11 +6,10 @@ namespace Ocelot.AcceptanceTests using System.Net; using Configuration; + using Configuration.File; using Microsoft.AspNetCore.Http; - using Configuration.File; - using Requester; using Shouldly; diff --git a/test/Ocelot.AcceptanceTests/HttpDelegatingHandlersTests.cs b/test/Ocelot.AcceptanceTests/HttpDelegatingHandlersTests.cs index 325d137d6..bfbfae1e7 100644 --- a/test/Ocelot.AcceptanceTests/HttpDelegatingHandlersTests.cs +++ b/test/Ocelot.AcceptanceTests/HttpDelegatingHandlersTests.cs @@ -7,10 +7,10 @@ using System.Threading; using System.Threading.Tasks; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/HttpTests.cs b/test/Ocelot.AcceptanceTests/HttpTests.cs index ff08de645..e13567ae0 100644 --- a/test/Ocelot.AcceptanceTests/HttpTests.cs +++ b/test/Ocelot.AcceptanceTests/HttpTests.cs @@ -6,11 +6,11 @@ namespace Ocelot.AcceptanceTests using System.Net; using System.Net.Http; + using Configuration.File; + using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Server.Kestrel.Core; - using Configuration.File; - using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/LoadBalancerTests.cs b/test/Ocelot.AcceptanceTests/LoadBalancerTests.cs index 407989157..872cc2a58 100644 --- a/test/Ocelot.AcceptanceTests/LoadBalancerTests.cs +++ b/test/Ocelot.AcceptanceTests/LoadBalancerTests.cs @@ -5,12 +5,12 @@ namespace Ocelot.AcceptanceTests using System.Threading.Tasks; using Configuration; - - using Microsoft.AspNetCore.Http; - using Configuration.File; + using LoadBalancer.LoadBalancers; + using Microsoft.AspNetCore.Http; + using Responses; using ServiceDiscovery.Providers; diff --git a/test/Ocelot.AcceptanceTests/MethodTests.cs b/test/Ocelot.AcceptanceTests/MethodTests.cs index 73464027e..da6e942ee 100644 --- a/test/Ocelot.AcceptanceTests/MethodTests.cs +++ b/test/Ocelot.AcceptanceTests/MethodTests.cs @@ -6,10 +6,10 @@ namespace Ocelot.AcceptanceTests using System.Net; using System.Net.Http; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/OpenTracingTests.cs b/test/Ocelot.AcceptanceTests/OpenTracingTests.cs index 59a59ad0a..ddfe13702 100644 --- a/test/Ocelot.AcceptanceTests/OpenTracingTests.cs +++ b/test/Ocelot.AcceptanceTests/OpenTracingTests.cs @@ -9,12 +9,12 @@ namespace Ocelot.AcceptanceTests using Butterfly.Client.AspNetCore; + using Configuration.File; + using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; - using Configuration.File; - using OpenTracing; using OpenTracing.Propagation; using OpenTracing.Tag; diff --git a/test/Ocelot.AcceptanceTests/ReasonPhraseTests.cs b/test/Ocelot.AcceptanceTests/ReasonPhraseTests.cs index 760c6c50f..15430af3d 100644 --- a/test/Ocelot.AcceptanceTests/ReasonPhraseTests.cs +++ b/test/Ocelot.AcceptanceTests/ReasonPhraseTests.cs @@ -3,11 +3,11 @@ namespace Ocelot.AcceptanceTests using System; using System.Collections.Generic; + using Configuration.File; + using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; - using Configuration.File; - using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/RoutingTests.cs b/test/Ocelot.AcceptanceTests/RoutingTests.cs index 97a35bc3e..7c5e2c414 100644 --- a/test/Ocelot.AcceptanceTests/RoutingTests.cs +++ b/test/Ocelot.AcceptanceTests/RoutingTests.cs @@ -4,10 +4,10 @@ namespace Ocelot.AcceptanceTests using System.Collections.Generic; using System.Net; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/RoutingWithQueryStringTests.cs b/test/Ocelot.AcceptanceTests/RoutingWithQueryStringTests.cs index 590e3ab10..21b75b81b 100644 --- a/test/Ocelot.AcceptanceTests/RoutingWithQueryStringTests.cs +++ b/test/Ocelot.AcceptanceTests/RoutingWithQueryStringTests.cs @@ -4,10 +4,10 @@ namespace Ocelot.AcceptanceTests using System.Collections.Generic; using System.Net; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/ServiceFabricTests.cs b/test/Ocelot.AcceptanceTests/ServiceFabricTests.cs index d935953d3..66c441e4d 100644 --- a/test/Ocelot.AcceptanceTests/ServiceFabricTests.cs +++ b/test/Ocelot.AcceptanceTests/ServiceFabricTests.cs @@ -4,10 +4,10 @@ namespace Ocelot.AcceptanceTests using System.Collections.Generic; using System.Net; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/SslTests.cs b/test/Ocelot.AcceptanceTests/SslTests.cs index 2c66d11a3..7965ebf05 100644 --- a/test/Ocelot.AcceptanceTests/SslTests.cs +++ b/test/Ocelot.AcceptanceTests/SslTests.cs @@ -4,10 +4,10 @@ namespace Ocelot.AcceptanceTests using System.Collections.Generic; using System.Net; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.AcceptanceTests/StartupTests.cs b/test/Ocelot.AcceptanceTests/StartupTests.cs index 056a17a72..ceea51386 100644 --- a/test/Ocelot.AcceptanceTests/StartupTests.cs +++ b/test/Ocelot.AcceptanceTests/StartupTests.cs @@ -5,12 +5,11 @@ using System.Net; using System.Threading.Tasks; + using Configuration.File; using Configuration.Repository; using Microsoft.AspNetCore.Http; - using Configuration.File; - using Responses; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/Steps.cs b/test/Ocelot.AcceptanceTests/Steps.cs index 8f30d466e..ef092fef6 100644 --- a/test/Ocelot.AcceptanceTests/Steps.cs +++ b/test/Ocelot.AcceptanceTests/Steps.cs @@ -14,17 +14,23 @@ namespace Ocelot.AcceptanceTests using System.Threading; using System.Threading.Tasks; + using CacheManager.Core; + using Caching; using Configuration; + using Configuration.Creator; + using Configuration.File; using Configuration.Repository; - using CacheManager.Core; + using DependencyInjection; using IdentityServer4.AccessTokenValidation; using LoadBalancer.LoadBalancers; + using Logging; + using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; @@ -32,23 +38,22 @@ namespace Ocelot.AcceptanceTests using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + using Middleware; + using Moq; + using Multiplexer; + using Newtonsoft.Json; using Ocelot.Cache.CacheManager; - using Configuration.Creator; - using Configuration.File; - using DependencyInjection; - using Logging; - using Middleware; - using Multiplexer; using Ocelot.Provider.Consul; - using Provider.Eureka; using Ocelot.Provider.Polly; using Ocelot.Tracing.Butterfly; using Ocelot.Tracing.OpenTracing; + using Provider.Eureka; + using Requester; using ServiceDiscovery.Providers; diff --git a/test/Ocelot.AcceptanceTests/StickySessionsTests.cs b/test/Ocelot.AcceptanceTests/StickySessionsTests.cs index 35400bea3..4a7f23d96 100644 --- a/test/Ocelot.AcceptanceTests/StickySessionsTests.cs +++ b/test/Ocelot.AcceptanceTests/StickySessionsTests.cs @@ -3,10 +3,10 @@ namespace Ocelot.AcceptanceTests using System; using System.Collections.Generic; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs b/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs index d456cee84..6090fa9d5 100644 --- a/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs +++ b/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs @@ -4,10 +4,10 @@ namespace Ocelot.AcceptanceTests using System.Collections.Generic; using System.Net; - using Microsoft.AspNetCore.Http; - using Configuration.File; + using Microsoft.AspNetCore.Http; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.Benchmarks/DictionaryBenchmarks.cs b/test/Ocelot.Benchmarks/DictionaryBenchmarks.cs index 3be12db9c..4254b9ac9 100644 --- a/test/Ocelot.Benchmarks/DictionaryBenchmarks.cs +++ b/test/Ocelot.Benchmarks/DictionaryBenchmarks.cs @@ -10,7 +10,8 @@ namespace Ocelot.Benchmarks using BenchmarkDotNet.Validators; using Configuration; - using Configuration.Builder; + using Configuration.Builder; + using Requester; [Config(typeof(DictionaryBenchmarks))] diff --git a/test/Ocelot.Benchmarks/DownstreamRouteFinderMiddlewareBenchmarks.cs b/test/Ocelot.Benchmarks/DownstreamRouteFinderMiddlewareBenchmarks.cs index 54c20a825..1b92d4067 100644 --- a/test/Ocelot.Benchmarks/DownstreamRouteFinderMiddlewareBenchmarks.cs +++ b/test/Ocelot.Benchmarks/DownstreamRouteFinderMiddlewareBenchmarks.cs @@ -10,17 +10,22 @@ namespace Ocelot.Benchmarks using BenchmarkDotNet.Diagnosers; using BenchmarkDotNet.Validators; - using Microsoft.AspNetCore.Http; - using Microsoft.Extensions.Configuration; - using Microsoft.Extensions.DependencyInjection; - using Configuration; + using DependencyInjection; + using DownstreamRouteFinder.Finder; - using Ocelot.DownstreamRouteFinder.Middleware; + using Logging; + + using Microsoft.AspNetCore.Http; + using Microsoft.Extensions.Configuration; + using Microsoft.Extensions.DependencyInjection; + using Middleware; + using Ocelot.DownstreamRouteFinder.Middleware; + [SimpleJob(launchCount: 1, warmupCount: 2, targetCount: 5)] [Config(typeof(DownstreamRouteFinderMiddlewareBenchmarks))] public class DownstreamRouteFinderMiddlewareBenchmarks : ManualConfig diff --git a/test/Ocelot.Benchmarks/ExceptionHandlerMiddlewareBenchmarks.cs b/test/Ocelot.Benchmarks/ExceptionHandlerMiddlewareBenchmarks.cs index ca1491b47..c751b3e0e 100644 --- a/test/Ocelot.Benchmarks/ExceptionHandlerMiddlewareBenchmarks.cs +++ b/test/Ocelot.Benchmarks/ExceptionHandlerMiddlewareBenchmarks.cs @@ -10,14 +10,17 @@ namespace Ocelot.Benchmarks using BenchmarkDotNet.Diagnosers; using BenchmarkDotNet.Validators; + using DependencyInjection; + + using Infrastructure.RequestData; + + using Logging; + using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; - using DependencyInjection; using Ocelot.Errors.Middleware; - using Infrastructure.RequestData; - using Logging; [SimpleJob(launchCount: 1, warmupCount: 2, targetCount: 5)] [Config(typeof(ExceptionHandlerMiddlewareBenchmarks))] diff --git a/test/Ocelot.IntegrationTests/CacheManagerTests.cs b/test/Ocelot.IntegrationTests/CacheManagerTests.cs index ecced851c..30380bc06 100644 --- a/test/Ocelot.IntegrationTests/CacheManagerTests.cs +++ b/test/Ocelot.IntegrationTests/CacheManagerTests.cs @@ -6,22 +6,25 @@ namespace Ocelot.IntegrationTests using System.Net; using System.Net.Http; using System.Net.Http.Headers; - + + using Administration; + + using CacheManager.Core; + using Configuration.File; - + using DependencyInjection; - - using CacheManager.Core; - + using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; + + using Middleware; + using Newtonsoft.Json; - using Administration; using Ocelot.Cache.CacheManager; - using Middleware; using Shouldly; diff --git a/test/Ocelot.IntegrationTests/HeaderTests.cs b/test/Ocelot.IntegrationTests/HeaderTests.cs index 227c79b4e..16be9d761 100644 --- a/test/Ocelot.IntegrationTests/HeaderTests.cs +++ b/test/Ocelot.IntegrationTests/HeaderTests.cs @@ -12,17 +12,19 @@ namespace Ocelot.IntegrationTests using System.Net.Http; using System.Threading.Tasks; + using Configuration.File; + + using DependencyInjection; + using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; - using Newtonsoft.Json; - - using Configuration.File; - using DependencyInjection; using Middleware; + using Newtonsoft.Json; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.ManualTest/Program.cs b/test/Ocelot.ManualTest/Program.cs index 9218d1f3a..2926862a0 100644 --- a/test/Ocelot.ManualTest/Program.cs +++ b/test/Ocelot.ManualTest/Program.cs @@ -8,12 +8,13 @@ namespace Ocelot.ManualTest using System.Threading; using System.Threading.Tasks; + using DependencyInjection; + using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; - using DependencyInjection; using Middleware; public class Program diff --git a/test/Ocelot.UnitTests/Authorization/AuthorizationMiddlewareTests.cs b/test/Ocelot.UnitTests/Authorization/AuthorizationMiddlewareTests.cs index 846622bca..d1e9b49d2 100644 --- a/test/Ocelot.UnitTests/Authorization/AuthorizationMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Authorization/AuthorizationMiddlewareTests.cs @@ -16,6 +16,7 @@ namespace Ocelot.UnitTests.Authorization using Ocelot.DownstreamRouteFinder.UrlMatcher; using Ocelot.Logging; using Ocelot.Middleware; + using Responses; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Claims/ClaimsToClaimsMiddlewareTests.cs b/test/Ocelot.UnitTests/Claims/ClaimsToClaimsMiddlewareTests.cs index ffb1c544e..af8b0d1c1 100644 --- a/test/Ocelot.UnitTests/Claims/ClaimsToClaimsMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Claims/ClaimsToClaimsMiddlewareTests.cs @@ -15,6 +15,7 @@ namespace Ocelot.UnitTests.Claims using Ocelot.Configuration.Builder; using Ocelot.DownstreamRouteFinder.UrlMatcher; using Ocelot.Logging; + using Responses; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Configuration/FileInternalConfigurationCreatorTests.cs b/test/Ocelot.UnitTests/Configuration/FileInternalConfigurationCreatorTests.cs index 56342a09b..09b7bdf7d 100644 --- a/test/Ocelot.UnitTests/Configuration/FileInternalConfigurationCreatorTests.cs +++ b/test/Ocelot.UnitTests/Configuration/FileInternalConfigurationCreatorTests.cs @@ -12,9 +12,11 @@ using Ocelot.Configuration.File; using Ocelot.Configuration.Validator; using Ocelot.Errors; - using Responses; + using Responder; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Configuration/RoutesCreatorTests.cs b/test/Ocelot.UnitTests/Configuration/RoutesCreatorTests.cs index c7a9c1499..a1acb21dd 100644 --- a/test/Ocelot.UnitTests/Configuration/RoutesCreatorTests.cs +++ b/test/Ocelot.UnitTests/Configuration/RoutesCreatorTests.cs @@ -11,12 +11,13 @@ using Ocelot.Configuration.Builder; using Ocelot.Configuration.Creator; using Ocelot.Configuration.File; - using Values; using Shouldly; using TestStack.BDDfy; + using Values; + using Xunit; public class RoutesCreatorTests diff --git a/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs b/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs index 29abffc93..05f8a8964 100644 --- a/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs +++ b/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs @@ -14,20 +14,24 @@ namespace Ocelot.UnitTests.DependencyInjection using Moq; + using Multiplexer; + using Ocelot.Configuration.Setter; using Ocelot.DependencyInjection; using Ocelot.Infrastructure; using Ocelot.LoadBalancer.LoadBalancers; - using Multiplexer; using Ocelot.Requester; - using Responses; + using Requester; - using Values; + + using Responses; using Shouldly; using TestStack.BDDfy; + using Values; + using Xunit; using static Multiplexing.UserDefinedResponseAggregatorTests; diff --git a/test/Ocelot.UnitTests/DownstreamPathManipulation/ClaimsToDownstreamPathMiddlewareTests.cs b/test/Ocelot.UnitTests/DownstreamPathManipulation/ClaimsToDownstreamPathMiddlewareTests.cs index c0883a96f..e996db5d2 100644 --- a/test/Ocelot.UnitTests/DownstreamPathManipulation/ClaimsToDownstreamPathMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/DownstreamPathManipulation/ClaimsToDownstreamPathMiddlewareTests.cs @@ -14,13 +14,16 @@ namespace Ocelot.UnitTests.DownstreamPathManipulation using Ocelot.DownstreamRouteFinder.UrlMatcher; using Ocelot.Logging; using Ocelot.Middleware; - using PathManipulation; using Ocelot.Request.Middleware; + + using PathManipulation; + using Responses; - using Values; using TestStack.BDDfy; + using Values; + using Xunit; public class ClaimsToDownstreamPathMiddlewareTests diff --git a/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderMiddlewareTests.cs b/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderMiddlewareTests.cs index 7687a0c00..7084e04aa 100644 --- a/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderMiddlewareTests.cs @@ -16,6 +16,7 @@ using Ocelot.DownstreamRouteFinder.UrlMatcher; using Ocelot.Logging; using Ocelot.Middleware; + using Responses; using Shouldly; diff --git a/test/Ocelot.UnitTests/DownstreamUrlCreator/DownstreamUrlCreatorMiddlewareTests.cs b/test/Ocelot.UnitTests/DownstreamUrlCreator/DownstreamUrlCreatorMiddlewareTests.cs index 525420120..638814c6f 100644 --- a/test/Ocelot.UnitTests/DownstreamUrlCreator/DownstreamUrlCreatorMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/DownstreamUrlCreator/DownstreamUrlCreatorMiddlewareTests.cs @@ -19,13 +19,15 @@ using Ocelot.Logging; using Ocelot.Middleware; using Ocelot.Request.Middleware; + using Responses; - using Values; using Shouldly; using TestStack.BDDfy; + using Values; + using Xunit; public class DownstreamUrlCreatorMiddlewareTests diff --git a/test/Ocelot.UnitTests/Eureka/EurekaMiddlewareConfigurationProviderTests.cs b/test/Ocelot.UnitTests/Eureka/EurekaMiddlewareConfigurationProviderTests.cs index 83fe84c7b..4e35f5978 100644 --- a/test/Ocelot.UnitTests/Eureka/EurekaMiddlewareConfigurationProviderTests.cs +++ b/test/Ocelot.UnitTests/Eureka/EurekaMiddlewareConfigurationProviderTests.cs @@ -11,6 +11,7 @@ using Ocelot.Configuration.Builder; using Ocelot.Configuration.Repository; using Ocelot.Provider.Eureka; + using Responses; using Shouldly; diff --git a/test/Ocelot.UnitTests/Eureka/EurekaServiceDiscoveryProviderTests.cs b/test/Ocelot.UnitTests/Eureka/EurekaServiceDiscoveryProviderTests.cs index 3e26ed44b..ff7805968 100644 --- a/test/Ocelot.UnitTests/Eureka/EurekaServiceDiscoveryProviderTests.cs +++ b/test/Ocelot.UnitTests/Eureka/EurekaServiceDiscoveryProviderTests.cs @@ -7,7 +7,6 @@ using Moq; using Ocelot.Provider.Eureka; - using Values; using Shouldly; @@ -16,6 +15,8 @@ using TestStack.BDDfy; + using Values; + using Xunit; public class EurekaServiceDiscoveryProviderTests diff --git a/test/Ocelot.UnitTests/Headers/ClaimsToHeadersMiddlewareTests.cs b/test/Ocelot.UnitTests/Headers/ClaimsToHeadersMiddlewareTests.cs index 596b01847..fdc9ec206 100644 --- a/test/Ocelot.UnitTests/Headers/ClaimsToHeadersMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Headers/ClaimsToHeadersMiddlewareTests.cs @@ -16,6 +16,7 @@ using Ocelot.Logging; using Ocelot.Middleware; using Ocelot.Request.Middleware; + using Responses; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Headers/HttpContextRequestHeaderReplacerTests.cs b/test/Ocelot.UnitTests/Headers/HttpContextRequestHeaderReplacerTests.cs index 4d9bcd956..0b04883b6 100644 --- a/test/Ocelot.UnitTests/Headers/HttpContextRequestHeaderReplacerTests.cs +++ b/test/Ocelot.UnitTests/Headers/HttpContextRequestHeaderReplacerTests.cs @@ -32,7 +32,7 @@ public void should_replace_headers() var context = new DefaultHttpContext(); context.Request.Headers.Add("test", "test"); - var fAndRs = new List {new("test", "test", "chiken", 0)}; + var fAndRs = new List { new("test", "test", "chiken", 0) }; this.Given(x => GivenTheFollowingHttpRequest(context)) .And(x => GivenTheFollowingHeaderReplacements(fAndRs)) diff --git a/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs b/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs index ebecb922e..72400a778 100644 --- a/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs +++ b/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs @@ -15,6 +15,7 @@ namespace Ocelot.UnitTests.Headers using Ocelot.Infrastructure.RequestData; using Ocelot.Middleware; using Ocelot.Request.Middleware; + using Responses; using Shouldly; diff --git a/test/Ocelot.UnitTests/Infrastructure/PlaceholdersTests.cs b/test/Ocelot.UnitTests/Infrastructure/PlaceholdersTests.cs index 726bbb310..65b8f7227 100644 --- a/test/Ocelot.UnitTests/Infrastructure/PlaceholdersTests.cs +++ b/test/Ocelot.UnitTests/Infrastructure/PlaceholdersTests.cs @@ -12,6 +12,7 @@ namespace Ocelot.UnitTests.Infrastructure using Ocelot.Infrastructure.RequestData; using Ocelot.Middleware; using Ocelot.Request.Middleware; + using Responses; using Shouldly; diff --git a/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsCreatorTests.cs b/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsCreatorTests.cs index 3f78159f9..83d3657a6 100644 --- a/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsCreatorTests.cs +++ b/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsCreatorTests.cs @@ -5,9 +5,10 @@ using Ocelot.Configuration; using Ocelot.Configuration.Builder; using Ocelot.LoadBalancer.LoadBalancers; - using Responses; using Ocelot.ServiceDiscovery.Providers; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsTests.cs b/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsTests.cs index 56878fbd3..6989c221c 100644 --- a/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsTests.cs +++ b/test/Ocelot.UnitTests/LoadBalancer/CookieStickySessionsTests.cs @@ -11,14 +11,17 @@ namespace Ocelot.UnitTests.LoadBalancer using Ocelot.Infrastructure; using Ocelot.LoadBalancer.LoadBalancers; - using Responses; + using Responder; - using Values; + + using Responses; using Shouldly; using TestStack.BDDfy; + using Values; + using Xunit; public class CookieStickySessionsTests diff --git a/test/Ocelot.UnitTests/LoadBalancer/LeastConnectionCreatorTests.cs b/test/Ocelot.UnitTests/LoadBalancer/LeastConnectionCreatorTests.cs index 11b728d7b..0934e7e12 100644 --- a/test/Ocelot.UnitTests/LoadBalancer/LeastConnectionCreatorTests.cs +++ b/test/Ocelot.UnitTests/LoadBalancer/LeastConnectionCreatorTests.cs @@ -5,9 +5,10 @@ using Ocelot.Configuration; using Ocelot.Configuration.Builder; using Ocelot.LoadBalancer.LoadBalancers; - using Responses; using Ocelot.ServiceDiscovery.Providers; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerMiddlewareTests.cs b/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerMiddlewareTests.cs index af6160803..6aaff560b 100644 --- a/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerMiddlewareTests.cs @@ -18,13 +18,15 @@ namespace Ocelot.UnitTests.LoadBalancer using Ocelot.Logging; using Ocelot.Middleware; using Ocelot.Request.Middleware; + using Responses; - using Values; using Shouldly; using TestStack.BDDfy; + using Values; + using Xunit; public class LoadBalancerMiddlewareTests diff --git a/test/Ocelot.UnitTests/LoadBalancer/NoLoadBalancerCreatorTests.cs b/test/Ocelot.UnitTests/LoadBalancer/NoLoadBalancerCreatorTests.cs index 9e3210ac5..18a7e7820 100644 --- a/test/Ocelot.UnitTests/LoadBalancer/NoLoadBalancerCreatorTests.cs +++ b/test/Ocelot.UnitTests/LoadBalancer/NoLoadBalancerCreatorTests.cs @@ -5,9 +5,10 @@ using Ocelot.Configuration; using Ocelot.Configuration.Builder; using Ocelot.LoadBalancer.LoadBalancers; - using Responses; using Ocelot.ServiceDiscovery.Providers; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/LoadBalancer/RoundRobinCreatorTests.cs b/test/Ocelot.UnitTests/LoadBalancer/RoundRobinCreatorTests.cs index 4a370d205..3a0248e83 100644 --- a/test/Ocelot.UnitTests/LoadBalancer/RoundRobinCreatorTests.cs +++ b/test/Ocelot.UnitTests/LoadBalancer/RoundRobinCreatorTests.cs @@ -5,9 +5,10 @@ using Ocelot.Configuration; using Ocelot.Configuration.Builder; using Ocelot.LoadBalancer.LoadBalancers; - using Responses; using Ocelot.ServiceDiscovery.Providers; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Multiplexing/MultiplexingMiddlewareTests.cs b/test/Ocelot.UnitTests/Multiplexing/MultiplexingMiddlewareTests.cs index fd0126305..ba2723af0 100644 --- a/test/Ocelot.UnitTests/Multiplexing/MultiplexingMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Multiplexing/MultiplexingMiddlewareTests.cs @@ -7,12 +7,13 @@ using Moq; + using Multiplexer; + using Ocelot.Configuration; using Ocelot.Configuration.Builder; using Ocelot.DownstreamRouteFinder.UrlMatcher; using Ocelot.Logging; using Ocelot.Middleware; - using Multiplexer; using Shouldly; diff --git a/test/Ocelot.UnitTests/Multiplexing/ResponseAggregatorFactoryTests.cs b/test/Ocelot.UnitTests/Multiplexing/ResponseAggregatorFactoryTests.cs index 5feda8c5b..d0acc21db 100644 --- a/test/Ocelot.UnitTests/Multiplexing/ResponseAggregatorFactoryTests.cs +++ b/test/Ocelot.UnitTests/Multiplexing/ResponseAggregatorFactoryTests.cs @@ -2,9 +2,10 @@ namespace Ocelot.UnitTests.Multiplexing { using Moq; + using Multiplexer; + using Ocelot.Configuration; using Ocelot.Configuration.Builder; - using Multiplexer; using Shouldly; diff --git a/test/Ocelot.UnitTests/Multiplexing/UserDefinedResponseAggregatorTests.cs b/test/Ocelot.UnitTests/Multiplexing/UserDefinedResponseAggregatorTests.cs index efb391dd4..031ad9a66 100644 --- a/test/Ocelot.UnitTests/Multiplexing/UserDefinedResponseAggregatorTests.cs +++ b/test/Ocelot.UnitTests/Multiplexing/UserDefinedResponseAggregatorTests.cs @@ -10,13 +10,16 @@ namespace Ocelot.UnitTests.Multiplexing using Moq; + using Multiplexer; + using Ocelot.Configuration; using Ocelot.Configuration.Builder; using Ocelot.Middleware; - using Multiplexer; - using Responses; + using Responder; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/QueryStrings/ClaimsToQueryStringMiddlewareTests.cs b/test/Ocelot.UnitTests/QueryStrings/ClaimsToQueryStringMiddlewareTests.cs index e709cd516..829355b64 100644 --- a/test/Ocelot.UnitTests/QueryStrings/ClaimsToQueryStringMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/QueryStrings/ClaimsToQueryStringMiddlewareTests.cs @@ -19,6 +19,7 @@ namespace Ocelot.UnitTests.QueryStrings using Ocelot.QueryStrings; using Ocelot.QueryStrings.Middleware; using Ocelot.Request.Middleware; + using Responses; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Request/DownstreamRequestInitialiserMiddlewareTests.cs b/test/Ocelot.UnitTests/Request/DownstreamRequestInitialiserMiddlewareTests.cs index 8f4cf5ab8..b1f9dd4b9 100644 --- a/test/Ocelot.UnitTests/Request/DownstreamRequestInitialiserMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Request/DownstreamRequestInitialiserMiddlewareTests.cs @@ -14,6 +14,7 @@ using Ocelot.Request.Creator; using Ocelot.Request.Mapper; using Ocelot.Request.Middleware; + using Responses; using Shouldly; diff --git a/test/Ocelot.UnitTests/RequestId/RequestIdMiddlewareTests.cs b/test/Ocelot.UnitTests/RequestId/RequestIdMiddlewareTests.cs index 8991348a7..417f0f142 100644 --- a/test/Ocelot.UnitTests/RequestId/RequestIdMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/RequestId/RequestIdMiddlewareTests.cs @@ -18,6 +18,7 @@ using Ocelot.Middleware; using Ocelot.Request.Middleware; using Ocelot.RequestId.Middleware; + using Responses; using Shouldly; diff --git a/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs b/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs index 58e6035fd..1a9ce1725 100644 --- a/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs +++ b/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs @@ -13,10 +13,11 @@ namespace Ocelot.UnitTests.Requester using Ocelot.Logging; using Ocelot.Requester; using Ocelot.Requester.QoS; - using Responses; using Responder; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Requester/HttpRequesterMiddlewareTests.cs b/test/Ocelot.UnitTests/Requester/HttpRequesterMiddlewareTests.cs index 9b60a3bb1..145ae7d11 100644 --- a/test/Ocelot.UnitTests/Requester/HttpRequesterMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Requester/HttpRequesterMiddlewareTests.cs @@ -14,9 +14,11 @@ namespace Ocelot.UnitTests.Requester using Ocelot.Middleware; using Ocelot.Requester; using Ocelot.Requester.Middleware; - using Responses; + using Responder; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/Security/IPSecurityPolicyTests.cs b/test/Ocelot.UnitTests/Security/IPSecurityPolicyTests.cs index af159c700..a5c1e246c 100644 --- a/test/Ocelot.UnitTests/Security/IPSecurityPolicyTests.cs +++ b/test/Ocelot.UnitTests/Security/IPSecurityPolicyTests.cs @@ -10,9 +10,10 @@ using Ocelot.Configuration.Builder; using Ocelot.Middleware; using Ocelot.Request.Middleware; - using Responses; using Ocelot.Security.IPSecurity; + using Responses; + using TestStack.BDDfy; using Xunit; diff --git a/test/Ocelot.UnitTests/ServiceDiscovery/ServiceDiscoveryProviderFactoryTests.cs b/test/Ocelot.UnitTests/ServiceDiscovery/ServiceDiscoveryProviderFactoryTests.cs index 9f6c94332..f47e5059f 100644 --- a/test/Ocelot.UnitTests/ServiceDiscovery/ServiceDiscoveryProviderFactoryTests.cs +++ b/test/Ocelot.UnitTests/ServiceDiscovery/ServiceDiscoveryProviderFactoryTests.cs @@ -11,10 +11,11 @@ namespace Ocelot.UnitTests.ServiceDiscovery using Ocelot.Configuration; using Ocelot.Configuration.Builder; using Ocelot.Logging; - using Responses; using Ocelot.ServiceDiscovery; using Ocelot.ServiceDiscovery.Providers; + using Responses; + using Shouldly; using TestStack.BDDfy; diff --git a/test/Ocelot.UnitTests/ServiceDiscovery/ServiceFabricServiceDiscoveryProviderTests.cs b/test/Ocelot.UnitTests/ServiceDiscovery/ServiceFabricServiceDiscoveryProviderTests.cs index e8b45c925..c2a921c7f 100644 --- a/test/Ocelot.UnitTests/ServiceDiscovery/ServiceFabricServiceDiscoveryProviderTests.cs +++ b/test/Ocelot.UnitTests/ServiceDiscovery/ServiceFabricServiceDiscoveryProviderTests.cs @@ -4,12 +4,13 @@ using Ocelot.ServiceDiscovery.Configuration; using Ocelot.ServiceDiscovery.Providers; - using Values; using Shouldly; using TestStack.BDDfy; + using Values; + using Xunit; public class ServiceFabricServiceDiscoveryProviderTests