From 9db0c7dd65561514d2c83df32213b5cce50a1d1a Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Sun, 21 Aug 2022 14:33:47 -1000 Subject: [PATCH] Rate limiter code formatting (#17) --- .../middleware/rate-limit/WebRateLimitAuth/Program.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fundamentals/middleware/rate-limit/WebRateLimitAuth/Program.cs b/fundamentals/middleware/rate-limit/WebRateLimitAuth/Program.cs index b3d01e2..3e3e636 100644 --- a/fundamentals/middleware/rate-limit/WebRateLimitAuth/Program.cs +++ b/fundamentals/middleware/rate-limit/WebRateLimitAuth/Program.cs @@ -129,11 +129,11 @@ app.Configuration.GetSection(MyRateLimitOptions.MyRateLimit).Bind(myOptions); app.UseRateLimiter(new RateLimiterOptions() .AddTokenBucketLimiter(policyName: tokenPolicy, new TokenBucketRateLimiterOptions(tokenLimit: myOptions.tokenLimit, - queueProcessingOrder: QueueProcessingOrder.OldestFirst, - queueLimit: myOptions.queueLimit, - replenishmentPeriod: TimeSpan.FromSeconds(myOptions.replenishmentPeriod), - tokensPerPeriod: myOptions.tokensPerPeriod, - autoReplenishment: myOptions.autoReplenishment))); + queueProcessingOrder: QueueProcessingOrder.OldestFirst, + queueLimit: myOptions.queueLimit, + replenishmentPeriod: TimeSpan.FromSeconds(myOptions.replenishmentPeriod), + tokensPerPeriod: myOptions.tokensPerPeriod, + autoReplenishment: myOptions.autoReplenishment))); app.MapGet("/", () => Results.Ok($"Token Limiter {GetTicks()}")) .RequireRateLimiting(tokenPolicy);