Method ReviseAsync
- Namespace
- MailFathom.Application.Tasks
- Assembly
- MailFathom.Application.dll
ReviseAsync(PersonalTaskId, string, DateOnly?, TaskAnnouncement, CancellationToken)
Writes what the signed-in person edited about one of their tasks.
public Task<PersonalTask?> ReviseAsync(PersonalTaskId task, string title, DateOnly? dueOn, TaskAnnouncement announcement, CancellationToken cancellationToken)
Parameters
taskPersonalTaskIdThe task to revise.
titlestringThe line the list is to be drawn with from now on.
dueOnDateOnly?The day it is due on, or null where they took the date off it.
announcementTaskAnnouncementWhat announces it afterwards and the offset their due day runs in, or Silent to announce nothing.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<PersonalTask>
The task as it now stands, or null when this person holds none under that identity.
Remarks
The task is read before it is written because an edit is stated against the record it edits: the answer is what the person now holds rather than what they sent, and a task erased between the two is reported as one they do not hold rather than written back into existence.
What announces the task is part of the edit rather than beside it, which is what makes turning the last reminder off a task stated with none rather than a field left out — and what makes taking the date off one take its reminders with it, since a lead measured back from no due day is refused.
Exceptions
- ArgumentNullException
Thrown when
announcementis null.- ArgumentException
Thrown when
titleis blank, when one lead is stated twice, or when leads are stated against no due day.- ArgumentOutOfRangeException
Thrown when
titleexceeds MaximumTitleLength, or when more than MaximumCount leads are stated.- PrincipalNotAuthorizedException
Thrown when the caller acts for no user, or its grant omits TasksWrite.