Table of Contents

Interface ICalendarFileReader

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

Reads the entries of an iCalendar file somebody offered to their calendar.

public interface ICalendarFileReader

Remarks

The file is untrusted input in the strongest sense this system has: a person is handed it by somebody else and chooses it from disk, so nothing in it has been through a mail server, a rule, or any other reading this deployment performs. What an implementation owes is therefore stated as much by what it must not do as by what it answers with. It reaches no network. An entry naming a URL, attaching a file, or declaring a zone by reference is read as the octets it is; nothing in a file causes a request of any kind, so an import cannot be made to fetch an address on the operator's network or to announce that the file was opened.

It is synchronous and takes the whole file in memory, which the bound above it is what makes safe: the caller has already refused anything larger than MaximumFileBytes, so there is no streaming parse to write and no partial reading to reason about.

It answers rather than raising. A file that is not iCalendar, or is iCalendar the reader cannot finish, is one of this port's stated outcomes, because a person choosing the wrong file is an ordinary thing to do and not a fault in the deployment.

Methods

Read(Stream, TimeZoneInfo)

Reads what a file offers, resolving every instant it names.