RequestQueue namespace cleanup (#11695)

* namespace cleanup
This commit is contained in:
Dylan Dmitri Gray 2019-07-01 14:20:50 -07:00 committed by GitHub
parent 1c126ab773
commit 854bab207f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 18 additions and 28 deletions

View File

@ -9,20 +9,6 @@ namespace Microsoft.AspNetCore.Builder
}
}
namespace Microsoft.AspNetCore.RequestThrottling
{
public partial class RequestThrottlingMiddleware
{
public RequestThrottlingMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.RequestThrottling.QueuePolicies.IQueuePolicy queue, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.RequestThrottling.RequestThrottlingOptions> options) { }
[System.Diagnostics.DebuggerStepThroughAttribute]
public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) { throw null; }
}
public partial class RequestThrottlingOptions
{
public RequestThrottlingOptions() { }
public Microsoft.AspNetCore.Http.RequestDelegate OnRejected { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
}
}
namespace Microsoft.AspNetCore.RequestThrottling.QueuePolicies
{
public partial interface IQueuePolicy
{
@ -35,12 +21,23 @@ namespace Microsoft.AspNetCore.RequestThrottling.QueuePolicies
public int MaxConcurrentRequests { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public int RequestQueueLimit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
}
public partial class RequestThrottlingMiddleware
{
public RequestThrottlingMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.RequestThrottling.IQueuePolicy queue, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.RequestThrottling.RequestThrottlingOptions> options) { }
[System.Diagnostics.DebuggerStepThroughAttribute]
public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) { throw null; }
}
public partial class RequestThrottlingOptions
{
public RequestThrottlingOptions() { }
public Microsoft.AspNetCore.Http.RequestDelegate OnRejected { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
}
}
namespace Microsoft.Extensions.DependencyInjection
{
public static partial class QueuePolicyServiceCollectionExtensions
{
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddStackQueue(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.RequestThrottling.QueuePolicies.QueuePolicyOptions> configure) { throw null; }
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTailDropQueue(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.RequestThrottling.QueuePolicies.QueuePolicyOptions> configure) { throw null; }
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddStackQueue(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.RequestThrottling.QueuePolicyOptions> configure) { throw null; }
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTailDropQueue(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.RequestThrottling.QueuePolicyOptions> configure) { throw null; }
}
}

View File

@ -4,7 +4,7 @@
using System;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.RequestThrottling.QueuePolicies
namespace Microsoft.AspNetCore.RequestThrottling
{
/// <summary>
/// Queueing policies, meant to be used with the <see cref="RequestThrottlingMiddleware"></see>.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.AspNetCore.RequestThrottling.QueuePolicies
namespace Microsoft.AspNetCore.RequestThrottling
{
/// <summary>
/// Specifies options for the <see cref="IQueuePolicy"/>

View File

@ -3,7 +3,6 @@
using System;
using Microsoft.AspNetCore.RequestThrottling;
using Microsoft.AspNetCore.RequestThrottling.QueuePolicies;
namespace Microsoft.Extensions.DependencyInjection
{

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
namespace Microsoft.AspNetCore.RequestThrottling.QueuePolicies
namespace Microsoft.AspNetCore.RequestThrottling
{
internal class StackQueuePolicy : IQueuePolicy
{

View File

@ -6,7 +6,7 @@ using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
namespace Microsoft.AspNetCore.RequestThrottling.QueuePolicies
namespace Microsoft.AspNetCore.RequestThrottling
{
internal class TailDropQueuePolicy : IQueuePolicy, IDisposable
{

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.RequestThrottling
internal sealed class RequestThrottlingEventSource : EventSource
{
public static readonly RequestThrottlingEventSource Log = new RequestThrottlingEventSource();
private static QueueFrame CachedNonTimerResult = new QueueFrame(null, Log);
private static readonly QueueFrame CachedNonTimerResult = new QueueFrame(timer: null, parent: Log);
private PollingCounter _rejectedRequestsCounter;
private PollingCounter _queueLengthCounter;

View File

@ -4,7 +4,6 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.RequestThrottling.QueuePolicies;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

View File

@ -2,11 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.RequestThrottling.QueuePolicies;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Xunit;
namespace Microsoft.AspNetCore.RequestThrottling.Tests

View File

@ -1,6 +1,5 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.RequestThrottling.QueuePolicies;
using Microsoft.Extensions.Options;
using Xunit;

View File

@ -5,7 +5,6 @@ using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.RequestThrottling.QueuePolicies;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;