mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 22:28:15 +08:00
Remove multiple concurrent blank lines
SA1507
This commit is contained in:
@ -123,7 +123,6 @@ namespace Ocelot.Cache.Middleware
|
||||
|
||||
var contentHeaders = response?.Content?.Headers.ToDictionary(v => v.Key, v => v.Value);
|
||||
|
||||
|
||||
var cached = new CachedResponse(statusCode, headers, body, contentHeaders);
|
||||
return cached;
|
||||
}
|
||||
|
@ -216,7 +216,6 @@ namespace Ocelot.Configuration.Builder
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public DownstreamReRoute Build()
|
||||
{
|
||||
return new DownstreamReRoute(
|
||||
|
@ -35,7 +35,6 @@ namespace Ocelot.Configuration.Creator
|
||||
private readonly IHeaderFindAndReplaceCreator _headerFAndRCreator;
|
||||
private readonly IDownstreamAddressesCreator _downstreamAddressesCreator;
|
||||
|
||||
|
||||
public FileOcelotConfigurationCreator(
|
||||
IOptions<FileConfiguration> options,
|
||||
IConfigurationValidator configurationValidator,
|
||||
|
@ -67,7 +67,6 @@ namespace Ocelot.Configuration.Creator
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private bool IsPlaceHolder(string upstreamTemplate, int i)
|
||||
{
|
||||
return upstreamTemplate[i] == '{';
|
||||
|
@ -14,8 +14,7 @@ namespace Ocelot.Configuration
|
||||
DurationOfBreak = durationofBreak;
|
||||
TimeoutValue = timeoutValue;
|
||||
TimeoutStrategy = timeoutStrategy;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int ExceptionsAllowedBeforeBreaking { get; private set; }
|
||||
|
||||
|
@ -264,8 +264,7 @@ namespace Ocelot.DependencyInjection
|
||||
|
||||
var urlFinder = new BaseUrlFinder(_configurationRoot);
|
||||
var baseSchemeUrlAndPort = urlFinder.Find();
|
||||
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
|
||||
|
||||
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
|
||||
|
||||
_services.AddAuthentication(IdentityServerAuthenticationDefaults.AuthenticationScheme)
|
||||
.AddIdentityServerAuthentication(o =>
|
||||
|
@ -17,7 +17,6 @@ namespace Ocelot.DownstreamRouteFinder.Middleware
|
||||
private readonly IOcelotConfigurationProvider _configProvider;
|
||||
private readonly IMultiplexer _multiplexer;
|
||||
|
||||
|
||||
public DownstreamRouteFinderMiddleware(OcelotRequestDelegate next,
|
||||
IOcelotLoggerFactory loggerFactory,
|
||||
IDownstreamRouteFinder downstreamRouteFinder,
|
||||
|
@ -25,7 +25,6 @@ namespace Ocelot.DownstreamUrlCreator
|
||||
return new ErrorResponse<DownstreamUrl>(new List<Error> { new DownstreamHostNullOrEmptyError() });
|
||||
}
|
||||
|
||||
|
||||
var builder = new UriBuilder
|
||||
{
|
||||
Host = downstreamHostAndPort.DownstreamHost,
|
||||
|
@ -37,7 +37,6 @@
|
||||
return new OkResponse<string>(value);
|
||||
}
|
||||
|
||||
|
||||
public Response<List<string>> GetValuesByClaimType(IEnumerable<Claim> claims, string claimType)
|
||||
{
|
||||
List<string> values = new List<string>();
|
||||
@ -47,7 +46,6 @@
|
||||
return new OkResponse<List<string>>(values);
|
||||
}
|
||||
|
||||
|
||||
private Response<string> GetValue(IEnumerable<Claim> claims, string key)
|
||||
{
|
||||
var claim = claims.FirstOrDefault(c => c.Type == key);
|
||||
|
@ -17,7 +17,6 @@ namespace Ocelot.LoadBalancer.LoadBalancers
|
||||
_services = services;
|
||||
}
|
||||
|
||||
|
||||
public async Task<Response<ServiceHostAndPort>> Lease()
|
||||
{
|
||||
var services = await _services.Invoke();
|
||||
|
@ -23,7 +23,6 @@ namespace Ocelot.RateLimit
|
||||
return _core.ProcessRequest(requestIdentity, option);
|
||||
}
|
||||
|
||||
|
||||
public int RetryAfterFrom(DateTime timestamp, RateLimitRule rule)
|
||||
{
|
||||
return _core.RetryAfterFrom(timestamp, rule);
|
||||
|
@ -18,7 +18,6 @@ namespace Ocelot.RequestId.Middleware
|
||||
private readonly IOcelotLogger _logger;
|
||||
private readonly IRequestScopedDataRepository _requestScopedDataRepository;
|
||||
|
||||
|
||||
public ReRouteRequestIdMiddleware(OcelotRequestDelegate next,
|
||||
IOcelotLoggerFactory loggerFactory,
|
||||
IRequestScopedDataRepository requestScopedDataRepository)
|
||||
|
Reference in New Issue
Block a user