Aracılığıyla paylaş


RateLimiterOptionsExtensions.AddFixedWindowLimiter Yöntem

Tanım

Uygulamaya verilen FixedWindowRateLimiterOptions ile yeni FixedWindowRateLimiter bir kaydeder. Sınırlayıcı, aracılığıyla veya aracılığıyla RequireRateLimiting<TBuilder>(TBuilder, String)EnableRateLimitingAttributebir uç noktaya eklenebilir.

public static Microsoft.AspNetCore.RateLimiting.RateLimiterOptions AddFixedWindowLimiter (this Microsoft.AspNetCore.RateLimiting.RateLimiterOptions options, string policyName, Action<System.Threading.RateLimiting.FixedWindowRateLimiterOptions> configureOptions);
static member AddFixedWindowLimiter : Microsoft.AspNetCore.RateLimiting.RateLimiterOptions * string * Action<System.Threading.RateLimiting.FixedWindowRateLimiterOptions> -> Microsoft.AspNetCore.RateLimiting.RateLimiterOptions
<Extension()>
Public Function AddFixedWindowLimiter (options As RateLimiterOptions, policyName As String, configureOptions As Action(Of FixedWindowRateLimiterOptions)) As RateLimiterOptions

Parametreler

options
RateLimiterOptions

RateLimiterOptions sınırlayıcı eklemek için.

policyName
String

Sınırlayıcıyla ilişkilendirilecek ad.

configureOptions
Action<FixedWindowRateLimiterOptions>

Sınırlayıcı için kullanılacak öğesini yapılandırmak FixedWindowRateLimiterOptions için bir geri çağırma.

Döndürülenler

Bu RateLimiterOptions.

Açıklamalar

AutoReplenishment Bu sınırlayıcının eklendiği ayar yenilemeyi PartitionedRateLimiter denetleyeceğinden, ayarın burada hiçbir etkisi olmaz.

Şunlara uygulanır