Table of Contents

Struct RateLimitEventArgs

Namespace
RateLimitHeaders.Events
Assembly
RateLimitHeaders.dll

Provides data for rate limit info events from the HTTP handler.

[SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "EventArgs suffix is intentional for event data records")]
public readonly record struct RateLimitEventArgs : IEquatable<RateLimitEventArgs>
Implements
Inherited Members

Remarks

Important: Do not store the Response reference beyond the callback scope. The response may be disposed after the callback completes. If you need response data for later use, extract the required information during the callback and store only that data.

Constructors

RateLimitEventArgs(RateLimitInfo, Uri?, HttpResponseMessage)

Provides data for rate limit info events from the HTTP handler.

public RateLimitEventArgs(RateLimitInfo RateLimitInfo, Uri? RequestUri, HttpResponseMessage Response)

Parameters

RateLimitInfo RateLimitInfo

The parsed rate limit information.

RequestUri Uri

The URI of the request that triggered this event.

Response HttpResponseMessage

The HTTP response containing the rate limit headers.

Remarks

Important: Do not store the Response reference beyond the callback scope. The response may be disposed after the callback completes. If you need response data for later use, extract the required information during the callback and store only that data.

Properties

RateLimitInfo

The parsed rate limit information.

public RateLimitInfo RateLimitInfo { get; init; }

Property Value

RateLimitInfo

RequestUri

The URI of the request that triggered this event.

public Uri? RequestUri { get; init; }

Property Value

Uri

Response

The HTTP response containing the rate limit headers.

public HttpResponseMessage Response { get; init; }

Property Value

HttpResponseMessage