Class ThrottlingSentinelFilter
A filter that provides an API throttling of action methods.
Inheritance
System.Object
ThrottlingSentinelFilter
Implements
Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Inherited Members
Namespace: Cuemon.AspNetCore.Mvc.Filters.Throttling
Assembly: Cuemon.AspNetCore.Mvc.dll
Syntax
public class ThrottlingSentinelFilter : ConfigurableAsyncActionFilter<ThrottlingSentinelOptions>, IConfigurable<ThrottlingSentinelOptions>, IAsyncActionFilter, IFilterMetadata
Constructors
| Improve this DocThrottlingSentinelFilter(IOptions<ThrottlingSentinelOptions>, IThrottlingCache)
Initializes a new instance of the ThrottlingSentinelFilter class.
Declaration
public ThrottlingSentinelFilter(IOptions<ThrottlingSentinelOptions> setup, IThrottlingCache tc)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<ThrottlingSentinelOptions> | setup | The ThrottlingSentinelOptions which need to be configured. |
IThrottlingCache | tc | The dependency injected IThrottlingCache. |
Methods
| Improve this DocOnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)
Called asynchronously before the action, after model binding is complete.
Declaration
public override Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext | context | The Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext. |
Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate | next | The Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate. Invoked to execute the next action filter or the action itself. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that on completion indicates the filter has executed. |
Overrides
Cuemon.AspNetCore.Mvc.Filters.ConfigurableAsyncActionFilter<Cuemon.AspNetCore.Http.Throttling.ThrottlingSentinelOptions>.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate)
Implements
Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Extension Methods
See Also
ConfigurableAsyncActionFilter<TOptions>
Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter