Method Create
- Namespace
- MailFathom.Application.Emails.Embeddings.Limits
- Assembly
- MailFathom.Application.dll
Create(int, TimeProvider)
Builds a pacer from the rate a deployment declared.
public static EmbeddingRequestPacer Create(int maxRequestsPerMinute, TimeProvider timeProvider)
Parameters
maxRequestsPerMinuteintThe requests one minute may carry, or zero to pace nothing.
timeProviderTimeProviderMeasures the waits and decides when a slot has arrived.
Returns
- EmbeddingRequestPacer
The pacer.
Exceptions
- ArgumentNullException
Thrown when
timeProvideris null.- ArgumentOutOfRangeException
Thrown when the rate is negative.