Class OwnCalendar
- Namespace
- MailFathom.Application.Calendar
- Assembly
- MailFathom.Application.dll
Reads and writes the signed-in person's own calendar.
public sealed class OwnCalendar
- Inheritance
-
OwnCalendar
- Inherited Members
Remarks
Whose calendar this is comes from the principal rather than from the request, exactly as it does for the user record, the client preferences, and the notification centre: there is no argument here for another person's identifier, so a reading of somebody else's days is something a caller cannot express rather than something a surface has to refuse. An event named by identifier is addressed with the owner beside it, so one another person holds answers as one that does not exist.
The two reads are CalendarRead and the four writes are CalendarWrite, neither of which is a grant over mail: an event is this deployment's own record of when one person is committed, nothing here reaches a mail server, and the message an event cites is a value it carries rather than mail these acts read.
A refused write is a result rather than an exception, because each refusal is something a person corrects and continues from. None of them carries the title or the times: CalendarEventId is what an answer names, and a refusal names not even that.
Each write stages through a fresh session per attempt and commits it, which is what the store's three writes are written for. An amendment and an acceptance read the held event inside the attempt rather than before it, so a replay after a lost race decides again from the calendar as it then stands instead of writing back what it read before.
Constructors
- OwnCalendar(AccessAuthorization, ICalendarEventStore, OptimisticConcurrencyRetryPolicy, TimeProvider)
Initializes the use case.
Methods
- AcceptAsync(CalendarEventId, CancellationToken)
Takes a date the person's mail proposed onto their calendar, under the identity it already has.
- AmendAsync(CalendarEventId, string?, DateTimeOffset, DateTimeOffset?, bool, IReadOnlyCollection<int>, CancellationToken)
Amends one event of the signed-in person's calendar to the record they state.
- CreateAsync(string?, DateTimeOffset, DateTimeOffset?, bool, IReadOnlyCollection<int>, StoredEmailId?, CancellationToken)
Puts an event the person states on their own calendar.
- DeleteAsync(CalendarEventId, CancellationToken)
Takes one event off the signed-in person's calendar for good.
- FindAsync(CalendarEventId, CancellationToken)
Reads one event of the signed-in person's calendar.
- ReadWindowAsync(DateTimeOffset, DateTimeOffset, CalendarEventOrigin?, int?, CancellationToken)
Reads one window of the signed-in person's calendar, earliest first.