RateLimiterServiceCollectionExtensions.AddRateLimiter 方法

定义

重载

AddRateLimiter(IServiceCollection)

添加速率限制服务并配置相关选项。

AddRateLimiter(IServiceCollection, Action<RateLimiterOptions>)

添加速率限制服务并配置相关选项。

AddRateLimiter(IServiceCollection)

添加速率限制服务并配置相关选项。

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

参数

services
IServiceCollection

用于添加服务的 IServiceCollection

返回

适用于

AddRateLimiter(IServiceCollection, Action<RateLimiterOptions>)

Source:
RateLimiterServiceCollectionExtensions.cs

添加速率限制服务并配置相关选项。

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

参数

services
IServiceCollection

用于添加服务的 IServiceCollection

configureOptions
Action<RateLimiterOptions>

用于配置 RateLimiterOptions的委托。

返回

适用于