Table of Contents

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(int, double, TimeUnit)

Initializes a new instance of the ThrottleQuota class.

public ThrottleQuota(int rateLimit, double window, TimeUnit windowUnit)

Parameters

rateLimit int

The allowed rate from within a given window.

window double

The duration of the window.

windowUnit TimeUnit

One of the enumeration values that specifies the time unit of window.

ThrottleQuota(int, TimeSpan)

Initializes a new instance of the ThrottleQuota class.

public ThrottleQuota(int rateLimit, TimeSpan window)

Parameters

rateLimit int

The allowed rate from within a given window.

window TimeSpan

The duration of the window.

Properties

RateLimit

Gets the allowed rate before throttling.

public int RateLimit { get; }

Property Value

int

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.