Table of Contents

Method ReadImportedUidsAsync

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

ReadImportedUidsAsync(UserId, IReadOnlyCollection<ImportedCalendarEventUid>, CancellationToken)

Reports which of the stated imported identifiers somebody's calendar already holds.

Task<IReadOnlySet<ImportedCalendarEventUid>> ReadImportedUidsAsync(UserId owner, IReadOnlyCollection<ImportedCalendarEventUid> candidates, CancellationToken cancellationToken)

Parameters

owner UserId

The person whose calendar is read.

candidates IReadOnlyCollection<ImportedCalendarEventUid>

The identifiers an offered file names, which bounds the read.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlySet<ImportedCalendarEventUid>>

The subset of candidates that calendar already holds, which is empty where it holds none.

Remarks

Asked about the identifiers of one file rather than about the calendar, so the read is bounded by what somebody chose to import instead of growing with the events they have imported before. It is what turns a second import of one file into a count of entries skipped rather than a doubled calendar, and it is not what makes that safe — the unique index on ICalendarEventStore's own insert is, because two imports running at once both read nothing here.

Exceptions

ArgumentNullException

Thrown when candidates is null.

ArgumentException

Thrown when owner names nobody.