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
原始慣例產生器參數。