Table of Contents

Method ReadWindowAsync

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

ReadWindowAsync(DateTimeOffset, DateTimeOffset, CalendarEventOrigin?, int?, CancellationToken)

Reads one window of the signed-in person's calendar, earliest first.

public Task<IReadOnlyList<CalendarEvent>?> ReadWindowAsync(DateTimeOffset from, DateTimeOffset until, CalendarEventOrigin? origin, int? count, CancellationToken cancellationToken)

Parameters

from DateTimeOffset

The instant the window opens.

until DateTimeOffset

The instant it closes.

origin CalendarEventOrigin?

The half of the calendar to read, or null for both.

count int?

How many events it may answer with, or null for DefaultCount.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<IReadOnlyList<CalendarEvent>>

The events, or null where what was asked for is not a window this deployment answers.

Remarks

The window is refused rather than narrowed to what this deployment would serve, which is where this reading differs from the notification centre's clamped page: a caller asking for a year of an agenda is asking a question about a span it drew, and answering a shorter one would be a month silently missing from a screen that believes it drew the year.

Exceptions

PrincipalNotAuthorizedException

Thrown when the caller acts for no person, or its grant omits CalendarRead.