Table of Contents

Class ThrottleRequest

Namespace
Cuemon.AspNetCore.Http.Throttling
Assembly
Cuemon.AspNetCore.dll

Represents the request usage and quota in the context of throttling.

public class ThrottleRequest
Inheritance
Object
ThrottleRequest

Constructors

ThrottleRequest(ThrottleQuota)

Initializes a new instance of the ThrottleRequest class.

public ThrottleRequest(ThrottleQuota quota)

Parameters

quota ThrottleQuota

The allowed quota of HTTP requests.

Properties

Expires

Gets the computed expiration value of a throttled rate limit.

public DateTime Expires { get; }

Property Value

DateTime

The computed expiration value of throttled rate limit.

Remarks

This property is measured in Coordinated Universal Time (UTC) (also known as Greenwich Mean Time).

Quota

Gets the throttling quota that defines the rate limit of HTTP requests.

public ThrottleQuota Quota { get; }

Property Value

ThrottleQuota

The throttling quota that defines the rate limit of HTTP requests.

Total

Gets the total amount of HTTP requests.

public int Total { get; }

Property Value

Int32

The total amount of HTTP requests.

Methods

IncrementTotal()

Increments the total amount of HTTP requests by 1.

public void IncrementTotal()

Refresh()

Evaluates and refreshes this instance when required (Expires and Total).

public void Refresh()