Method ImportAsync
- Namespace
- MailFathom.Application.Calendar.Import
- Assembly
- MailFathom.Application.dll
ImportAsync(Stream, CancellationToken)
Puts the events of a file the acting person confirmed onto their own calendar.
public Task<CalendarImportSummary> ImportAsync(Stream file, CancellationToken cancellationToken)
Parameters
fileStreamThe octets the person chose, which are read again rather than recalled from the summary.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<CalendarImportSummary>
What the file created, what it skipped and why, or why the whole file was refused.
Remarks
What is written is asserted, because choosing a file and confirming what it holds is a person putting those events on their calendar. Nothing an import produces is a proposal: a proposal is a date something read out of mail that nobody has agreed to, and this person has agreed to all of these.
Exceptions
- ArgumentNullException
Thrown when
fileis null.- PrincipalNotAuthorizedException
Thrown when the caller acts for no person, or its grant omits CalendarWrite.