18 lines
448 B
C#
18 lines
448 B
C#
using System;
|
|
using static StellaOps.Localization.T;
|
|
|
|
namespace StellaOps.Configuration;
|
|
|
|
public sealed class AuthorityDelegationQuotaOptions
|
|
{
|
|
public int MaxActiveTokens { get; set; } = 50;
|
|
|
|
internal void Validate(string propertyName)
|
|
{
|
|
if (MaxActiveTokens <= 0)
|
|
{
|
|
throw new InvalidOperationException(_t("config.delegation.quota_max_tokens", $"{propertyName}.{nameof(MaxActiveTokens)}"));
|
|
}
|
|
}
|
|
}
|