diff --git a/src/Ocelot/Configuration/ServiceProviderConfiguraion.cs b/src/Ocelot/Configuration/ServiceProviderConfiguration.cs similarity index 97% rename from src/Ocelot/Configuration/ServiceProviderConfiguraion.cs rename to src/Ocelot/Configuration/ServiceProviderConfiguration.cs index 272d2205..d5ddea6a 100644 --- a/src/Ocelot/Configuration/ServiceProviderConfiguraion.cs +++ b/src/Ocelot/Configuration/ServiceProviderConfiguration.cs @@ -1,14 +1,14 @@ -namespace Ocelot.Configuration -{ - public class ServiceProviderConfiguration - { - public ServiceProviderConfiguration(string serviceProviderHost, int serviceProviderPort) - { - ServiceProviderHost = serviceProviderHost; - ServiceProviderPort = serviceProviderPort; - } - - public string ServiceProviderHost { get; private set; } - public int ServiceProviderPort { get; private set; } - } +namespace Ocelot.Configuration +{ + public class ServiceProviderConfiguration + { + public ServiceProviderConfiguration(string serviceProviderHost, int serviceProviderPort) + { + ServiceProviderHost = serviceProviderHost; + ServiceProviderPort = serviceProviderPort; + } + + public string ServiceProviderHost { get; private set; } + public int ServiceProviderPort { get; private set; } + } } \ No newline at end of file diff --git a/src/Ocelot/DownstreamRouteFinder/UrlMatcher/IUrlPathPlaceholderNameAndValueFinder.cs b/src/Ocelot/DownstreamRouteFinder/UrlMatcher/IPlaceholderNameAndValueFinder.cs similarity index 96% rename from src/Ocelot/DownstreamRouteFinder/UrlMatcher/IUrlPathPlaceholderNameAndValueFinder.cs rename to src/Ocelot/DownstreamRouteFinder/UrlMatcher/IPlaceholderNameAndValueFinder.cs index d2cb4167..678b1081 100644 --- a/src/Ocelot/DownstreamRouteFinder/UrlMatcher/IUrlPathPlaceholderNameAndValueFinder.cs +++ b/src/Ocelot/DownstreamRouteFinder/UrlMatcher/IPlaceholderNameAndValueFinder.cs @@ -1,10 +1,10 @@ -using System.Collections.Generic; -using Ocelot.Responses; - -namespace Ocelot.DownstreamRouteFinder.UrlMatcher -{ - public interface IPlaceholderNameAndValueFinder - { - Response> Find(string path, string pathTemplate); - } -} +using System.Collections.Generic; +using Ocelot.Responses; + +namespace Ocelot.DownstreamRouteFinder.UrlMatcher +{ + public interface IPlaceholderNameAndValueFinder + { + Response> Find(string path, string pathTemplate); + } +} diff --git a/src/Ocelot/DownstreamRouteFinder/UrlMatcher/UrlPathPlaceholderNameAndValue.cs b/src/Ocelot/DownstreamRouteFinder/UrlMatcher/PlaceholderNameAndValue.cs similarity index 96% rename from src/Ocelot/DownstreamRouteFinder/UrlMatcher/UrlPathPlaceholderNameAndValue.cs rename to src/Ocelot/DownstreamRouteFinder/UrlMatcher/PlaceholderNameAndValue.cs index f91faa1d..90099d58 100644 --- a/src/Ocelot/DownstreamRouteFinder/UrlMatcher/UrlPathPlaceholderNameAndValue.cs +++ b/src/Ocelot/DownstreamRouteFinder/UrlMatcher/PlaceholderNameAndValue.cs @@ -1,14 +1,14 @@ -namespace Ocelot.DownstreamRouteFinder.UrlMatcher -{ - public class PlaceholderNameAndValue - { - public PlaceholderNameAndValue(string name, string value) - { - Name = name; - Value = value; - } - - public string Name {get;private set;} - public string Value {get;private set;} - } -} +namespace Ocelot.DownstreamRouteFinder.UrlMatcher +{ + public class PlaceholderNameAndValue + { + public PlaceholderNameAndValue(string name, string value) + { + Name = name; + Value = value; + } + + public string Name {get;private set;} + public string Value {get;private set;} + } +} diff --git a/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/DownstreamUrlTemplateVariableReplacer.cs b/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/DownstreamTemplatePathPlaceholderReplacer.cs similarity index 97% rename from src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/DownstreamUrlTemplateVariableReplacer.cs rename to src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/DownstreamTemplatePathPlaceholderReplacer.cs index dfd70eed..1b744819 100644 --- a/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/DownstreamUrlTemplateVariableReplacer.cs +++ b/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/DownstreamTemplatePathPlaceholderReplacer.cs @@ -1,25 +1,25 @@ -using System.Collections.Generic; -using System.Text; -using Ocelot.DownstreamRouteFinder.UrlMatcher; -using Ocelot.Responses; -using Ocelot.Values; - -namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer -{ - public class DownstreamTemplatePathPlaceholderReplacer : IDownstreamPathPlaceholderReplacer - { - public Response Replace(PathTemplate downstreamPathTemplate, List urlPathPlaceholderNameAndValues) - { - var downstreamPath = new StringBuilder(); - - downstreamPath.Append(downstreamPathTemplate.Value); - - foreach (var placeholderVariableAndValue in urlPathPlaceholderNameAndValues) - { - downstreamPath.Replace(placeholderVariableAndValue.Name, placeholderVariableAndValue.Value); - } - - return new OkResponse(new DownstreamPath(downstreamPath.ToString())); - } - } +using System.Collections.Generic; +using System.Text; +using Ocelot.DownstreamRouteFinder.UrlMatcher; +using Ocelot.Responses; +using Ocelot.Values; + +namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer +{ + public class DownstreamTemplatePathPlaceholderReplacer : IDownstreamPathPlaceholderReplacer + { + public Response Replace(PathTemplate downstreamPathTemplate, List urlPathPlaceholderNameAndValues) + { + var downstreamPath = new StringBuilder(); + + downstreamPath.Append(downstreamPathTemplate.Value); + + foreach (var placeholderVariableAndValue in urlPathPlaceholderNameAndValues) + { + downstreamPath.Replace(placeholderVariableAndValue.Name, placeholderVariableAndValue.Value); + } + + return new OkResponse(new DownstreamPath(downstreamPath.ToString())); + } + } } \ No newline at end of file diff --git a/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/IDownstreamUrlPathTemplateVariableReplacer.cs b/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/IDownstreamPathPlaceholderReplacer.cs similarity index 97% rename from src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/IDownstreamUrlPathTemplateVariableReplacer.cs rename to src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/IDownstreamPathPlaceholderReplacer.cs index 9e12b580..46e998d4 100644 --- a/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/IDownstreamUrlPathTemplateVariableReplacer.cs +++ b/src/Ocelot/DownstreamUrlCreator/UrlTemplateReplacer/IDownstreamPathPlaceholderReplacer.cs @@ -1,12 +1,12 @@ -using System.Collections.Generic; -using Ocelot.DownstreamRouteFinder.UrlMatcher; -using Ocelot.Responses; -using Ocelot.Values; - -namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer -{ - public interface IDownstreamPathPlaceholderReplacer - { - Response Replace(PathTemplate downstreamPathTemplate, List urlPathPlaceholderNameAndValues); - } +using System.Collections.Generic; +using Ocelot.DownstreamRouteFinder.UrlMatcher; +using Ocelot.Responses; +using Ocelot.Values; + +namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer +{ + public interface IDownstreamPathPlaceholderReplacer + { + Response Replace(PathTemplate downstreamPathTemplate, List urlPathPlaceholderNameAndValues); + } } \ No newline at end of file diff --git a/src/Ocelot/Raft/ExcludeFromCoverage.cs b/src/Ocelot/Raft/ExcludeFromCoverageAttribute.cs similarity index 97% rename from src/Ocelot/Raft/ExcludeFromCoverage.cs rename to src/Ocelot/Raft/ExcludeFromCoverageAttribute.cs index 70d42167..9ea5544a 100644 --- a/src/Ocelot/Raft/ExcludeFromCoverage.cs +++ b/src/Ocelot/Raft/ExcludeFromCoverageAttribute.cs @@ -1,7 +1,7 @@ -using System; - -namespace Ocelot.Raft -{ - [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property)] - public class ExcludeFromCoverageAttribute : Attribute{} +using System; + +namespace Ocelot.Raft +{ + [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property)] + public class ExcludeFromCoverageAttribute : Attribute{} } \ No newline at end of file diff --git a/src/Ocelot/Requester/ITracingHandler.cs b/src/Ocelot/Requester/ITracingHandler.cs new file mode 100644 index 00000000..87593303 --- /dev/null +++ b/src/Ocelot/Requester/ITracingHandler.cs @@ -0,0 +1,6 @@ +namespace Ocelot.Requester +{ + public interface ITracingHandler + { + } +} diff --git a/src/Ocelot/Requester/OcelotHttpTracingHandler.cs b/src/Ocelot/Requester/OcelotHttpTracingHandler.cs index 0eb22462..33bd4caf 100644 --- a/src/Ocelot/Requester/OcelotHttpTracingHandler.cs +++ b/src/Ocelot/Requester/OcelotHttpTracingHandler.cs @@ -8,10 +8,6 @@ using Butterfly.OpenTracing; namespace Ocelot.Requester { - public interface ITracingHandler - { - } - public class OcelotHttpTracingHandler : DelegatingHandler, ITracingHandler { private readonly IServiceTracer _tracer; diff --git a/src/Ocelot/Responses/ErrorResponseGeneric.cs b/src/Ocelot/Responses/ErrorResponseGeneric.cs index 90a16cdd..f57de97f 100644 --- a/src/Ocelot/Responses/ErrorResponseGeneric.cs +++ b/src/Ocelot/Responses/ErrorResponseGeneric.cs @@ -3,7 +3,9 @@ using Ocelot.Errors; namespace Ocelot.Responses { +#pragma warning disable SA1649 // File name must match first type name public class ErrorResponse : Response +#pragma warning restore SA1649 // File name must match first type name { public ErrorResponse(Error error) : base(new List {error}) diff --git a/src/Ocelot/Responses/OkResponseGeneric.cs b/src/Ocelot/Responses/OkResponseGeneric.cs index 7445d2d9..73fcf1e2 100644 --- a/src/Ocelot/Responses/OkResponseGeneric.cs +++ b/src/Ocelot/Responses/OkResponseGeneric.cs @@ -1,9 +1,11 @@ namespace Ocelot.Responses { +#pragma warning disable SA1649 // File name must match first type name public class OkResponse : Response +#pragma warning restore SA1649 // File name must match first type name { public OkResponse(T data) : base(data) { } } -} \ No newline at end of file +} diff --git a/src/Ocelot/Responses/ResponseGeneric.cs b/src/Ocelot/Responses/ResponseGeneric.cs index d06314bf..0b2514e9 100644 --- a/src/Ocelot/Responses/ResponseGeneric.cs +++ b/src/Ocelot/Responses/ResponseGeneric.cs @@ -3,7 +3,9 @@ using Ocelot.Errors; namespace Ocelot.Responses { +#pragma warning disable SA1649 // File name must match first type name public abstract class Response : Response +#pragma warning restore SA1649 // File name must match first type name { protected Response(T data) { diff --git a/test/Ocelot.UnitTests/Wait.cs b/test/Ocelot.UnitTests/Wait.cs new file mode 100644 index 00000000..d8fd3a88 --- /dev/null +++ b/test/Ocelot.UnitTests/Wait.cs @@ -0,0 +1,10 @@ +namespace Ocelot.UnitTests +{ + public class Wait + { + public static Waiter WaitFor(int milliSeconds) + { + return new Waiter(milliSeconds); + } + } +} \ No newline at end of file diff --git a/test/Ocelot.UnitTests/Waiter.cs b/test/Ocelot.UnitTests/Waiter.cs index 8fb51ae5..8847c5b9 100644 --- a/test/Ocelot.UnitTests/Waiter.cs +++ b/test/Ocelot.UnitTests/Waiter.cs @@ -3,14 +3,6 @@ using System.Diagnostics; namespace Ocelot.UnitTests { - public class Wait - { - public static Waiter WaitFor(int milliSeconds) - { - return new Waiter(milliSeconds); - } - } - public class Waiter { private readonly int _milliSeconds; @@ -52,4 +44,4 @@ namespace Ocelot.UnitTests return passed; } } -} \ No newline at end of file +}