Method ReadRangeAsync
- Namespace
- MailFathom.Application.Calendar
- Assembly
- MailFathom.Application.dll
ReadRangeAsync(UserId, CalendarEventQuery, CancellationToken)
Reads the events of somebody's calendar that fall in one window, earliest first.
Task<IReadOnlyList<CalendarEvent>> ReadRangeAsync(UserId owner, CalendarEventQuery query, CancellationToken cancellationToken)
Parameters
ownerUserIdThe person whose calendar is read.
queryCalendarEventQueryThe window, what it is narrowed to, and how many events it may answer with.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<CalendarEvent>>
The events, ordered by when they begin and then by their identity, and never more than the window asked for.
Remarks
The identity settles two events beginning at the same instant, which makes the order total and therefore the same on every read of one window rather than whichever order the database answered in.
Exceptions
- ArgumentNullException
Thrown when
queryis null.- ArgumentException
Thrown when
ownernames nobody.