Method RegisterBuildingAsync
- Namespace
- MailFathom.Application.Emails.Embeddings.Generations
- Assembly
- MailFathom.Application.dll
RegisterBuildingAsync(IPersistenceSession, EmbeddingProfileIdentity, CancellationToken)
Registers a generation to embed into, or resolves the one this geometry already has.
Task<RegisteredEmbeddingProfile> RegisterBuildingAsync(IPersistenceSession session, EmbeddingProfileIdentity identity, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe session whose transaction this write joins.
identityEmbeddingProfileIdentityThe geometry the generation is fixed to.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<RegisteredEmbeddingProfile>
The registered profile, in its building state.
Remarks
Resolved through the identity fingerprint rather than inserted blindly, which is what makes returning to a previous model a switch rather than a duplicate: the row is still there, its identity may never have moved, and the vectors that once hung on it were attributable to exactly this geometry. What the resolution does change is the row's lifecycle, which is the only part of a profile that moves.
Exceptions
- ArgumentNullException
Thrown when any reference argument is null.