MapiTask.LoadAsync

LoadAsync(string, CancellationToken)

Loads a MapiTask from the specified file asynchronously.

public static Task<MapiTask> 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 MapiTask 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 MapiTask from the specified stream asynchronously.

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

Return Value

Returns a MapiTask instance loaded from the specified stream.

Exceptions

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

See Also