AgentPrismQuotaOptions
AgentPrism.Core.dllDefines options for the quota subsystem.
public sealed class AgentPrismQuotaOptionsInheritance
Section titled “Inheritance”object ← AgentPrismQuotaOptions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Read from the AgentPrism:Quotas configuration section.
Constructors
Section titled “Constructors”AgentPrismQuotaOptions()
Section titled “ AgentPrismQuotaOptions()”public AgentPrismQuotaOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”Gets the configuration section name.
public const string SectionName = "AgentPrism:Quotas"Field Value
Section titled “Field Value”Properties
Section titled “Properties”AllowOnStoreFailure
Section titled “ AllowOnStoreFailure”Gets or sets whether to allow a run when quota enforcement fails.
public bool AllowOnStoreFailure { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Defaults to true so a temporary database outage does not stop the service. A strict deployment can set this to false and choose “do not run when quota cannot be verified”.
Enabled
Section titled “ Enabled”Gets or sets whether quota enforcement is enabled. When disabled, rules can be stored but no run is rejected and no counter increments.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Defaulting to true is safe: nothing is rejected while no rule exists. The “no default quota” rule comes from an empty rule set, not from disabling the subsystem.
ThresholdPercents
Section titled “ ThresholdPercents”Gets percentages that publish a quota.threshold event when the
quota counter reaches them.
public IList<int> ThresholdPercents { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Each threshold is published once per period. Otherwise, every run above the threshold would produce a new event as the counter increments.
TimeZone
Section titled “ TimeZone”Gets or sets the time zone used to calculate period boundaries. Windows and IANA names are accepted.
public string TimeZone { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”An administrator who says “daily quota” means their business day. The consumer is therefore expected to change the default UTC time zone.
Methods
Section titled “Methods”ResolveTimeZone()
Section titled “ ResolveTimeZone()”Returns the resolved time zone, falling back to UTC when its name is unknown.
public TimeZoneInfo ResolveTimeZone()Returns
Section titled “Returns”The time zone.
Remarks
Section titled “Remarks”An unrecognized name does not throw because quota enforcement must not
stop all traffic for a bad name. AgentPrismQuotaOptionsValidator
validates it during startup and reports the error there.