RateLimitPartition.GetFixedWindowLimiter<TKey> Método

Definición

Define una partición con FixedWindowRateLimiter con el especificado 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

Tipo con el que se distinguen las particiones.

Parámetros

partitionKey
TKey

Clave específica para esta partición.

factory
Func<TKey,FixedWindowRateLimiterOptions>

Se llama a la función cuando se necesita un limitador de velocidad para el especificado partitionKey . Esto puede devolver la misma instancia de FixedWindowRateLimiterOptions en distintas llamadas.

Devoluciones

Comentarios

Establezca AutoReplenishment en false para guardar una asignación. Este método creará un nuevo tipo de opciones y se establecerá en AutoReplenishmentfalse de lo contrario.

Se aplica a