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
sessionIPersistenceSessionThe session the deletion joins.
ownerUserIdThe person whose calendar the event is removed from.
eventIdCalendarEventIdThe event to remove.
cancellationTokenCancellationTokenCancels the deletion.
Returns
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
sessionis null.- ArgumentException
Thrown when the session cannot supply this store's persistence context, or when
ownernames nobody.