14 references to RateLimitPartition
Microsoft.AspNetCore.RateLimiting (5)
RateLimiterOptionsExtensions.cs (4)
38
return
RateLimitPartition
.GetTokenBucketLimiter(key,
67
return
RateLimitPartition
.GetFixedWindowLimiter(key,
96
return
RateLimitPartition
.GetSlidingWindowLimiter(key,
119
return
RateLimitPartition
.GetConcurrencyLimiter(key,
RateLimitingMiddleware.cs (1)
261
return
RateLimitPartition
.GetNoLimiter<DefaultKeyType>(_defaultPolicyKey);
Microsoft.AspNetCore.RateLimiting.Tests (6)
RateLimitingMiddlewareTests.cs (1)
190
return
RateLimitPartition
.Get<string>("myLimiter", (key =>
RateLimitingOptionsTests.cs (4)
16
Assert.Throws<ArgumentNullException>(() => options.AddPolicy<string>(null, context =>
RateLimitPartition
.GetNoLimiter<string>("myKey")));
37
options.AddPolicy<string>("myKey", context =>
RateLimitPartition
.GetNoLimiter<string>("myKey"));
38
Assert.Throws<ArgumentException>(() => options.AddPolicy<string>("myKey", context =>
RateLimitPartition
.GetNoLimiter<string>("yourKey")));
45
options.AddPolicy<string>("myKey", context =>
RateLimitPartition
.GetNoLimiter<string>("myKey"));
TestRateLimiterPolicy.cs (1)
30
return
RateLimitPartition
.Get<string>(_key, (key =>
RateLimitingSample (2)
Program.cs (1)
39
return
RateLimitPartition
.GetConcurrencyLimiter<string>("globalLimiter", key => new ConcurrencyLimiterOptions
SampleRateLimiterPolicy.cs (1)
28
return
RateLimitPartition
.GetSlidingWindowLimiter<string>(string.Empty, key => new SlidingWindowRateLimiterOptions
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\RateLimitPartition.T.cs (1)
7
/// Type returned by <see cref="
RateLimitPartition
.Get"/> methods to be used by <see cref="PartitionedRateLimiter.Create"/> to know what partitions are configured.