Table of Contents

Method ReplaceAsync

Namespace
MailFathom.Application.Portraits
Assembly
MailFathom.Application.dll

ReplaceAsync(UserPortrait, CancellationToken)

Replaces the picture the signed-in person is drawn by.

public Task<PortraitChange> ReplaceAsync(UserPortrait portrait, CancellationToken cancellationToken)

Parameters

portrait UserPortrait

The portrait, whose octets are stored as they were supplied.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<PortraitChange>

Whether this deployment holds a record for the caller, and the sentence saying why where the change was refused: who holds the portrait where it is not theirs to change, or which settings policy holds their whole record where this build does not read it.

Remarks

A refused portrait leaves the file written for it removed again, so a refusal stores nothing.

Exceptions

ArgumentNullException

Thrown when portrait is null.

PrincipalNotAuthorizedException

Thrown when the caller acts for no user, or its grant omits ProfileWrite.