RateLimitPartition.GetFixedWindowLimiter<TKey> Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Définit une partition avec un FixedWindowRateLimiter avec l’élément donné 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)
Paramètres de type
- TKey
Type avec lequel distinguer les partitions.
Paramètres
- partitionKey
- TKey
Clé spécifique pour cette partition.
- factory
- Func<TKey,FixedWindowRateLimiterOptions>
Fonction appelée lorsqu’un limiteur de débit pour l’élément donné partitionKey est nécessaire. Cela peut retourner la même instance entre FixedWindowRateLimiterOptions différents appels.
Retours
Remarques
Définissez cette option AutoReplenishment pour false enregistrer une allocation. Cette méthode crée un nouveau type d’options et la définit AutoReplenishmentfalse dans le cas contraire.