Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PartitionedRateLimiter.CreateChained<TResource> Method

Definition

Namespace:
System.Threading.RateLimiting
Assembly:
System.Threading.RateLimiting.dll
Package:
System.Threading.RateLimiting v11.0.0-preview.5.26302.115
Source:
PartitionedRateLimiter.cs

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 PartitionedRateLimiter<TResource> that wraps the passed in PartitionedRateLimiter<TResource>s.

public:
generic <typename TResource>
 static System::Threading::RateLimiting::PartitionedRateLimiter<TResource> ^ CreateChained(... cli::array <System::Threading::RateLimiting::PartitionedRateLimiter<TResource> ^> ^ limiters);
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.

Disposing the returned PartitionedRateLimiter<TResource> does not dispose the inner limiters. Callers are expected to dispose the inner limiters themselves once they are no longer in use.

Applies to


Feedback

Was this page helpful?