示例#1
0
 public DownstreamReRoute(
     string key,
     PathTemplate upstreamPathTemplate,
     List <HeaderFindAndReplace> upstreamHeadersFindAndReplace,
     List <HeaderFindAndReplace> downstreamHeadersFindAndReplace,
     List <DownstreamHostAndPort> downstreamAddresses,
     string serviceName,
     HttpHandlerOptions httpHandlerOptions,
     bool useServiceDiscovery,
     bool enableEndpointEndpointRateLimiting,
     QoSOptions qosOptions,
     string downstreamScheme,
     string requestIdKey,
     bool isCached,
     CacheOptions cacheOptions,
     LoadBalancerOptions loadBalancerOptions,
     RateLimitOptions rateLimitOptions,
     Dictionary <string, string> routeClaimsRequirement,
     List <ClaimToThing> claimsToQueries,
     List <ClaimToThing> claimsToHeaders,
     List <ClaimToThing> claimsToClaims,
     bool isAuthenticated,
     bool isAuthorised,
     AuthenticationOptions authenticationOptions,
     PathTemplate downstreamPathTemplate,
     string loadBalancerKey,
     List <string> delegatingHandlers,
     List <AddHeader> addHeadersToDownstream,
     List <AddHeader> addHeadersToUpstream,
     bool dangerousAcceptAnyServerCertificateValidator)
 {
     DangerousAcceptAnyServerCertificateValidator = dangerousAcceptAnyServerCertificateValidator;
     AddHeadersToDownstream = addHeadersToDownstream;
     DelegatingHandlers     = delegatingHandlers;
     Key = key;
     UpstreamPathTemplate            = upstreamPathTemplate;
     UpstreamHeadersFindAndReplace   = upstreamHeadersFindAndReplace ?? new List <HeaderFindAndReplace>();
     DownstreamHeadersFindAndReplace = downstreamHeadersFindAndReplace ?? new List <HeaderFindAndReplace>();
     DownstreamAddresses             = downstreamAddresses ?? new List <DownstreamHostAndPort>();
     ServiceName         = serviceName;
     HttpHandlerOptions  = httpHandlerOptions;
     UseServiceDiscovery = useServiceDiscovery;
     EnableEndpointEndpointRateLimiting = enableEndpointEndpointRateLimiting;
     QosOptions             = qosOptions;
     DownstreamScheme       = downstreamScheme;
     RequestIdKey           = requestIdKey;
     IsCached               = isCached;
     CacheOptions           = cacheOptions;
     LoadBalancerOptions    = loadBalancerOptions;
     RateLimitOptions       = rateLimitOptions;
     RouteClaimsRequirement = routeClaimsRequirement;
     ClaimsToQueries        = claimsToQueries ?? new List <ClaimToThing>();
     ClaimsToHeaders        = claimsToHeaders ?? new List <ClaimToThing>();
     ClaimsToClaims         = claimsToClaims ?? new List <ClaimToThing>();
     IsAuthenticated        = isAuthenticated;
     IsAuthorised           = isAuthorised;
     AuthenticationOptions  = authenticationOptions;
     DownstreamPathTemplate = downstreamPathTemplate;
     LoadBalancerKey        = loadBalancerKey;
     AddHeadersToUpstream   = addHeadersToUpstream;
 }
示例#2
0
 public ReRoute(PathTemplate downstreamPathTemplate,
                PathTemplate upstreamPathTemplate,
                List <HttpMethod> upstreamHttpMethod,
                UpstreamPathTemplate upstreamTemplatePattern,
                bool isAuthenticated,
                AuthenticationOptions authenticationOptions,
                List <ClaimToThing> claimsToHeaders,
                List <ClaimToThing> claimsToClaims,
                Dictionary <string, string> routeClaimsRequirement,
                bool isAuthorised,
                List <ClaimToThing> claimsToQueries,
                string requestIdKey,
                bool isCached,
                CacheOptions cacheOptions,
                string downstreamScheme,
                string loadBalancer,
                string downstreamHost,
                int downstreamPort,
                string reRouteKey,
                bool isQos,
                QoSOptions qosOptions,
                bool enableEndpointRateLimiting,
                RateLimitOptions ratelimitOptions,
                HttpHandlerOptions httpHandlerOptions,
                bool useServiceDiscovery,
                string serviceName,
                List <HeaderFindAndReplace> upstreamHeadersFindAndReplace,
                List <HeaderFindAndReplace> downstreamHeadersFindAndReplace)
 {
     DownstreamHeadersFindAndReplace = downstreamHeadersFindAndReplace;
     UpstreamHeadersFindAndReplace   = upstreamHeadersFindAndReplace;
     ServiceName             = serviceName;
     UseServiceDiscovery     = useServiceDiscovery;
     ReRouteKey              = reRouteKey;
     LoadBalancer            = loadBalancer;
     DownstreamHost          = downstreamHost;
     DownstreamPort          = downstreamPort;
     DownstreamPathTemplate  = downstreamPathTemplate;
     UpstreamPathTemplate    = upstreamPathTemplate;
     UpstreamHttpMethod      = upstreamHttpMethod;
     UpstreamTemplatePattern = upstreamTemplatePattern;
     IsAuthenticated         = isAuthenticated;
     AuthenticationOptions   = authenticationOptions;
     RouteClaimsRequirement  = routeClaimsRequirement;
     IsAuthorised            = isAuthorised;
     RequestIdKey            = requestIdKey;
     IsCached        = isCached;
     CacheOptions    = cacheOptions;
     ClaimsToQueries = claimsToQueries
                       ?? new List <ClaimToThing>();
     ClaimsToClaims = claimsToClaims
                      ?? new List <ClaimToThing>();
     ClaimsToHeaders = claimsToHeaders
                       ?? new List <ClaimToThing>();
     DownstreamScheme  = downstreamScheme;
     IsQos             = isQos;
     QosOptionsOptions = qosOptions;
     EnableEndpointEndpointRateLimiting = enableEndpointRateLimiting;
     RateLimitOptions   = ratelimitOptions;
     HttpHandlerOptions = httpHandlerOptions;
 }