MapiCalendar.LoadAsync

LoadAsync(string, CancellationToken)

Loads a MapiCalendar from the specified file asynchronously.

public static Task<MapiCalendar> LoadAsync(string filePath, CancellationToken token = default)
ParameterTypeDescription
filePathStringThe path to the file to be loaded.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Returns a MapiCalendar instance loaded from the specified file.

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty.
FileNotFoundExceptionThe specified file does not exist.

See Also


LoadAsync(Stream, CancellationToken)

Loads a MapiCalendar from the specified stream asynchronously.

public static Task<MapiCalendar> LoadAsync(Stream stream, CancellationToken token = default)
ParameterTypeDescription
streamStreamThe stream to be loaded.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Returns a MapiCalendar instance loaded from the specified stream.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null.
NotSupportedExceptionstream does not support reading.
InvalidOperationExceptionThe stream does not contain a calendar item.

See Also