RateLimitPartition.GetFixedWindowLimiter<TKey> Método

Definição

Define uma partição com a FixedWindowRateLimiter com o dado 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 Genérico

TKey

O tipo para distinguir partições com.

Parâmetros

partitionKey
TKey

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

factory
Func<TKey,FixedWindowRateLimiterOptions>

A função chamada quando é necessário um limitador de taxa para o dado partitionKey . Isto pode devolver a mesma instância de FixedWindowRateLimiterOptions entre chamadas diferentes.

Devoluções

Observações

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

Aplica-se a