Table of Contents

Class ThrottlingSentinelFilter

Namespace
Cuemon.AspNetCore.Mvc.Filters.Throttling
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
Object
ThrottlingSentinelFilter
Implements
IAsyncActionFilter
IFilterMetadata
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 IThrottlingCache

The 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 ActionExecutingContext

The Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext.

next ActionExecutionDelegate

The Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate. Invoked to execute the next action filter or the action itself.

Returns

Task

A System.Threading.Tasks.Task that on completion indicates the filter has executed.

See Also

ConfigurableAsyncActionFilter<TOptions>
IAsyncActionFilter