Partager via


RateLimiterServiceCollectionExtensions.AddRateLimiter Méthode

Définition

Ajoutez des services de limitation de débit et configurez les options associées.

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

Paramètres

services
IServiceCollection

pour l’ajout IServiceCollection de services.

configureOptions
Action<RateLimiterOptions>

Délégué utilisé pour configurer RateLimiterOptions.

Retours

S’applique à