Class ThrottlingSentinelFilter
- Assembly
- Cuemon.AspNetCore.Mvc.dll
A filter that provides an API throttling sentinel on action methods.
public class ThrottlingSentinelFilter : ConfigurableAsyncActionFilter<ThrottlingSentinelOptions>, IConfigurable<ThrottlingSentinelOptions>, IAsyncActionFilter, IFilterMetadata
- Inheritance
-
ThrottlingSentinelFilter
- Implements
-
IAsyncActionFilterIFilterMetadata
- Inherited Members
Constructors
ThrottlingSentinelFilter(IOptions<ThrottlingSentinelOptions>, IThrottlingCache)
Initializes a new instance of the ThrottlingSentinelFilter class.
public ThrottlingSentinelFilter(IOptions<ThrottlingSentinelOptions> setup, IThrottlingCache tc)
Parameters
setup
IOptions<ThrottlingSentinelOptions>The ThrottlingSentinelOptions which need to be configured.
tc
IThrottlingCacheThe dependency injected IThrottlingCache.
Methods
OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)
Called asynchronously before the action, after model binding is complete.
public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
Parameters
context
ActionExecutingContextThe Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext.
next
ActionExecutionDelegateThe Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate. Invoked to execute the next action filter or the action itself.
Returns
See Also
ConfigurableAsyncActionFilter<TOptions>
IAsyncActionFilter