Class ThrottleQuota
Specifies the allowed quota and window duration of HTTP requests.
Inheritance
System.Object
ThrottleQuota
Namespace: Cuemon.AspNetCore.Http.Throttling
Assembly: Cuemon.AspNetCore.dll
Syntax
public class ThrottleQuota
Constructors
| Improve this DocThrottleQuota(Int32, Double, TimeUnit)
Initializes a new instance of the ThrottleQuota class.
Declaration
public ThrottleQuota(int rateLimit, double window, TimeUnit windowUnit)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rateLimit | The allowed rate from within a given |
System.Double | window | The duration of the window. |
TimeUnit | windowUnit | One of the enumeration values that specifies the time unit of |
ThrottleQuota(Int32, TimeSpan)
Initializes a new instance of the ThrottleQuota class.
Declaration
public ThrottleQuota(int rateLimit, TimeSpan window)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rateLimit | The allowed rate from within a given |
System.TimeSpan | window | The duration of the window. |
Properties
| Improve this DocRateLimit
Gets the allowed rate before throttling.
Declaration
public int RateLimit { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The allowed rate before throttling. |
Window
Gets the allowed window duration before throttling.
Declaration
public TimeSpan Window { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The allowed window duration before throttling. |