Method ActivateAsync
- Namespace
- MailFathom.Application.Emails.Embeddings.Administration
- Assembly
- MailFathom.Application.dll
ActivateAsync(EmbeddingProfileIdentity, CancellationToken)
Weighs the declared geometry and activates it unless the spend ceiling refuses.
public Task<CountedEmbeddingActivationResult> ActivateAsync(EmbeddingProfileIdentity declared, CancellationToken cancellationToken)
Parameters
declaredEmbeddingProfileIdentityThe geometry configuration declares.
cancellationTokenCancellationTokenCancels the reads and the registration.
Returns
- Task<CountedEmbeddingActivationResult>
What was weighed, and what the activation did where it ran.
Remarks
The assessment is taken again here rather than accepted from the caller, so what refuses a spend is the state of the deployment at the moment it would happen rather than a figure a client read earlier and may have edited on the way back. Every other failure of the activation itself — a lost registration race, an index the database refused — is EmbeddingProfileActivation's and reaches the caller unchanged.
Exceptions
- ArgumentNullException
Thrown when
declaredis null.- OperationCanceledException
Thrown when the caller cancels.