Compartir a través de


RateLimitPartition.GetFixedWindowLimiter<TKey> Método

Definición

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

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>

Función a la que se llama 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á AutoReplenishment en false de lo contrario.

Se aplica a