4 types derived from PartitionedRateLimiter
Microsoft.AspNetCore.RateLimiting.Tests (1)
TestPartitionedRateLimiter.cs (1)
13
internal class TestPartitionedRateLimiter<TResource> :
PartitionedRateLimiter
<TResource>
System.Threading.RateLimiting (3)
System\Threading\RateLimiting\ChainedPartitionedRateLimiter.cs (1)
16
internal sealed class ChainedPartitionedRateLimiter<TResource> :
PartitionedRateLimiter
<TResource>
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (1)
13
internal sealed class DefaultPartitionedRateLimiter<TResource, TKey> :
PartitionedRateLimiter
<TResource> where TKey : notnull
System\Threading\RateLimiting\TranslatingLimiter.cs (1)
8
internal sealed class TranslatingLimiter<TInner, TResource> :
PartitionedRateLimiter
<TResource>
31 references to PartitionedRateLimiter
Microsoft.AspNetCore.RateLimiting (6)
RateLimiterOptions.cs (2)
23
/// Gets or sets the global <see cref="
PartitionedRateLimiter
{HttpContext}"/> that will be applied on all requests.
26
public
PartitionedRateLimiter
<HttpContext>? GlobalLimiter { get; set; }
RateLimitingMiddleware.cs (4)
13
/// Limits the rate of requests allowed in the application, based on limits set by a user-provided <see cref="
PartitionedRateLimiter
{TResource}"/>.
21
private readonly
PartitionedRateLimiter
<HttpContext>? _globalLimiter;
22
private readonly
PartitionedRateLimiter
<HttpContext> _endpointLimiter;
252
private
PartitionedRateLimiter
<HttpContext> CreateEndpointLimiter()
System.Threading.RateLimiting (25)
System\Threading\RateLimiting\ChainedPartitionedRateLimiter.cs (3)
18
private readonly
PartitionedRateLimiter
<TResource>[] _limiters;
21
public ChainedPartitionedRateLimiter(
PartitionedRateLimiter
<TResource>[] limiters)
33
foreach (
PartitionedRateLimiter
<TResource> limiter in _limiters)
System\Threading\RateLimiting\PartitionedRateLimiter.cs (10)
13
/// Contains methods to assist with creating a <see cref="
PartitionedRateLimiter
{TResource}"/>.
18
/// Method used to create a default implementation of <see cref="
PartitionedRateLimiter
{TResource}"/>.
26
public static
PartitionedRateLimiter
<TResource> Create<TResource, TPartitionKey>(
34
/// Creates a single <see cref="
PartitionedRateLimiter
{TResource}"/> that wraps the passed in <see cref="
PartitionedRateLimiter
{TResource}"/>s.
38
/// Methods on the returned <see cref="
PartitionedRateLimiter
{TResource}"/> will iterate over the passed in <paramref name="limiters"/> in the order given.
41
/// <see cref="
PartitionedRateLimiter
{TResource}.GetStatistics(TResource)"/> will return the lowest value for <see cref="RateLimiterStatistics.CurrentAvailablePermits"/>,
50
/// <param name="limiters">The <see cref="
PartitionedRateLimiter
{TResource}"/>s that will be called in order when acquiring resources.</param>
54
public static
PartitionedRateLimiter
<TResource> CreateChained<TResource>(
55
params
PartitionedRateLimiter
<TResource>[] limiters)
System\Threading\RateLimiting\PartitionedRateLimiter.T.cs (7)
41
/// Method that <see cref="
PartitionedRateLimiter
{TResource}"/> implementations implement for <see cref="AttemptAcquire"/>.
75
/// Method that <see cref="
PartitionedRateLimiter
{TResource}"/> implementations implement for <see cref="AcquireAsync"/>.
124
/// Translates PartitionedRateLimiter<TOuter> into the current <see cref="
PartitionedRateLimiter
{TResource}"/>
132
/// <param name="leaveOpen">Specifies whether the returned <see cref="
PartitionedRateLimiter
{TOuter}"/> will dispose the wrapped <see cref="
PartitionedRateLimiter
{TResource}"/>.</param>
134
/// to <typeparamref name="TResource"/> and calls the inner <see cref="
PartitionedRateLimiter
{TResource}"/>.</returns>
135
public
PartitionedRateLimiter
<TOuter> WithTranslatedKey<TOuter>(Func<TOuter, TResource> keyAdapter, bool leaveOpen)
System\Threading\RateLimiting\RateLimitPartition.cs (2)
44
/// This means any calls to <see cref="
PartitionedRateLimiter
{TResource}.AttemptAcquire(TResource, int)"/> or <see cref="
PartitionedRateLimiter
{TResource}.AcquireAsync(TResource, int, CancellationToken)"/> will always succeed for the given <paramref name="partitionKey"/>.
System\Threading\RateLimiting\TranslatingLimiter.cs (3)
10
private readonly
PartitionedRateLimiter
<TInner> _innerRateLimiter;
16
public TranslatingLimiter(
PartitionedRateLimiter
<TInner> inner, Func<TResource, TInner> keyAdapter, bool leaveOpen)
71
throw new ObjectDisposedException(nameof(
PartitionedRateLimiter
<TResource>));