共用方式為


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>)

來源:
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的委派。

傳回

適用於