RateLimiterEndpointConventionBuilderExtensions.RequireRateLimiting 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>) |
将指定的速率限制策略添加到终结点 () 。 |
RequireRateLimiting<TBuilder>(TBuilder, String) |
将指定的速率限制策略添加到终结点 () 。 |
RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>)
将指定的速率限制策略添加到终结点 () 。
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
终结点约定生成器。
要添加到终结点的速率限制策略。
返回
TBuilder
原始约定生成器参数。
适用于
RequireRateLimiting<TBuilder>(TBuilder, String)
将指定的速率限制策略添加到终结点 () 。
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
原始约定生成器参数。