MapiCalendar.SaveAsync

SaveAsync(string, MapiCalendarSaveOptions, CancellationToken)

Saves calendar to the file with specified save options asynchronously.

public Task SaveAsync(string filePath, MapiCalendarSaveOptions saveOptions, 
    CancellationToken token = default)
ParameterTypeDescription
filePathStringA file path
saveOptionsMapiCalendarSaveOptionsA save options
tokenCancellationTokenPropagates notification that operations should be canceled.

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty
NotSupportedExceptionthe specified save options are not supported

See Also


SaveAsync(Stream, MapiCalendarSaveOptions, CancellationToken)

Saves calendar to the stream with specified save options asynchronously.

public Task SaveAsync(Stream stream, MapiCalendarSaveOptions saveOptions, 
    CancellationToken token = default)
ParameterTypeDescription
streamStreamA stream to save to
saveOptionsMapiCalendarSaveOptionsA save options
tokenCancellationTokenPropagates notification that operations should be canceled.

Exceptions

exceptioncondition
ArgumentNullExceptionsaveOptions or stream is null
NotSupportedExceptionthe specified save options are not supported
NotSupportedExceptionstream does not support writing

See Also


SaveAsync(string, CancellationToken)

Saves calendar object to the file with iCalendar format using the default save options asynchronously.

public Task SaveAsync(string filePath, CancellationToken token = default)
ParameterTypeDescription
filePathStringA file path
tokenCancellationTokenPropagates notification that operations should be canceled.

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty

See Also


SaveAsync(string, AppointmentSaveFormat, CancellationToken)

Saves calendar object to the file with specified format using the default save options asynchronously.

public Task SaveAsync(string filePath, AppointmentSaveFormat saveFormat, 
    CancellationToken token = default)
ParameterTypeDescription
filePathStringA file path
saveFormatAppointmentSaveFormatA save format
tokenCancellationTokenPropagates notification that operations should be canceled.

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty
NotSupportedExceptionThe specified saveFormat is not supported

See Also


SaveAsync(Stream, CancellationToken)

Saves calendar object to the file with iCalendar format using the default save options asynchronously.

public Task SaveAsync(Stream stream, CancellationToken token = default)
ParameterTypeDescription
streamStreamA stream to save to
tokenCancellationTokenPropagates notification that operations should be canceled.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null
NotSupportedExceptionstream does not support writing

See Also


SaveAsync(Stream, AppointmentSaveFormat, CancellationToken)

Saves calendar object to the stream with specified format using the default save options asynchronously.

public Task SaveAsync(Stream stream, AppointmentSaveFormat saveFormat, 
    CancellationToken token = default)
ParameterTypeDescription
streamStreamA stream to save to
saveFormatAppointmentSaveFormatA save format
tokenCancellationTokenPropagates notification that operations should be canceled.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null
NotSupportedExceptionThe specified saveFormat is not supported
NotSupportedExceptionstream does not support writing

See Also