Method RelabelAsync
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
RelabelAsync(UserId, string, CancellationToken)
Puts the label a declaration now carries onto the row of a user this deployment already holds.
Task<bool> RelabelAsync(UserId user, string displayName, CancellationToken cancellationToken)
Parameters
userUserIdThe user whose row is relabelled.
displayNamestringThe label the user is now declared under.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<bool>
true when the row carries the label once the write has run, false when the label belongs to somebody else.
Remarks
A label is what an administrator reads a roster by rather than anything an account hangs on, so an administrator renaming a user over the endpoint is the whole of what renames them, and the new label lasts — no configuration source names a user, so no start puts an earlier one back. The identifier is the opposite case and is refused rather than followed, because changing it would orphan every mail account and every stored message recorded under the old one.
The answer is read the way ProvisionAsync(UserId, string, Guid?, CancellationToken)'s is, and for the same race: a label taken between a roster being read and this statement reaching the table is a refusal a caller states, never a unique-violation sentence raised out of a start or returned to an operator as a failure.
Exceptions
- ArgumentException
Thrown when
usernames nobody, ordisplayNameis null, empty, or white space.