RateLimitPartition.GetFixedWindowLimiter<TKey> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用 FixedWindowRateLimiter 指定的 FixedWindowRateLimiterOptions 來定義具有 的資料分割。
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 。
傳回
備註
設定 AutoReplenishment 為 false
以儲存配置。 這個方法會建立新的選項類型,並設定為 ,否則會設定 AutoReplenishment 為 false
。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應