Method RelinkOwnPortraitAsync
- Namespace
- MailFathom.Application.StoredFiles
- Assembly
- MailFathom.Application.dll
RelinkOwnPortraitAsync(StoredFileId?, CancellationToken)
Links the signed-in user's record to a portrait, or to none.
Task<PortraitRelinking> RelinkOwnPortraitAsync(StoredFileId? portrait, CancellationToken cancellationToken)
Parameters
portraitStoredFileId?The file to link, or null to link none.
cancellationTokenCancellationTokenCancels the read and the commit.
Returns
- Task<PortraitRelinking>
Whether the user is held, and the file the record linked before this write.
Remarks
It names no user, and resolves the one it writes for from the caller itself, so no implementation can be handed somebody else's record to rewrite.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller acts for no user, or its grant omits ProfileWrite.
- InvalidOperationException
Thrown when the record refused the link for a reason other than a concurrent write.