Method Create
- Namespace
- MailFathom.Application.Calendar
- Assembly
- MailFathom.Application.dll
Create(DateTimeOffset, DateTimeOffset, CalendarEventOrigin?, int?)
Builds a validated window from what a caller asked for.
public static CalendarEventQuery Create(DateTimeOffset from, DateTimeOffset until, CalendarEventOrigin? origin, int? count)
Parameters
fromDateTimeOffsetThe instant the window opens.
untilDateTimeOffsetThe instant it closes, which is after
from.originCalendarEventOrigin?The origin to narrow to, or null for both.
countint?How many events it may answer with, or null for DefaultCount.
Returns
- CalendarEventQuery
The window the store reads under.
Exceptions
- ArgumentOutOfRangeException
Thrown when
untilis not afterfrom, whencountis below one or above MaximumCount, or whenoriginnames no declared value.