Skip to content
Tracon

QuotaUsageQuery

Namespace Tracon · Assembly Tracon.Abstractions.dll

A filter for querying quota usage.

public sealed record QuotaUsageQuery : IEquatable<QuotaUsageQuery>
Inheritance
object ← QuotaUsageQuery
Implements
IEquatable<QuotaUsageQuery>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
public QuotaUsageQuery()

Fetches only this agent’s counters. An empty string means tenant-wide.

public string? AgentName { get; init; }

string?

Fetches only this interval’s counters.

public QuotaPeriod? Period { get; init; }

QuotaPeriod?

Fetches only the counters of the periods named here, each for the given first day (local time). null applies no period filter: every counter of every period is returned — the whole history.

public IReadOnlyDictionary<QuotaPeriod, DateOnly>? PeriodStarts { get; init; }

IReadOnlyDictionary<QuotaPeriod, DateOnly>?

The caller computes the first days from the configured time zone, exactly as it does for IQuotaStore.AddUsageAsync; a store does not know time zones. A period that is not in the map returns no counters, so an empty map returns an empty list. The filter applies together with QuotaUsageQuery.AgentName and QuotaUsageQuery.Period.

The admission check reads usage before every run. Without this filter each read returned the tenant’s whole history, which only grows.

The tenant identifier.

public required string TenantId { get; init; }

string

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(QuotaUsageQuery? other)

other QuotaUsageQuery?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(QuotaUsageQuery?, QuotaUsageQuery?)

Section titled “ operator ==(QuotaUsageQuery?, QuotaUsageQuery?)”
public static bool operator ==(QuotaUsageQuery? left, QuotaUsageQuery? right)

left QuotaUsageQuery?

right QuotaUsageQuery?

bool

operator !=(QuotaUsageQuery?, QuotaUsageQuery?)

Section titled “ operator !=(QuotaUsageQuery?, QuotaUsageQuery?)”
public static bool operator !=(QuotaUsageQuery? left, QuotaUsageQuery? right)

left QuotaUsageQuery?

right QuotaUsageQuery?

bool