ThrottlingSentinelAttribute Class
Definition
- Namespace
- Cuemon.AspNetCore.Mvc.Filters.Throttling
- Assemblies
- Cuemon.AspNetCore.Mvc.dll
Represents an attribute that is used to mark an action method to be protected by a throttling sentinel.
public abstract class ThrottlingSentinelAttribute : ActionFilterAttribute, IActionFilter, IAsyncActionFilter, IResultFilter, IAsyncResultFilter, IOrderedFilter, IFilterFactory, IFilterMetadata
- Inheritance
-
ThrottlingSentinelAttribute
- Implements
- Inherited Members
Constructors
| Name | Description |
|---|---|
| ThrottlingSentinelAttribute(int, double, TimeUnit) | Initializes a new instance of the ThrottlingSentinelAttribute class. |
Properties
| Name | Description |
|---|---|
| IsReusable | Gets a value that indicates if the result of CreateInstance(IServiceProvider) can be reused across requests. |
| RateLimitHeaderName | Gets or sets the name of the rate limit HTTP header. |
| RateLimitRemainingHeaderName | Gets or sets the name of the rate limit remaining HTTP header. |
| RateLimitResetHeaderName | Gets or sets the name of the rate limit reset HTTP header. |
| RateLimitResetScope | Gets or sets the preferred rate limit reset HTTP header value that conforms with RFC 7231. |
| RetryAfterScope | Gets or sets the preferred Retry-After HTTP header value that conforms with RFC 2616. |
| TooManyRequestsMessage | Gets or sets the message of a throttled request that has exceeded the rate limit. |
| UseRetryAfterHeader | Gets or sets a value indicating whether to include a Retry-After HTTP header specifying how long to wait before making a new request. |
Methods
| Name | Description |
|---|---|
| CreateInstance(IServiceProvider) | Creates an instance of the executable filter. |
| UniqueContextResolver(HttpContext) | Resolves a unique context of the throttling middleware (eg. IP-address, Authorization header, etc.). |