Table of Contents

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

user UserId

The user whose row is relabelled.

displayName string

The label the user is now declared under.

cancellationToken CancellationToken

Cancels 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 user names nobody, or displayName is null, empty, or white space.