RateLimiter.AttemptAcquire(Int32) Metod

Definition

Snabbt synkront försök att hämta tillstånd.

public System.Threading.RateLimiting.RateLimitLease AttemptAcquire(int permitCount = 1);
member this.AttemptAcquire : int -> System.Threading.RateLimiting.RateLimitLease
Public Function AttemptAcquire (Optional permitCount As Integer = 1) As RateLimitLease

Parametrar

permitCount
Int32

Antal tillstånd att försöka skaffa.

Returer

Ett lyckat eller misslyckat lån.

Undantag

Kommentarer

Ange permitCount till 0 för att se om tillstånden är uttömda.

Gäller för