removed library namespace

This commit is contained in:
TomPallister 2016-10-18 19:10:09 +01:00
parent acfeeed86a
commit 8b0ceeda5b
117 changed files with 384 additions and 406 deletions

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Http;
namespace Ocelot.Library.Authentication.Handler
namespace Ocelot.Authentication.Handler
{
public class AuthenticationHandler
{

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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
{

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.Authentication.Handler
namespace Ocelot.Authentication.Handler
{
public enum SupportedAuthenticationProviders
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
namespace Ocelot.Library.Authentication.Middleware
namespace Ocelot.Authentication.Middleware
{
public static class AuthenticationMiddlewareMiddlewareExtensions
{

View File

@ -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)

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Ocelot.Library.Configuration.Builder
namespace Ocelot.Configuration.Builder
{
public class ReRouteBuilder
{

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.Configuration
namespace Ocelot.Configuration
{
public class ClaimToHeader
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.Configuration.Creator
namespace Ocelot.Configuration.Creator
{
public interface IOcelotConfigurationCreator
{

View File

@ -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

View File

@ -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; }

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Ocelot.Library.Configuration
namespace Ocelot.Configuration
{
public class OcelotConfiguration : IOcelotConfiguration
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.Configuration.Parser
namespace Ocelot.Configuration.Parser
{
public interface IClaimToHeaderConfigurationParser
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.Configuration.Parser
namespace Ocelot.Configuration.Parser
{
public class InstructionNotForClaimsError : Error
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.Configuration.Parser
namespace Ocelot.Configuration.Parser
{
public class NoInstructionsError : Error
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.Configuration.Provider
namespace Ocelot.Configuration.Provider
{
public interface IOcelotConfigurationProvider
{

View File

@ -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

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Ocelot.Library.Configuration
namespace Ocelot.Configuration
{
public class ReRoute
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.Configuration.Repository
namespace Ocelot.Configuration.Repository
{
public interface IOcelotConfigurationRepository
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.Configuration.Repository
namespace Ocelot.Configuration.Repository
{
/// <summary>
/// Register as singleton

View File

@ -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
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.Configuration.Validator
namespace Ocelot.Configuration.Validator
{
public class DownstreamTemplateAlreadyUsedError : Error
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.Configuration.Validator
namespace Ocelot.Configuration.Validator
{
public class UnsupportedAuthenticationProviderError : Error
{

View File

@ -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; }

View File

@ -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()

View File

@ -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()

View File

@ -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)

View File

@ -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)

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.DownstreamRouteFinder.Finder
namespace Ocelot.DownstreamRouteFinder.Finder
{
public interface IDownstreamRouteFinder
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.DownstreamRouteFinder.Finder
namespace Ocelot.DownstreamRouteFinder.Finder
{
public class UnableToFindDownstreamRouteError : Error
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
namespace Ocelot.Library.DownstreamRouteFinder.Middleware
namespace Ocelot.DownstreamRouteFinder.Middleware
{
public static class DownstreamRouteFinderMiddlewareExtensions
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
{
public interface IUrlPathToUrlTemplateMatcher
{

View File

@ -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
{

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
{
public class TemplateVariableNameAndValue
{

View File

@ -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
{

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
{
public class UrlMatch
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
namespace Ocelot.Library.DownstreamUrlCreator.Middleware
namespace Ocelot.DownstreamUrlCreator.Middleware
{
public static class DownstreamUrlCreatorMiddlewareExtensions
{

View File

@ -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
{

View File

@ -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
{

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.Errors
namespace Ocelot.Errors
{
public abstract class Error
{

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.Errors
namespace Ocelot.Errors
{
public enum OcelotErrorCode
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
namespace Ocelot.Library.HeaderBuilder.Middleware
namespace Ocelot.HeaderBuilder.Middleware
{
public static class HttpRequestHeadersBuilderMiddlewareExtensions
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.HeaderBuilder.Parser
namespace Ocelot.HeaderBuilder.Parser
{
public class CannotFindClaimError : Error
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
namespace Ocelot.Library.RequestBuilder.Middleware
namespace Ocelot.RequestBuilder.Middleware
{
public static class HttpRequestBuilderMiddlewareExtensions
{

View File

@ -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)

View File

@ -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)

View File

@ -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);

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
namespace Ocelot.Library.Requester.Middleware
namespace Ocelot.Requester.Middleware
{
public static class HttpRequesterMiddlewareExtensions
{

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
namespace Ocelot.Library.Responder.Middleware
namespace Ocelot.Responder.Middleware
{
public static class HttpResponderMiddlewareExtensions
{

View File

@ -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)

View File

@ -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)

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.Responses
namespace Ocelot.Responses
{
public class OkResponse : Response
{

View File

@ -1,4 +1,4 @@
namespace Ocelot.Library.Responses
namespace Ocelot.Responses
{
public class OkResponse<T> : Response<T>
{

View File

@ -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()

View File

@ -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)

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.ScopedData
namespace Ocelot.ScopedData
{
public class CannotAddDataError : Error
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Errors;
using Ocelot.Errors;
namespace Ocelot.Library.ScopedData
namespace Ocelot.ScopedData
{
public class CannotFindDataError : Error
{

View File

@ -1,6 +1,6 @@
using Ocelot.Library.Responses;
using Ocelot.Responses;
namespace Ocelot.Library.ScopedData
namespace Ocelot.ScopedData
{
public interface IScopedRequestDataRepository
{

View File

@ -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
{

View File

@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using Ocelot.Configuration.Yaml;
using Ocelot.ManualTest;
using Shouldly;
using TestStack.BDDfy;
@ -22,7 +23,6 @@ using YamlDotNet.Serialization;
namespace Ocelot.AcceptanceTests
{
using System.Security.Claims;
using Library.Configuration.Yaml;
public class AuthenticationTests : IDisposable
{

View File

@ -14,7 +14,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using Ocelot.Library.Configuration.Yaml;
using Ocelot.Configuration.Yaml;
using Ocelot.ManualTest;
using Shouldly;
using TestStack.BDDfy;

View File

@ -6,7 +6,7 @@ using System.Net.Http;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
using Ocelot.Library.Configuration.Yaml;
using Ocelot.Configuration.Yaml;
using Ocelot.ManualTest;
using Shouldly;
using TestStack.BDDfy;

View File

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
using Ocelot.Configuration.Yaml;
using Ocelot.ManualTest;
using Shouldly;
using TestStack.BDDfy;
@ -15,8 +16,6 @@ using YamlDotNet.Serialization;
namespace Ocelot.AcceptanceTests
{
using Library.Configuration.Yaml;
public class RoutingTests : IDisposable
{
private TestServer _server;

View File

@ -3,8 +3,8 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Ocelot.Library.DependencyInjection;
using Ocelot.Library.Middleware;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
namespace Ocelot.ManualTest
{

View File

@ -3,20 +3,18 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Moq;
using Ocelot.Library.Authentication.Handler;
using Ocelot.Library.Authentication.Handler.Creator;
using Ocelot.Library.Authentication.Handler.Factory;
using Ocelot.Authentication.Handler;
using Ocelot.Authentication.Handler.Creator;
using Ocelot.Authentication.Handler.Factory;
using Ocelot.Errors;
using Ocelot.Responses;
using Shouldly;
using TestStack.BDDfy;
using Xunit;
using AuthenticationOptions = Ocelot.Configuration.AuthenticationOptions;
namespace Ocelot.UnitTests.Authentication
{
using Library.Authentication;
using Library.Configuration;
using Library.Errors;
using Library.Responses;
public class AuthenticationHandlerFactoryTests
{
private readonly IAuthenticationHandlerFactory _authenticationHandlerFactory;

View File

@ -6,13 +6,13 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Moq;
using Ocelot.Library.Authentication.Handler.Factory;
using Ocelot.Library.Authentication.Middleware;
using Ocelot.Library.Configuration.Builder;
using Ocelot.Library.DownstreamRouteFinder;
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
using Ocelot.Library.Responses;
using Ocelot.Library.ScopedData;
using Ocelot.Authentication.Handler.Factory;
using Ocelot.Authentication.Middleware;
using Ocelot.Configuration.Builder;
using Ocelot.DownstreamRouteFinder;
using Ocelot.DownstreamRouteFinder.UrlMatcher;
using Ocelot.Responses;
using Ocelot.ScopedData;
using TestStack.BDDfy;
using Xunit;

View File

@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using Ocelot.Library.Configuration;
using Ocelot.Library.Configuration.Parser;
using Ocelot.Library.Errors;
using Ocelot.Library.Responses;
using Ocelot.Configuration;
using Ocelot.Configuration.Parser;
using Ocelot.Errors;
using Ocelot.Responses;
using Shouldly;
using TestStack.BDDfy;
using Xunit;

View File

@ -1,14 +1,13 @@
using System.Collections.Generic;
using Ocelot.Library.Configuration.Validator;
using Ocelot.Configuration.Validator;
using Ocelot.Configuration.Yaml;
using Ocelot.Responses;
using Shouldly;
using TestStack.BDDfy;
using Xunit;
namespace Ocelot.UnitTests.Configuration
{
using Library.Configuration.Yaml;
using Library.Responses;
public class ConfigurationValidationTests
{
private YamlConfiguration _yamlConfiguration;

View File

@ -2,10 +2,10 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Ocelot.Library.Configuration;
using Ocelot.Library.Configuration.Builder;
using Ocelot.Library.Configuration.Repository;
using Ocelot.Library.Responses;
using Ocelot.Configuration;
using Ocelot.Configuration.Builder;
using Ocelot.Configuration.Repository;
using Ocelot.Responses;
using Shouldly;
using TestStack.BDDfy;
using Xunit;

Some files were not shown because too many files have changed in this diff Show More