RateLimiterEndpointConventionBuilderExtensions.RequireRateLimiting 方法

定义

重载

RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>)

将指定的速率限制策略添加到终结点 () 。

RequireRateLimiting<TBuilder>(TBuilder, String)

将指定的速率限制策略添加到终结点 () 。

RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>)

Source:
RateLimiterEndpointConventionBuilderExtensions.cs

将指定的速率限制策略添加到终结点 () 。

public static TBuilder RequireRateLimiting<TBuilder,TPartitionKey> (this TBuilder builder, Microsoft.AspNetCore.RateLimiting.IRateLimiterPolicy<TPartitionKey> policy) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireRateLimiting : 'Builder * Microsoft.AspNetCore.RateLimiting.IRateLimiterPolicy<'PartitionKey> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireRateLimiting(Of TBuilder As IEndpointConventionBuilder, TPartitionKey As IEndpointConventionBuilder) (builder As TBuilder, policy As IRateLimiterPolicy(Of TPartitionKey)) As TBuilder

类型参数

TBuilder
TPartitionKey

参数

builder
TBuilder

终结点约定生成器。

policy
IRateLimiterPolicy<TPartitionKey>

要添加到终结点的速率限制策略。

返回

TBuilder

原始约定生成器参数。

适用于

RequireRateLimiting<TBuilder>(TBuilder, String)

Source:
RateLimiterEndpointConventionBuilderExtensions.cs

将指定的速率限制策略添加到终结点 () 。

public static TBuilder RequireRateLimiting<TBuilder> (this TBuilder builder, string policyName) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireRateLimiting : 'Builder * string -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireRateLimiting(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, policyName As String) As TBuilder

类型参数

TBuilder

参数

builder
TBuilder

终结点约定生成器。

policyName
String

要添加到终结点的速率限制策略的名称。

返回

TBuilder

原始约定生成器参数。

适用于