RateLimiterOptionsExtensions.AddConcurrencyLimiter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a new ConcurrencyLimiter with the given ConcurrencyLimiterOptions to the application. The limiter can be added to an endpoint via RequireRateLimiting<TBuilder>(TBuilder, String), or via the EnableRateLimitingAttribute.
public static Microsoft.AspNetCore.RateLimiting.RateLimiterOptions AddConcurrencyLimiter (this Microsoft.AspNetCore.RateLimiting.RateLimiterOptions options, string policyName, Action<System.Threading.RateLimiting.ConcurrencyLimiterOptions> configureOptions);
static member AddConcurrencyLimiter : Microsoft.AspNetCore.RateLimiting.RateLimiterOptions * string * Action<System.Threading.RateLimiting.ConcurrencyLimiterOptions> -> Microsoft.AspNetCore.RateLimiting.RateLimiterOptions
<Extension()>
Public Function AddConcurrencyLimiter (options As RateLimiterOptions, policyName As String, configureOptions As Action(Of ConcurrencyLimiterOptions)) As RateLimiterOptions
Parameters
- options
- RateLimiterOptions
The RateLimiterOptions to add a limiter to.
- policyName
- String
The name that will be associated with the limiter.
- configureOptions
- Action<ConcurrencyLimiterOptions>
A callback to configure the ConcurrencyLimiterOptions to be used for the limiter.
Returns
This RateLimiterOptions.