Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

RateLimiterServiceCollectionExtensions.AddRateLimiter Method

Definition

Namespace:
Microsoft.AspNetCore.Builder
Assembly:
Microsoft.AspNetCore.RateLimiting.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Package:
Microsoft.AspNetCore.RateLimiting v7.0.0-rc.2.22476.2
Package:
Microsoft.AspNetCore.App.Ref v8.0.19

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.

Overloads

Name Description
AddRateLimiter(IServiceCollection)

Add rate limiting services and configure the related options.

AddRateLimiter(IServiceCollection, Action<RateLimiterOptions>)

Add rate limiting services and configure the related options.

AddRateLimiter(IServiceCollection)

Add rate limiting services and configure the related options.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRateLimiter(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddRateLimiter : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRateLimiter (services As IServiceCollection) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection for adding services.

Returns

Applies to

AddRateLimiter(IServiceCollection, Action<RateLimiterOptions>)

Source:
RateLimiterServiceCollectionExtensions.cs

Add rate limiting services and configure the related options.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRateLimiter(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.RateLimiting.RateLimiterOptions> configureOptions);
static member AddRateLimiter : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.RateLimiting.RateLimiterOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRateLimiter (services As IServiceCollection, configureOptions As Action(Of RateLimiterOptions)) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection for adding services.

configureOptions
Action<RateLimiterOptions>

A delegate to configure the RateLimiterOptions.

Returns

Applies to


Feedback

Was this page helpful?