Table of Contents

Method DeleteAsync

Namespace
MailFathom.Application.Calendar
Assembly
MailFathom.Application.dll

DeleteAsync(IPersistenceSession, UserId, CalendarEventId, CancellationToken)

Removes one event of somebody's calendar outright, inside the caller's transaction.

Task<bool> DeleteAsync(IPersistenceSession session, UserId owner, CalendarEventId eventId, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the deletion joins.

owner UserId

The person whose calendar the event is removed from.

eventId CalendarEventId

The event to remove.

cancellationToken CancellationToken

Cancels the deletion.

Returns

Task<bool>

true when that calendar held the event and it was removed; false when it holds none.

Remarks

The row goes rather than being marked, which is what deleting an event means here: there is no state a deleted event is in, nothing restores one, and a calendar that appears to hold nothing at a date holds nothing at it. Dismissing a proposal is this operation, for the same reason — a date nobody wanted is not a fact worth keeping.

Exceptions

ArgumentNullException

Thrown when session is null.

ArgumentException

Thrown when the session cannot supply this store's persistence context, or when owner names nobody.