Class RateLimitInfo
- Namespace
- RateLimitClient
- Assembly
- RateLimitClient.dll
Represents current rate limit information from the RateLimit header.
public class RateLimitInfo
- Inheritance
-
objectRateLimitInfo
Properties
PartitionKey
Partition key (pk parameter).
public string PartitionKey { get; set; }
Property Value
- string
PolicyName
Policy name this limit applies to.
public string PolicyName { get; set; }
Property Value
- string
Remaining
Remaining quota units (r parameter).
public long Remaining { get; set; }
Property Value
- long
ResetSeconds
Seconds until quota restoration (t parameter).
public int? ResetSeconds { get; set; }
Property Value
- int?
Timestamp
Timestamp when this rate limit was received.
public DateTimeOffset Timestamp { get; set; }
Property Value
- DateTimeOffset
Methods
GetResetTime()
Calculates when the quota will reset based on timestamp and reset seconds.
public DateTimeOffset? GetResetTime()
Returns
- DateTimeOffset?
GetTimeUntilReset()
Gets the time remaining until reset, accounting for elapsed time since the header was received.
public TimeSpan? GetTimeUntilReset()
Returns
- TimeSpan?