Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/core.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release-notes/7.0/preview/api-diff/rc1/Microsoft.AspNetCore.App/7.0-rc1_Microsoft.AspNetCore.RateLimiting.md')
-rw-r--r--release-notes/7.0/preview/api-diff/rc1/Microsoft.AspNetCore.App/7.0-rc1_Microsoft.AspNetCore.RateLimiting.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/release-notes/7.0/preview/api-diff/rc1/Microsoft.AspNetCore.App/7.0-rc1_Microsoft.AspNetCore.RateLimiting.md b/release-notes/7.0/preview/api-diff/rc1/Microsoft.AspNetCore.App/7.0-rc1_Microsoft.AspNetCore.RateLimiting.md
new file mode 100644
index 00000000..217bcb75
--- /dev/null
+++ b/release-notes/7.0/preview/api-diff/rc1/Microsoft.AspNetCore.App/7.0-rc1_Microsoft.AspNetCore.RateLimiting.md
@@ -0,0 +1,40 @@
+# Microsoft.AspNetCore.RateLimiting
+
+``` diff
++namespace Microsoft.AspNetCore.RateLimiting {
++ [AttributeUsageAttribute(68, AllowMultiple=false, Inherited=true)]
++ public sealed class DisableRateLimitingAttribute : Attribute {
++ public DisableRateLimitingAttribute();
++ }
++ [AttributeUsageAttribute(68, AllowMultiple=false, Inherited=true)]
++ public sealed class EnableRateLimitingAttribute : Attribute {
++ public EnableRateLimitingAttribute(string policyName);
++ public string PolicyName { [CompilerGeneratedAttribute] get; }
++ }
++ public interface IRateLimiterPolicy<TPartitionKey> {
++ Func<OnRejectedContext, CancellationToken, ValueTask>? OnRejected { get; }
++ RateLimitPartition<TPartitionKey> GetPartition(HttpContext httpContext);
++ }
++ public sealed class OnRejectedContext {
++ public OnRejectedContext();
++ public required HttpContext HttpContext { [CompilerGeneratedAttribute] get; [CompilerGeneratedAttribute] set; }
++ public required RateLimitLease Lease { [CompilerGeneratedAttribute] get; [CompilerGeneratedAttribute] set; }
++ }
++ public sealed class RateLimiterOptions {
++ public RateLimiterOptions();
++ public PartitionedRateLimiter<HttpContext>? GlobalLimiter { [CompilerGeneratedAttribute] get; [CompilerGeneratedAttribute] set; }
++ public Func<OnRejectedContext, CancellationToken, ValueTask>? OnRejected { [CompilerGeneratedAttribute] get; [CompilerGeneratedAttribute] set; }
++ public int RejectionStatusCode { [CompilerGeneratedAttribute] get; [CompilerGeneratedAttribute] set; }
++ public RateLimiterOptions AddPolicy<TPartitionKey, TPolicy>(string policyName) where TPolicy : IRateLimiterPolicy<TPartitionKey>;
++ public RateLimiterOptions AddPolicy<TPartitionKey>(string policyName, IRateLimiterPolicy<TPartitionKey> policy);
++ public RateLimiterOptions AddPolicy<TPartitionKey>(string policyName, Func<HttpContext, RateLimitPartition<TPartitionKey>> partitioner);
++ }
++ public static class RateLimiterOptionsExtensions {
++ public static RateLimiterOptions AddConcurrencyLimiter(this RateLimiterOptions options, string policyName, Action<ConcurrencyLimiterOptions> configureOptions);
++ public static RateLimiterOptions AddFixedWindowLimiter(this RateLimiterOptions options, string policyName, Action<FixedWindowRateLimiterOptions> configureOptions);
++ public static RateLimiterOptions AddSlidingWindowLimiter(this RateLimiterOptions options, string policyName, Action<SlidingWindowRateLimiterOptions> configureOptions);
++ public static RateLimiterOptions AddTokenBucketLimiter(this RateLimiterOptions options, string policyName, Action<TokenBucketRateLimiterOptions> configureOptions);
++ }
++}
+```
+