mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	removed library namespace
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Handler
 | 
			
		||||
namespace Ocelot.Authentication.Handler
 | 
			
		||||
{
 | 
			
		||||
    public class AuthenticationHandler
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
using IdentityServer4.AccessTokenValidation;
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Handler.Creator
 | 
			
		||||
namespace Ocelot.Authentication.Handler.Creator
 | 
			
		||||
{
 | 
			
		||||
    using AuthenticationOptions = Configuration.AuthenticationOptions;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Handler.Creator
 | 
			
		||||
namespace Ocelot.Authentication.Handler.Creator
 | 
			
		||||
{
 | 
			
		||||
    using AuthenticationOptions = Configuration.AuthenticationOptions;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
using Ocelot.Library.Authentication.Handler.Creator;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Authentication.Handler.Creator;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Handler.Factory
 | 
			
		||||
namespace Ocelot.Authentication.Handler.Factory
 | 
			
		||||
{
 | 
			
		||||
    using AuthenticationOptions = Configuration.AuthenticationOptions;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Handler.Factory
 | 
			
		||||
namespace Ocelot.Authentication.Handler.Factory
 | 
			
		||||
{
 | 
			
		||||
    using AuthenticationOptions = Configuration.AuthenticationOptions;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Handler.Factory
 | 
			
		||||
namespace Ocelot.Authentication.Handler.Factory
 | 
			
		||||
{
 | 
			
		||||
    public class UnableToCreateAuthenticationHandlerError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.Authentication.Handler
 | 
			
		||||
namespace Ocelot.Authentication.Handler
 | 
			
		||||
{
 | 
			
		||||
    public enum SupportedAuthenticationProviders
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,14 +2,14 @@
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Authentication.Handler.Factory;
 | 
			
		||||
using Ocelot.Library.Configuration;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Library.Middleware;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Ocelot.Authentication.Handler.Factory;
 | 
			
		||||
using Ocelot.Configuration;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Middleware
 | 
			
		||||
namespace Ocelot.Authentication.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class AuthenticationMiddleware : OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Authentication.Middleware
 | 
			
		||||
namespace Ocelot.Authentication.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public static class AuthenticationMiddlewareMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
namespace Ocelot.Library.Configuration
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Configuration
 | 
			
		||||
{
 | 
			
		||||
    public class AuthenticationOptions
 | 
			
		||||
    {
 | 
			
		||||
        public AuthenticationOptions(string provider, string providerRootUrl, string scopeName, bool requireHttps, List<string> additionalScopes, string scopeSecret)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Builder
 | 
			
		||||
namespace Ocelot.Configuration.Builder
 | 
			
		||||
{
 | 
			
		||||
    public class ReRouteBuilder
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.Configuration
 | 
			
		||||
namespace Ocelot.Configuration
 | 
			
		||||
{
 | 
			
		||||
    public class ClaimToHeader
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Creator
 | 
			
		||||
namespace Ocelot.Configuration.Creator
 | 
			
		||||
{
 | 
			
		||||
    public interface IOcelotConfigurationCreator
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,12 +2,12 @@ using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Microsoft.Extensions.Logging;
 | 
			
		||||
using Microsoft.Extensions.Options;
 | 
			
		||||
using Ocelot.Library.Configuration.Parser;
 | 
			
		||||
using Ocelot.Library.Configuration.Validator;
 | 
			
		||||
using Ocelot.Library.Configuration.Yaml;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Configuration.Parser;
 | 
			
		||||
using Ocelot.Configuration.Validator;
 | 
			
		||||
using Ocelot.Configuration.Yaml;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Creator
 | 
			
		||||
namespace Ocelot.Configuration.Creator
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Register as singleton
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
namespace Ocelot.Library.Configuration
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Configuration
 | 
			
		||||
{
 | 
			
		||||
    public interface IOcelotConfiguration
 | 
			
		||||
    {
 | 
			
		||||
        List<ReRoute> ReRoutes { get; }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration
 | 
			
		||||
namespace Ocelot.Configuration
 | 
			
		||||
{
 | 
			
		||||
    public class OcelotConfiguration : IOcelotConfiguration
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,10 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Text.RegularExpressions;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Library.RequestBuilder;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Parser
 | 
			
		||||
namespace Ocelot.Configuration.Parser
 | 
			
		||||
{
 | 
			
		||||
    public class ClaimToHeaderConfigurationParser : IClaimToHeaderConfigurationParser
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Parser
 | 
			
		||||
namespace Ocelot.Configuration.Parser
 | 
			
		||||
{
 | 
			
		||||
    public interface IClaimToHeaderConfigurationParser
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Parser
 | 
			
		||||
namespace Ocelot.Configuration.Parser
 | 
			
		||||
{
 | 
			
		||||
    public class InstructionNotForClaimsError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Parser
 | 
			
		||||
namespace Ocelot.Configuration.Parser
 | 
			
		||||
{
 | 
			
		||||
    public class NoInstructionsError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using System;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Parser
 | 
			
		||||
namespace Ocelot.Configuration.Parser
 | 
			
		||||
{
 | 
			
		||||
    public class ParsingConfigurationHeaderError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Provider
 | 
			
		||||
namespace Ocelot.Configuration.Provider
 | 
			
		||||
{
 | 
			
		||||
    public interface IOcelotConfigurationProvider
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
using Ocelot.Library.Configuration.Creator;
 | 
			
		||||
using Ocelot.Library.Configuration.Repository;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Configuration.Creator;
 | 
			
		||||
using Ocelot.Configuration.Repository;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Provider
 | 
			
		||||
namespace Ocelot.Configuration.Provider
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Register as singleton
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration
 | 
			
		||||
namespace Ocelot.Configuration
 | 
			
		||||
{
 | 
			
		||||
    public class ReRoute
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Repository
 | 
			
		||||
namespace Ocelot.Configuration.Repository
 | 
			
		||||
{
 | 
			
		||||
    public interface IOcelotConfigurationRepository
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Repository
 | 
			
		||||
namespace Ocelot.Configuration.Repository
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Register as singleton
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Validator
 | 
			
		||||
namespace Ocelot.Configuration.Validator
 | 
			
		||||
{
 | 
			
		||||
    public class ConfigurationValidationResult
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,12 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Ocelot.Library.Authentication;
 | 
			
		||||
using Ocelot.Library.Authentication.Handler;
 | 
			
		||||
using Ocelot.Library.Configuration.Yaml;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Authentication.Handler;
 | 
			
		||||
using Ocelot.Configuration.Yaml;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Validator
 | 
			
		||||
namespace Ocelot.Configuration.Validator
 | 
			
		||||
{
 | 
			
		||||
    public class ConfigurationValidator : IConfigurationValidator
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Validator
 | 
			
		||||
namespace Ocelot.Configuration.Validator
 | 
			
		||||
{
 | 
			
		||||
    public class DownstreamTemplateAlreadyUsedError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using Ocelot.Library.Configuration.Yaml;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Configuration.Yaml;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Validator
 | 
			
		||||
namespace Ocelot.Configuration.Validator
 | 
			
		||||
{
 | 
			
		||||
    public interface IConfigurationValidator
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Configuration.Validator
 | 
			
		||||
namespace Ocelot.Configuration.Validator
 | 
			
		||||
{
 | 
			
		||||
    public class UnsupportedAuthenticationProviderError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
namespace Ocelot.Library.Configuration.Yaml
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Configuration.Yaml
 | 
			
		||||
{
 | 
			
		||||
    public class YamlAuthenticationOptions
 | 
			
		||||
    {
 | 
			
		||||
        public string Provider { get; set; }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
namespace Ocelot.Library.Configuration.Yaml
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Configuration.Yaml
 | 
			
		||||
{
 | 
			
		||||
    public class YamlConfiguration
 | 
			
		||||
    {
 | 
			
		||||
        public YamlConfiguration()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
namespace Ocelot.Library.Configuration.Yaml
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Configuration.Yaml
 | 
			
		||||
{
 | 
			
		||||
    public class YamlReRoute
 | 
			
		||||
    {
 | 
			
		||||
        public YamlReRoute()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,31 +1,26 @@
 | 
			
		||||
using Ocelot.Library.Authentication.Handler.Creator;
 | 
			
		||||
using Ocelot.Library.Authentication.Handler.Factory;
 | 
			
		||||
using Ocelot.Library.Configuration.Creator;
 | 
			
		||||
using Ocelot.Library.Configuration.Parser;
 | 
			
		||||
using Ocelot.Library.Configuration.Provider;
 | 
			
		||||
using Ocelot.Library.Configuration.Repository;
 | 
			
		||||
using Ocelot.Library.Configuration.Validator;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder.Finder;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
 | 
			
		||||
using Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer;
 | 
			
		||||
using Ocelot.Library.HeaderBuilder;
 | 
			
		||||
using Ocelot.Library.HeaderBuilder.Parser;
 | 
			
		||||
using Ocelot.Library.RequestBuilder.Builder;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Microsoft.Extensions.Configuration;
 | 
			
		||||
using Microsoft.Extensions.DependencyInjection;
 | 
			
		||||
using Ocelot.Authentication.Handler.Creator;
 | 
			
		||||
using Ocelot.Authentication.Handler.Factory;
 | 
			
		||||
using Ocelot.Configuration.Creator;
 | 
			
		||||
using Ocelot.Configuration.Parser;
 | 
			
		||||
using Ocelot.Configuration.Provider;
 | 
			
		||||
using Ocelot.Configuration.Repository;
 | 
			
		||||
using Ocelot.Configuration.Validator;
 | 
			
		||||
using Ocelot.Configuration.Yaml;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder.Finder;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder.UrlMatcher;
 | 
			
		||||
using Ocelot.DownstreamUrlCreator.UrlTemplateReplacer;
 | 
			
		||||
using Ocelot.HeaderBuilder;
 | 
			
		||||
using Ocelot.HeaderBuilder.Parser;
 | 
			
		||||
using Ocelot.RequestBuilder.Builder;
 | 
			
		||||
using Ocelot.Requester;
 | 
			
		||||
using Ocelot.Responder;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DependencyInjection
 | 
			
		||||
namespace Ocelot.DependencyInjection
 | 
			
		||||
{
 | 
			
		||||
    using Authentication;
 | 
			
		||||
    using Configuration;
 | 
			
		||||
    using Configuration.Yaml;
 | 
			
		||||
    using DownstreamRouteFinder;
 | 
			
		||||
    using Microsoft.AspNetCore.Http;
 | 
			
		||||
    using Microsoft.Extensions.Configuration;
 | 
			
		||||
    using Microsoft.Extensions.DependencyInjection;
 | 
			
		||||
    using RequestBuilder;
 | 
			
		||||
    using Requester;
 | 
			
		||||
    using Responder;
 | 
			
		||||
 | 
			
		||||
    public static class ServiceCollectionExtensions
 | 
			
		||||
    {
 | 
			
		||||
        public static IServiceCollection AddOcelotYamlConfiguration(this IServiceCollection services, IConfigurationRoot configurationRoot)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,9 @@
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Configuration;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder.UrlMatcher;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using Configuration;
 | 
			
		||||
 | 
			
		||||
    public class DownstreamRoute
 | 
			
		||||
    {
 | 
			
		||||
        public DownstreamRoute(List<TemplateVariableNameAndValue> templateVariableNameAndValues, ReRoute reRoute)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,12 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Ocelot.Library.Configuration.Provider;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Configuration.Provider;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder.UrlMatcher;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.Finder
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.Finder
 | 
			
		||||
{
 | 
			
		||||
    public class DownstreamRouteFinder : IDownstreamRouteFinder
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.Finder
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.Finder
 | 
			
		||||
{
 | 
			
		||||
    public interface IDownstreamRouteFinder
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.Finder
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.Finder
 | 
			
		||||
{
 | 
			
		||||
    public class UnableToFindDownstreamRouteError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder.Finder;
 | 
			
		||||
using Ocelot.Library.Middleware;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder.Finder;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.Middleware
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class DownstreamRouteFinderMiddleware : OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.Middleware
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public static class DownstreamRouteFinderMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
{
 | 
			
		||||
    public interface ITemplateVariableNameAndValueFinder
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
{
 | 
			
		||||
    public interface IUrlPathToUrlTemplateMatcher
 | 
			
		||||
     {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using System.Text.RegularExpressions;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
{
 | 
			
		||||
    public class RegExUrlMatcher : IUrlPathToUrlTemplateMatcher
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
{
 | 
			
		||||
    public class TemplateVariableNameAndValue
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
{
 | 
			
		||||
    public class TemplateVariableNameAndValueFinder : ITemplateVariableNameAndValueFinder
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
{
 | 
			
		||||
    public class UrlMatch
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,11 @@
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer;
 | 
			
		||||
using Ocelot.Library.Middleware;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.DownstreamUrlCreator.UrlTemplateReplacer;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamUrlCreator.Middleware
 | 
			
		||||
namespace Ocelot.DownstreamUrlCreator.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class DownstreamUrlCreatorMiddleware : OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamUrlCreator.Middleware
 | 
			
		||||
namespace Ocelot.DownstreamUrlCreator.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public static class DownstreamUrlCreatorMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
using System.Text;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer
 | 
			
		||||
namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer
 | 
			
		||||
{
 | 
			
		||||
    public class DownstreamUrlTemplateVariableReplacer : IDownstreamUrlTemplateVariableReplacer
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer
 | 
			
		||||
namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer
 | 
			
		||||
{
 | 
			
		||||
    public interface IDownstreamUrlTemplateVariableReplacer
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.Errors
 | 
			
		||||
namespace Ocelot.Errors
 | 
			
		||||
{
 | 
			
		||||
    public abstract class Error 
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.Errors
 | 
			
		||||
namespace Ocelot.Errors
 | 
			
		||||
{
 | 
			
		||||
    public enum OcelotErrorCode
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,11 +2,11 @@
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Microsoft.Extensions.Primitives;
 | 
			
		||||
using Ocelot.Library.Configuration;
 | 
			
		||||
using Ocelot.Library.HeaderBuilder.Parser;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Configuration;
 | 
			
		||||
using Ocelot.HeaderBuilder.Parser;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.HeaderBuilder
 | 
			
		||||
namespace Ocelot.HeaderBuilder
 | 
			
		||||
{
 | 
			
		||||
    public class AddHeadersToRequest : IAddHeadersToRequest
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Configuration;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Configuration;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.HeaderBuilder
 | 
			
		||||
namespace Ocelot.HeaderBuilder
 | 
			
		||||
{
 | 
			
		||||
    public interface IAddHeadersToRequest
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,11 @@
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Library.Middleware;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.HeaderBuilder.Middleware
 | 
			
		||||
namespace Ocelot.HeaderBuilder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class HttpRequestHeadersBuilderMiddleware : OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.HeaderBuilder.Middleware
 | 
			
		||||
namespace Ocelot.HeaderBuilder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public static class HttpRequestHeadersBuilderMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.HeaderBuilder.Parser
 | 
			
		||||
namespace Ocelot.HeaderBuilder.Parser
 | 
			
		||||
{
 | 
			
		||||
    public class CannotFindClaimError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Security.Claims;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.HeaderBuilder.Parser
 | 
			
		||||
namespace Ocelot.HeaderBuilder.Parser
 | 
			
		||||
{
 | 
			
		||||
    public class ClaimsParser : IClaimsParser
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Security.Claims;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.HeaderBuilder.Parser
 | 
			
		||||
namespace Ocelot.HeaderBuilder.Parser
 | 
			
		||||
{
 | 
			
		||||
    public interface IClaimsParser
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,9 @@
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Middleware
 | 
			
		||||
namespace Ocelot.Middleware
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using Errors;
 | 
			
		||||
 | 
			
		||||
    public abstract class OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
        private readonly IScopedRequestDataRepository _scopedRequestDataRepository;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,15 +1,14 @@
 | 
			
		||||
using Ocelot.Library.Authentication.Middleware;
 | 
			
		||||
using Ocelot.Library.DownstreamRouteFinder.Middleware;
 | 
			
		||||
using Ocelot.Library.DownstreamUrlCreator.Middleware;
 | 
			
		||||
using Ocelot.Library.HeaderBuilder.Middleware;
 | 
			
		||||
using Ocelot.Library.RequestBuilder.Middleware;
 | 
			
		||||
using Ocelot.Library.Requester.Middleware;
 | 
			
		||||
using Ocelot.Library.Responder.Middleware;
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
using Ocelot.Authentication.Middleware;
 | 
			
		||||
using Ocelot.DownstreamRouteFinder.Middleware;
 | 
			
		||||
using Ocelot.DownstreamUrlCreator.Middleware;
 | 
			
		||||
using Ocelot.HeaderBuilder.Middleware;
 | 
			
		||||
using Ocelot.RequestBuilder.Middleware;
 | 
			
		||||
using Ocelot.Requester.Middleware;
 | 
			
		||||
using Ocelot.Responder.Middleware;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Middleware
 | 
			
		||||
namespace Ocelot.Middleware
 | 
			
		||||
{
 | 
			
		||||
    using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
    public static class OcelotMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
        public static IApplicationBuilder UseOcelot(this IApplicationBuilder builder)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
namespace Ocelot.Library.Middleware
 | 
			
		||||
{
 | 
			
		||||
    using Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class UnauthenticatedError : Error
 | 
			
		||||
    {
 | 
			
		||||
        public UnauthenticatedError(string message) : base(message, OcelotErrorCode.UnauthenticatedError)
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 | 
			
		||||
// associated with an assembly.
 | 
			
		||||
[assembly: AssemblyConfiguration("")]
 | 
			
		||||
[assembly: AssemblyCompany("")]
 | 
			
		||||
[assembly: AssemblyProduct("Ocelot.Library")]
 | 
			
		||||
[assembly: AssemblyProduct("Ocelot")]
 | 
			
		||||
[assembly: AssemblyTrademark("")]
 | 
			
		||||
 | 
			
		||||
// Setting ComVisible to false makes the types in this assembly not visible
 | 
			
		||||
 
 | 
			
		||||
@@ -5,9 +5,9 @@ using System.Net.Http;
 | 
			
		||||
using System.Net.Http.Headers;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.RequestBuilder.Builder
 | 
			
		||||
namespace Ocelot.RequestBuilder.Builder
 | 
			
		||||
{
 | 
			
		||||
    public class HttpRequestBuilder : IRequestBuilder
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
using System.IO;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.RequestBuilder.Builder
 | 
			
		||||
namespace Ocelot.RequestBuilder.Builder
 | 
			
		||||
{
 | 
			
		||||
    public interface IRequestBuilder
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Middleware;
 | 
			
		||||
using Ocelot.Library.RequestBuilder.Builder;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using Ocelot.RequestBuilder.Builder;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.RequestBuilder.Middleware
 | 
			
		||||
namespace Ocelot.RequestBuilder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class HttpRequestBuilderMiddleware : OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.RequestBuilder.Middleware
 | 
			
		||||
namespace Ocelot.RequestBuilder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public static class HttpRequestBuilderMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
namespace Ocelot.Library.RequestBuilder
 | 
			
		||||
{
 | 
			
		||||
    using System.Net;
 | 
			
		||||
    using System.Net.Http;
 | 
			
		||||
using System.Net;
 | 
			
		||||
using System.Net.Http;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.RequestBuilder
 | 
			
		||||
{
 | 
			
		||||
    public class Request
 | 
			
		||||
    {
 | 
			
		||||
        public Request(HttpRequestMessage httpRequestMessage, CookieContainer cookieContainer)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,13 @@
 | 
			
		||||
namespace Ocelot.Library.Requester
 | 
			
		||||
{
 | 
			
		||||
    using System;
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using System.Net.Http;
 | 
			
		||||
    using System.Threading.Tasks;
 | 
			
		||||
    using Errors;
 | 
			
		||||
    using RequestBuilder;
 | 
			
		||||
    using Responses;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Net.Http;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.RequestBuilder;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Requester
 | 
			
		||||
{
 | 
			
		||||
    public class HttpClientHttpRequester : IHttpRequester
 | 
			
		||||
    {
 | 
			
		||||
        public async Task<Response<HttpResponseMessage>> GetResponse(Request request)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
namespace Ocelot.Library.Requester
 | 
			
		||||
{
 | 
			
		||||
    using System.Net.Http;
 | 
			
		||||
    using System.Threading.Tasks;
 | 
			
		||||
    using RequestBuilder;
 | 
			
		||||
    using Responses;
 | 
			
		||||
using System.Net.Http;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Ocelot.RequestBuilder;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Requester
 | 
			
		||||
{
 | 
			
		||||
    public interface IHttpRequester
 | 
			
		||||
    {
 | 
			
		||||
        Task<Response<HttpResponseMessage>> GetResponse(Request request);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Middleware;
 | 
			
		||||
using Ocelot.Library.RequestBuilder;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using Ocelot.RequestBuilder;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Requester.Middleware
 | 
			
		||||
namespace Ocelot.Requester.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class HttpRequesterMiddleware : OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Requester.Middleware
 | 
			
		||||
namespace Ocelot.Requester.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public static class HttpRequesterMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
namespace Ocelot.Library.Requester
 | 
			
		||||
{
 | 
			
		||||
    using System;
 | 
			
		||||
    using Errors;
 | 
			
		||||
using System;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Requester
 | 
			
		||||
{
 | 
			
		||||
    public class UnableToCompleteRequestError : Error
 | 
			
		||||
    {
 | 
			
		||||
        public UnableToCompleteRequestError(Exception exception) 
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
namespace Ocelot.Library.Responder
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using System.Linq;
 | 
			
		||||
    using Errors;
 | 
			
		||||
    using Responses;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responder
 | 
			
		||||
{
 | 
			
		||||
    public class ErrorsToHttpStatusCodeMapper : IErrorsToHttpStatusCodeMapper
 | 
			
		||||
    {
 | 
			
		||||
        public Response<int> Map(List<Error> errors)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
namespace Ocelot.Library.Responder
 | 
			
		||||
{
 | 
			
		||||
    using System.Net.Http;
 | 
			
		||||
    using System.Threading.Tasks;
 | 
			
		||||
    using Microsoft.AspNetCore.Http;
 | 
			
		||||
using System.Net.Http;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Cannot unit test things in this class due to methods not being implemented
 | 
			
		||||
    /// on .net concretes used for testing
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
namespace Ocelot.Library.Responder
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using Errors;
 | 
			
		||||
    using Responses;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responder
 | 
			
		||||
{
 | 
			
		||||
    public interface IErrorsToHttpStatusCodeMapper
 | 
			
		||||
    {
 | 
			
		||||
        Response<int> Map(List<Error> errors);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
namespace Ocelot.Library.Responder
 | 
			
		||||
{
 | 
			
		||||
    using System.Net.Http;
 | 
			
		||||
    using System.Threading.Tasks;
 | 
			
		||||
    using Microsoft.AspNetCore.Http;
 | 
			
		||||
using System.Net.Http;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responder
 | 
			
		||||
{
 | 
			
		||||
    public interface IHttpResponder
 | 
			
		||||
    {
 | 
			
		||||
        Task<HttpContext> CreateResponse(HttpContext context, HttpResponseMessage response);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
using System.Net.Http;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Middleware;
 | 
			
		||||
using Ocelot.Library.ScopedData;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using Ocelot.ScopedData;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Responder.Middleware
 | 
			
		||||
namespace Ocelot.Responder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public class HttpResponderMiddleware : OcelotMiddleware
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.Responder.Middleware
 | 
			
		||||
namespace Ocelot.Responder.Middleware
 | 
			
		||||
{
 | 
			
		||||
    public static class HttpResponderMiddlewareExtensions
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
namespace Ocelot.Library.Responses
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using Errors;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responses
 | 
			
		||||
{
 | 
			
		||||
    public class ErrorResponse : Response
 | 
			
		||||
    {
 | 
			
		||||
        public ErrorResponse(List<Error> errors) : base(errors)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
namespace Ocelot.Library.Responses
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using Errors;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responses
 | 
			
		||||
{
 | 
			
		||||
    public class ErrorResponse<T> : Response<T>
 | 
			
		||||
    {
 | 
			
		||||
        public ErrorResponse(List<Error> errors) : base(errors)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.Responses
 | 
			
		||||
namespace Ocelot.Responses
 | 
			
		||||
{
 | 
			
		||||
    public class OkResponse : Response
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
namespace Ocelot.Library.Responses
 | 
			
		||||
namespace Ocelot.Responses
 | 
			
		||||
{
 | 
			
		||||
    public class OkResponse<T> : Response<T>
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
namespace Ocelot.Library.Responses
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using Errors;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responses
 | 
			
		||||
{
 | 
			
		||||
    public abstract class Response
 | 
			
		||||
    {
 | 
			
		||||
        protected Response()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
namespace Ocelot.Library.Responses
 | 
			
		||||
{
 | 
			
		||||
    using System.Collections.Generic;
 | 
			
		||||
    using Errors;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Responses
 | 
			
		||||
{
 | 
			
		||||
    public abstract class Response<T> : Response
 | 
			
		||||
    {
 | 
			
		||||
        protected Response(T data)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.ScopedData
 | 
			
		||||
namespace Ocelot.ScopedData
 | 
			
		||||
{
 | 
			
		||||
    public class CannotAddDataError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.ScopedData
 | 
			
		||||
namespace Ocelot.ScopedData
 | 
			
		||||
{
 | 
			
		||||
    public class CannotFindDataError : Error
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.ScopedData
 | 
			
		||||
namespace Ocelot.ScopedData
 | 
			
		||||
{
 | 
			
		||||
    public interface IScopedRequestDataRepository
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Microsoft.AspNetCore.Http;
 | 
			
		||||
using Ocelot.Library.Errors;
 | 
			
		||||
using Ocelot.Library.Responses;
 | 
			
		||||
using Ocelot.Errors;
 | 
			
		||||
using Ocelot.Responses;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.Library.ScopedData
 | 
			
		||||
namespace Ocelot.ScopedData
 | 
			
		||||
{
 | 
			
		||||
    public class ScopedRequestDataRepository : IScopedRequestDataRepository
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user