RateLimitPartition.GetFixedWindowLimiter<TKey> Método

Definição

Define uma partição com um FixedWindowRateLimiter com o determinado FixedWindowRateLimiterOptions.

public:
generic <typename TKey>
 static System::Threading::RateLimiting::RateLimitPartition<TKey> GetFixedWindowLimiter(TKey partitionKey, Func<TKey, System::Threading::RateLimiting::FixedWindowRateLimiterOptions ^> ^ factory);
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)

Parâmetros de tipo

TKey

O tipo com o qual distinguir partições.

Parâmetros

partitionKey
TKey

A chave específica para essa partição.

factory
Func<TKey,FixedWindowRateLimiterOptions>

A função chamada quando um limitador de taxa para o determinado partitionKey é necessário. Isso pode retornar a mesma instância de FixedWindowRateLimiterOptions chamadas diferentes.

Retornos

Comentários

Defina AutoReplenishment para false salvar uma alocação. Esse método criará um novo tipo de opções e definirá AutoReplenishment para false o contrário.

Aplica-se a