Table of Contents

Method CreateAsync

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

CreateAsync(string?, DateTimeOffset, DateTimeOffset?, bool, IReadOnlyCollection<int>, StoredEmailId?, CancellationToken)

Puts an event the person states on their own calendar.

public Task<CalendarEventWriteResult> CreateAsync(string? title, DateTimeOffset start, DateTimeOffset? end, bool isAllDay, IReadOnlyCollection<int> reminders, StoredEmailId? sourceMessage, CancellationToken cancellationToken)

Parameters

title string

What the event is called, as supplied.

start DateTimeOffset

When it begins.

end DateTimeOffset?

When it ends, or null to state no end.

isAllDay bool

Whether the event is stated as a day rather than as a clock time.

reminders IReadOnlyCollection<int>

The leads to announce it at, as stated in minutes before it, or empty to announce nothing.

sourceMessage StoredEmailId?

The message it was created from, or null where none was open.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<CalendarEventWriteResult>

The event as the calendar holds it, or why it was refused.

Remarks

What is written is asserted by construction, because a person typing into their own client is putting an event on their calendar. Nothing here creates a proposal: those are read out of mail, and an event created from an open thread cites the message while being every bit as much the person's own.

Exceptions

PrincipalNotAuthorizedException

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