public static IVostokThrottlingBuilder UseUrlQuota([NotNull] this IVostokThrottlingBuilder builder, [NotNull] Func <PropertyQuotaOptions> quotaOptionsProvider) => builder .CustomizeMiddleware(settings => settings.AddUrlProperty = true) .UsePropertyQuota(WellKnownThrottlingProperties.Url, quotaOptionsProvider);
public static IVostokThrottlingBuilder DisableThrottling([NotNull] this IVostokThrottlingBuilder builder) => builder.CustomizeMiddleware(s => s.Enabled = _ => false);