Share via


PartitionedRateLimiter.CreateChained<TResource> Method

Definition

Creates a single PartitionedRateLimiter<TResource> that wraps the passed in PartitionedRateLimiter<TResource>s.

public static System.Threading.RateLimiting.PartitionedRateLimiter<TResource> CreateChained<TResource> (params System.Threading.RateLimiting.PartitionedRateLimiter<TResource>[] limiters);
static member CreateChained : System.Threading.RateLimiting.PartitionedRateLimiter<'Resource>[] -> System.Threading.RateLimiting.PartitionedRateLimiter<'Resource>
Public Shared Function CreateChained(Of TResource) (ParamArray limiters As PartitionedRateLimiter(Of TResource)()) As PartitionedRateLimiter(Of TResource)

Type Parameters

TResource

The resource type that is being rate limited.

Parameters

limiters
PartitionedRateLimiter<TResource>[]

The PartitionedRateLimiter<TResource>s 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 PartitionedRateLimiter<TResource> will iterate over the passed in limiters in the order given.

GetStatistics(TResource) 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.

Applies to