RateLimiter.CreateChained(RateLimiter[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a single RateLimiter that wraps the passed in RateLimiters.
public static System.Threading.RateLimiting.RateLimiter CreateChained(params System.Threading.RateLimiting.RateLimiter[] limiters);
static member CreateChained : System.Threading.RateLimiting.RateLimiter[] -> System.Threading.RateLimiting.RateLimiter
Public Shared Function CreateChained (ParamArray limiters As RateLimiter()) As RateLimiter
Parameters
- limiters
- RateLimiter[]
The RateLimiters that will be called in order when acquiring resources.
Returns
Exceptions
limiters
is a null parameter.
limiters
is an empty array.
Remarks
Methods on the returned RateLimiter will iterate over the passed in limiters
in the order given.
GetStatistics() will return the lowest value for CurrentAvailablePermits, the inner-most limiter's TotalSuccessfulLeases, and the aggregate values for the rest of the properties from the limiters
.
RateLimitLeases returned will aggregate metadata and for duplicates use the value of the first lease with the same metadata name.