SaveAsync(string, CancellationToken)
Saves this MapiMessage to the specified file asynchronously.
public Task SaveAsync(string fileName, CancellationToken token = default)
| Parameter | Type | Description |
|---|
| fileName | String | The name of the file to save the message to. |
| token | CancellationToken | Propagates notification that operations should be canceled. |
Exceptions
| exception | condition |
|---|
| ArgumentException | fileName is null or empty. |
See Also
SaveAsync(string, SaveOptions, CancellationToken)
Saves this MapiMessage to the specified file with specified options asynchronously.
public Task SaveAsync(string fileName, SaveOptions options, CancellationToken token = default)
| Parameter | Type | Description |
|---|
| fileName | String | The name of the file to save the message to. |
| options | SaveOptions | Options for saving message. |
| token | CancellationToken | Propagates notification that operations should be canceled. |
Exceptions
| exception | condition |
|---|
| ArgumentException | fileName is null or empty. |
| ArgumentNullException | options is null. |
See Also
SaveAsync(Stream, CancellationToken)
Saves this MapiMessage to the specified stream asynchronously.
public Task SaveAsync(Stream stream, CancellationToken token = default)
| Parameter | Type | Description |
|---|
| stream | Stream | The stream to save the message to. |
| token | CancellationToken | Propagates notification that operations should be canceled. |
Exceptions
| exception | condition |
|---|
| ArgumentNullException | stream is null. |
| NotSupportedException | stream does not support writing. |
See Also
SaveAsync(Stream, SaveOptions, CancellationToken)
Saves this MapiMessage to the specified stream with specified options asynchronously.
public Task SaveAsync(Stream stream, SaveOptions options, CancellationToken token = default)
| Parameter | Type | Description |
|---|
| stream | Stream | The stream to save the message to. |
| options | SaveOptions | Options for saving message. |
| token | CancellationToken | Propagates notification that operations should be canceled. |
Exceptions
| exception | condition |
|---|
| ArgumentNullException | stream is null. |
| NotSupportedException | stream does not support writing. |
| ArgumentNullException | options is null. |
See Also