Tnef MessageLoad Async(Stream, Tnef Options, Cancellation Token) Method
Asynchronously load a TNEF message from the specified stream.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The TNEF message.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static Task<TnefMessage> LoadAsync(
Stream stream,
TnefOptions? options = null,
CancellationToken cancellationToken = default
)Parameters
- stream Stream
- The TNEF stream.
- options TnefOptions (Optional)
- The options to use, or to use Default.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskTnefMessageThe TNEF message.
Remarks
Asynchronously loads a TNEF message from the specified stream.
The stream is left open.
Exceptions
| ArgumentNullException | stream is . |
| TnefException | The stream does not begin with the TNEF signature. |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| IOException | An I/O error occurred. |