Fix file names to match class names

SA1649
This commit is contained in:
Philip Wood 2018-03-03 13:48:30 +00:00
parent c7dbfc044f
commit a64e263a26
13 changed files with 102 additions and 92 deletions

View File

@ -1,14 +1,14 @@
namespace Ocelot.Configuration namespace Ocelot.Configuration
{ {
public class ServiceProviderConfiguration public class ServiceProviderConfiguration
{ {
public ServiceProviderConfiguration(string serviceProviderHost, int serviceProviderPort) public ServiceProviderConfiguration(string serviceProviderHost, int serviceProviderPort)
{ {
ServiceProviderHost = serviceProviderHost; ServiceProviderHost = serviceProviderHost;
ServiceProviderPort = serviceProviderPort; ServiceProviderPort = serviceProviderPort;
} }
public string ServiceProviderHost { get; private set; } public string ServiceProviderHost { get; private set; }
public int ServiceProviderPort { get; private set; } public int ServiceProviderPort { get; private set; }
} }
} }

View File

@ -1,10 +1,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using Ocelot.Responses; using Ocelot.Responses;
namespace Ocelot.DownstreamRouteFinder.UrlMatcher namespace Ocelot.DownstreamRouteFinder.UrlMatcher
{ {
public interface IPlaceholderNameAndValueFinder public interface IPlaceholderNameAndValueFinder
{ {
Response<List<PlaceholderNameAndValue>> Find(string path, string pathTemplate); Response<List<PlaceholderNameAndValue>> Find(string path, string pathTemplate);
} }
} }

View File

@ -1,14 +1,14 @@
namespace Ocelot.DownstreamRouteFinder.UrlMatcher namespace Ocelot.DownstreamRouteFinder.UrlMatcher
{ {
public class PlaceholderNameAndValue public class PlaceholderNameAndValue
{ {
public PlaceholderNameAndValue(string name, string value) public PlaceholderNameAndValue(string name, string value)
{ {
Name = name; Name = name;
Value = value; Value = value;
} }
public string Name {get;private set;} public string Name {get;private set;}
public string Value {get;private set;} public string Value {get;private set;}
} }
} }

View File

@ -1,25 +1,25 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using Ocelot.DownstreamRouteFinder.UrlMatcher; using Ocelot.DownstreamRouteFinder.UrlMatcher;
using Ocelot.Responses; using Ocelot.Responses;
using Ocelot.Values; using Ocelot.Values;
namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer
{ {
public class DownstreamTemplatePathPlaceholderReplacer : IDownstreamPathPlaceholderReplacer public class DownstreamTemplatePathPlaceholderReplacer : IDownstreamPathPlaceholderReplacer
{ {
public Response<DownstreamPath> Replace(PathTemplate downstreamPathTemplate, List<PlaceholderNameAndValue> urlPathPlaceholderNameAndValues) public Response<DownstreamPath> Replace(PathTemplate downstreamPathTemplate, List<PlaceholderNameAndValue> urlPathPlaceholderNameAndValues)
{ {
var downstreamPath = new StringBuilder(); var downstreamPath = new StringBuilder();
downstreamPath.Append(downstreamPathTemplate.Value); downstreamPath.Append(downstreamPathTemplate.Value);
foreach (var placeholderVariableAndValue in urlPathPlaceholderNameAndValues) foreach (var placeholderVariableAndValue in urlPathPlaceholderNameAndValues)
{ {
downstreamPath.Replace(placeholderVariableAndValue.Name, placeholderVariableAndValue.Value); downstreamPath.Replace(placeholderVariableAndValue.Name, placeholderVariableAndValue.Value);
} }
return new OkResponse<DownstreamPath>(new DownstreamPath(downstreamPath.ToString())); return new OkResponse<DownstreamPath>(new DownstreamPath(downstreamPath.ToString()));
} }
} }
} }

View File

@ -1,12 +1,12 @@
using System.Collections.Generic; using System.Collections.Generic;
using Ocelot.DownstreamRouteFinder.UrlMatcher; using Ocelot.DownstreamRouteFinder.UrlMatcher;
using Ocelot.Responses; using Ocelot.Responses;
using Ocelot.Values; using Ocelot.Values;
namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer
{ {
public interface IDownstreamPathPlaceholderReplacer public interface IDownstreamPathPlaceholderReplacer
{ {
Response<DownstreamPath> Replace(PathTemplate downstreamPathTemplate, List<PlaceholderNameAndValue> urlPathPlaceholderNameAndValues); Response<DownstreamPath> Replace(PathTemplate downstreamPathTemplate, List<PlaceholderNameAndValue> urlPathPlaceholderNameAndValues);
} }
} }

View File

@ -1,7 +1,7 @@
using System; using System;
namespace Ocelot.Raft namespace Ocelot.Raft
{ {
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property)] [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property)]
public class ExcludeFromCoverageAttribute : Attribute{} public class ExcludeFromCoverageAttribute : Attribute{}
} }

View File

@ -0,0 +1,6 @@
namespace Ocelot.Requester
{
public interface ITracingHandler
{
}
}

View File

@ -8,10 +8,6 @@ using Butterfly.OpenTracing;
namespace Ocelot.Requester namespace Ocelot.Requester
{ {
public interface ITracingHandler
{
}
public class OcelotHttpTracingHandler : DelegatingHandler, ITracingHandler public class OcelotHttpTracingHandler : DelegatingHandler, ITracingHandler
{ {
private readonly IServiceTracer _tracer; private readonly IServiceTracer _tracer;

View File

@ -3,7 +3,9 @@ using Ocelot.Errors;
namespace Ocelot.Responses namespace Ocelot.Responses
{ {
#pragma warning disable SA1649 // File name must match first type name
public class ErrorResponse<T> : Response<T> public class ErrorResponse<T> : Response<T>
#pragma warning restore SA1649 // File name must match first type name
{ {
public ErrorResponse(Error error) public ErrorResponse(Error error)
: base(new List<Error> {error}) : base(new List<Error> {error})

View File

@ -1,9 +1,11 @@
namespace Ocelot.Responses namespace Ocelot.Responses
{ {
#pragma warning disable SA1649 // File name must match first type name
public class OkResponse<T> : Response<T> public class OkResponse<T> : Response<T>
#pragma warning restore SA1649 // File name must match first type name
{ {
public OkResponse(T data) : base(data) public OkResponse(T data) : base(data)
{ {
} }
} }
} }

View File

@ -3,7 +3,9 @@ using Ocelot.Errors;
namespace Ocelot.Responses namespace Ocelot.Responses
{ {
#pragma warning disable SA1649 // File name must match first type name
public abstract class Response<T> : Response public abstract class Response<T> : Response
#pragma warning restore SA1649 // File name must match first type name
{ {
protected Response(T data) protected Response(T data)
{ {

View File

@ -0,0 +1,10 @@
namespace Ocelot.UnitTests
{
public class Wait
{
public static Waiter WaitFor(int milliSeconds)
{
return new Waiter(milliSeconds);
}
}
}

View File

@ -3,14 +3,6 @@ using System.Diagnostics;
namespace Ocelot.UnitTests namespace Ocelot.UnitTests
{ {
public class Wait
{
public static Waiter WaitFor(int milliSeconds)
{
return new Waiter(milliSeconds);
}
}
public class Waiter public class Waiter
{ {
private readonly int _milliSeconds; private readonly int _milliSeconds;
@ -52,4 +44,4 @@ namespace Ocelot.UnitTests
return passed; return passed;
} }
} }
} }