Class ThrottleQuota
- Namespace
- Cuemon.AspNetCore.Http.Throttling
- Assembly
- Cuemon.AspNetCore.dll
Specifies the allowed quota and window duration of HTTP requests.
public class ThrottleQuota
- Inheritance
-
ThrottleQuota
Constructors
ThrottleQuota(Int32, Double, TimeUnit)
Initializes a new instance of the ThrottleQuota class.
public ThrottleQuota(int rateLimit, double window, TimeUnit windowUnit)
Parameters
rateLimit
Int32The allowed rate from within a given
window
.window
DoubleThe duration of the window.
windowUnit
TimeUnitOne of the enumeration values that specifies the time unit of
window
.
ThrottleQuota(Int32, TimeSpan)
Initializes a new instance of the ThrottleQuota class.
public ThrottleQuota(int rateLimit, TimeSpan window)
Parameters
rateLimit
Int32The allowed rate from within a given
window
.window
TimeSpanThe duration of the window.
Properties
RateLimit
Gets the allowed rate before throttling.
public int RateLimit { get; }
Property Value
- Int32
The allowed rate before throttling.
Window
Gets the allowed window duration before throttling.
public TimeSpan Window { get; }
Property Value
- TimeSpan
The allowed window duration before throttling.