Method Create
- Namespace
- MailFathom.Application.Emails.Embeddings.Limits
- Assembly
- MailFathom.Application.dll
Create(long, long, TimeSpan)
Builds a budget from what a deployment declared.
public static EmbeddingSpendBudget Create(long maxInputCharactersPerPeriod, long maxInputCharactersPerPeriodPerUser, TimeSpan period)
Parameters
maxInputCharactersPerPeriodlongThe characters one period may send in total, or zero for no ceiling at all.
maxInputCharactersPerPeriodPerUserlongThe characters one period may send for any one user, or zero for no per-user ceiling.
periodTimeSpanThe window the ceilings are counted over.
Returns
- EmbeddingSpendBudget
The budget.
Exceptions
- ArgumentOutOfRangeException
Thrown when either ceiling is negative, or the period is not positive.