4 types derived from RateLimiter
Microsoft.AspNetCore.RateLimiting.Tests (1)
TestRateLimiter.cs (1)
8internal class TestRateLimiter : RateLimiter
System.Threading.RateLimiting (3)
System\Threading\RateLimiting\ConcurrencyLimiter.cs (1)
14public sealed class ConcurrencyLimiter : RateLimiter
System\Threading\RateLimiting\NoopLimiter.cs (1)
9internal sealed class NoopLimiter : RateLimiter
System\Threading\RateLimiting\ReplenishingRateLimiter.cs (1)
9public abstract class ReplenishingRateLimiter : RateLimiter
44 references to RateLimiter
Microsoft.AspNetCore.RateLimiting (2)
RateLimiterOptions.cs (2)
46/// <param name="policyName">The name to be associated with the given <see cref="RateLimiter"/>.</param> 115return new RateLimitPartition<DefaultKeyType>(partitionKey, static key => ((Func<TPartitionKey, RateLimiter>)key.Factory!)((TPartitionKey)key.Key!));
Microsoft.AspNetCore.RateLimiting.Tests (6)
TestPartitionedRateLimiter.cs (6)
15private readonly List<RateLimiter> _limiters = new List<RateLimiter>(); 19public TestPartitionedRateLimiter(RateLimiter limiter) 24public void AddLimiter(RateLimiter limiter) 41foreach (var limiter in _limiters) 67foreach (var limiter in _limiters)
System.Threading.RateLimiting (36)
System\Threading\RateLimiting\ConcurrencyLimiter.cs (1)
12/// <see cref="RateLimiter"/> implementation that helps manage concurrent access to a resource.
System\Threading\RateLimiting\ConcurrencyLimiterOptions.cs (1)
18/// Determines the behaviour of <see cref="RateLimiter.AcquireAsync"/> when not enough resources can be leased.
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (11)
19private readonly Dictionary<TKey, Lazy<RateLimiter>> _limiters; 26private readonly List<KeyValuePair<TKey, Lazy<RateLimiter>>> _cachedLimiters = new(); 28private readonly List<RateLimiter> _limitersToDispose = new(); 45_limiters = new Dictionary<TKey, Lazy<RateLimiter>>(equalityComparer); 87private RateLimiter GetRateLimiter(TResource resource) 90Lazy<RateLimiter>? limiter; 97limiter = new Lazy<RateLimiter>(() => partition.Factory(partition.PartitionKey)); 128foreach (KeyValuePair<TKey, Lazy<RateLimiter>> limiter in _limiters) 163foreach (KeyValuePair<TKey, Lazy<RateLimiter>> limiter in _limiters) 228foreach (KeyValuePair<TKey, Lazy<RateLimiter>> rateLimiter in _cachedLimiters) 268foreach (RateLimiter limiter in _limitersToDispose)
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (1)
12/// <see cref="RateLimiter"/> implementation that refreshes allowed permits in a window periodically.
System\Threading\RateLimiting\FixedWindowRateLimiterOptions.cs (1)
33/// Determines the behaviour of <see cref="RateLimiter.AcquireAsync"/> when not enough resources can be leased.
System\Threading\RateLimiting\QueueProcessingOrder.cs (3)
7/// Controls the behavior of <see cref="RateLimiter.AcquireAsync"/> when not enough resources can be leased. 12/// Lease the oldest queued <see cref="RateLimiter.AcquireAsync"/> call. 16/// Lease the newest queued <see cref="RateLimiter.AcquireAsync"/> call.
System\Threading\RateLimiting\RateLimiter.cs (6)
14/// Gets a snapshot of the <see cref="RateLimiter"/> statistics if available. 16/// <returns>An instance of <see cref="RateLimiterStatistics"/> containing a snapshot of the <see cref="RateLimiter"/> statistics.</returns> 20/// Specifies how long the <see cref="RateLimiter"/> has had all permits available. Used by RateLimiter managers that may want to 24/// Returns <see langword="null"/> when the <see cref="RateLimiter"/> is in use or is not ready to be idle. 48/// Method that <see cref="RateLimiter"/> implementations implement for <see cref="AttemptAcquire"/>. 80/// Method that <see cref="RateLimiter"/> implementations implement for <see cref="AcquireAsync"/>.
System\Threading\RateLimiting\RateLimiterStatistics.cs (3)
7/// Snapshot of statistics for a <see cref="RateLimiter"/>. 17/// Gets the number of permits currently available for the <see cref="RateLimiter"/>. 22/// Gets the number of queued permits for the <see cref="RateLimiter"/>.
System\Threading\RateLimiting\RateLimitLease.cs (1)
10/// Abstraction for leases returned by <see cref="RateLimiter"/> implementations.
System\Threading\RateLimiting\RateLimitPartition.cs (1)
23Func<TKey, RateLimiter> factory)
System\Threading\RateLimiting\RateLimitPartition.T.cs (2)
17public RateLimitPartition(TKey partitionKey, Func<TKey, RateLimiter> factory) 31public Func<TKey, RateLimiter> Factory { get; }
System\Threading\RateLimiting\ReplenishingRateLimiter.cs (1)
7/// Abstraction that specifies that the <see cref="RateLimiter"/> implementation is capable of replenishing tokens.
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
12/// <see cref="RateLimiter"/> implementation that replenishes permit counters periodically instead of via a release mechanism.
System\Threading\RateLimiting\SlidingWindowRateLimiterOptions.cs (1)
39/// Determines the behaviour of <see cref="RateLimiter.AcquireAsync"/> when not enough resources can be leased.
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (1)
12/// <see cref="RateLimiter"/> implementation that replenishes tokens periodically instead of via a release mechanism.
System\Threading\RateLimiting\TokenBucketRateLimiterOptions.cs (1)
39/// Determines the behaviour of <see cref="RateLimiter.AcquireAsync"/> when not enough resources can be leased.