Class ThrottlingSentinelAttribute
Represents an attribute that is used to mark an action method to be protected by a throttling sentinel.
Inheritance
System.Object
System.Attribute
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute
ThrottlingSentinelAttribute
Implements
Microsoft.AspNetCore.Mvc.Filters.IActionFilter
Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter
Microsoft.AspNetCore.Mvc.Filters.IResultFilter
Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter
Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterFactory
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Inherited Members
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext)
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext)
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate)
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext)
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext)
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext, Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate)
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.Order
System.Attribute.Equals(System.Object)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
Assembly : Cuemon.AspNetCore.Mvc.dll
Syntax
public class ThrottlingSentinelAttribute : ActionFilterAttribute, IActionFilter, IAsyncActionFilter, IResultFilter, IAsyncResultFilter, IOrderedFilter, IFilterFactory, IFilterMetadata
Constructors
|
Improve this Doc
ThrottlingSentinelAttribute(Int32, Double, TimeUnit)
Declaration
public ThrottlingSentinelAttribute(int rateLimit, double window, TimeUnit windowUnit)
Parameters
Type
Name
Description
System.Int32
rateLimit
The allowed rate from within a given window
.
System.Double
window
The duration of the window.
TimeUnit
windowUnit
One of the enumeration values that specifies the time unit of window
.
Properties
|
Improve this Doc
IsReusable
Gets a value that indicates if the result of Microsoft.AspNetCore.Mvc.Filters.IFilterFactory.CreateInstance(System.IServiceProvider) can be reused across requests.
Declaration
public bool IsReusable { get; }
Property Value
Type
Description
System.Boolean
true
if this instance is reusable; otherwise, false
.
|
Improve this Doc
Gets or sets the name of the rate limit HTTP header.
Declaration
public string RateLimitHeaderName { get; set; }
Property Value
Type
Description
System.String
The name of the rate limit HTTP header.
|
Improve this Doc
RateLimitRemainingHeaderName
Gets or sets the name of the rate limit remaining HTTP header.
Declaration
public string RateLimitRemainingHeaderName { get; set; }
Property Value
Type
Description
System.String
The name of the rate limit remaining HTTP header.
|
Improve this Doc
Gets or sets the name of the rate limit reset HTTP header.
Declaration
public string RateLimitResetHeaderName { get; set; }
Property Value
Type
Description
System.String
The name of the rate limit reset HTTP header.
|
Improve this Doc
Gets or sets the preferred Retry-After HTTP header value that conforms with RFC 2616.
Declaration
public ThrottlingRetryAfterHeader RetryAfterHeader { get; set; }
Property Value
|
Improve this Doc
TooManyRequestsMessage
Gets or sets the message of a throttled request that has exceeded the rate limit.
Declaration
public string TooManyRequestsMessage { get; set; }
Property Value
Type
Description
System.String
The message of a throttled request that has exceeded the rate limit.
|
Improve this Doc
Gets or sets a value indicating whether to include a Retry-After HTTP header specifying how long to wait before making a new request.
Declaration
public bool UseRetryAfterHeader { get; set; }
Property Value
Type
Description
System.Boolean
true
to include a Retry-After HTTP header specifying how long to wait before making a new request; otherwise, false
.
Methods
|
Improve this Doc
CreateInstance(IServiceProvider)
Creates an instance of the executable filter.
Declaration
public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)
Parameters
Type
Name
Description
System.IServiceProvider
serviceProvider
The request System.IServiceProvider .
Returns
Type
Description
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
An instance of the executable filter.
Implements
Microsoft.AspNetCore.Mvc.Filters.IActionFilter
Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter
Microsoft.AspNetCore.Mvc.Filters.IResultFilter
Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter
Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterFactory
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Extension Methods
See Also
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute
Please enable JavaScript to view the comments powered by Disqus.