次の方法で共有


RateLimitPartition.GetFixedWindowLimiter<TKey> メソッド

定義

指定FixedWindowRateLimiterOptionsした を使用して FixedWindowRateLimiter パーティションを定義します。

public static System.Threading.RateLimiting.RateLimitPartition<TKey> GetFixedWindowLimiter<TKey> (TKey partitionKey, Func<TKey,System.Threading.RateLimiting.FixedWindowRateLimiterOptions> factory);
static member GetFixedWindowLimiter : 'Key * Func<'Key, System.Threading.RateLimiting.FixedWindowRateLimiterOptions> -> System.Threading.RateLimiting.RateLimitPartition<'Key>
Public Shared Function GetFixedWindowLimiter(Of TKey) (partitionKey As TKey, factory As Func(Of TKey, FixedWindowRateLimiterOptions)) As RateLimitPartition(Of TKey)

型パラメーター

TKey

パーティションを区別する型。

パラメーター

partitionKey
TKey

このパーティションの特定のキー。

factory
Func<TKey,FixedWindowRateLimiterOptions>

指定 partitionKey された のレートリミッターが必要な場合に呼び出される関数。 これにより、異なる呼び出し間で の同じインスタンスが FixedWindowRateLimiterOptions 返される可能性があります。

戻り値

注釈

割り当てを保存するには、 を にfalse設定AutoReplenishmentします。 このメソッドは、新しいオプションの種類を作成し、それ以外の場合は にfalse設定AutoReplenishmentします。

適用対象