Table of Contents

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

maxInputCharactersPerPeriod long

The characters one period may send in total, or zero for no ceiling at all.

maxInputCharactersPerPeriodPerUser long

The characters one period may send for any one user, or zero for no per-user ceiling.

period TimeSpan

The window the ceilings are counted over.

Returns

EmbeddingSpendBudget

The budget.

Exceptions

ArgumentOutOfRangeException

Thrown when either ceiling is negative, or the period is not positive.