Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
PartitionedRateLimiter<TResource> Class
Definition
- Namespace:
- System.Threading.RateLimiting
- Assembly:
- System.Threading.RateLimiting.dll
- Package:
- System.Threading.RateLimiting v11.0.0-preview.5.26302.115
- Source:
- PartitionedRateLimiter.T.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.
Represents a limiter type that users interact with to determine if an operation can proceed given a specific TResource.
generic <typename TResource>
public ref class PartitionedRateLimiter abstract : IAsyncDisposable, IDisposable
public abstract class PartitionedRateLimiter<TResource> : IAsyncDisposable, IDisposable
type PartitionedRateLimiter<'Resource> = class
interface IAsyncDisposable
interface IDisposable
Public MustInherit Class PartitionedRateLimiter(Of TResource)
Implements IAsyncDisposable, IDisposable
Type Parameters
- TResource
The resource type that is being limited.
- Inheritance
-
PartitionedRateLimiter<TResource>
- Implements
Constructors
| Name | Description |
|---|---|
| PartitionedRateLimiter<TResource>() | |
Methods
| Name | Description |
|---|---|
| AcquireAsync(TResource, Int32, CancellationToken) |
Wait until the requested permits are available or permits can no longer be acquired. |
| AcquireAsyncCore(TResource, Int32, CancellationToken) |
Method that PartitionedRateLimiter<TResource> implementations implement for AcquireAsync(TResource, Int32, CancellationToken). |
| AttemptAcquire(TResource, Int32) |
Fast synchronous attempt to acquire permits. |
| AttemptAcquireCore(TResource, Int32) |
Method that PartitionedRateLimiter<TResource> implementations implement for AttemptAcquire(TResource, Int32). |
| Dispose() |
Disposes the RateLimiter. This completes any queued acquires with a failed lease. |
| Dispose(Boolean) |
Dispose method for implementations to write. |
| DisposeAsync() |
Disposes the RateLimiter asynchronously. |
| DisposeAsyncCore() |
DisposeAsync method for implementations to write. |
| GetStatistics(TResource) |
Gets a snapshot of the statistics for the |
| WithTranslatedKey<TOuter>(Func<TOuter,TResource>, Boolean) |
Translates PartitionedRateLimiter<TOuter> into the current PartitionedRateLimiter<TResource>
using the |
Extension Methods
| Name | Description |
|---|---|
| ConfigureAwait(IAsyncDisposable, Boolean) |
Configures how awaits on the tasks returned from an async disposable will be performed. |
Applies to
Feedback
Was this page helpful?
