TnefMessageLoadAsync(TnefReader, CancellationToken) Method

Asynchronously load a TNEF message using the specified reader.

Definition

Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static Task<TnefMessage> LoadAsync(
	TnefReader reader,
	CancellationToken cancellationToken = default
)

Parameters

reader  TnefReader
The TNEF reader.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskTnefMessage
The TNEF message.

Remarks

Asynchronously loads a TNEF message using the specified reader, which allows the caller to configure the reader's ComplianceLogger.

The reader must not have been advanced. It is not disposed.

Exceptions

ArgumentNullException reader is .
ObjectDisposedException reader has been disposed.
InvalidOperationException reader has already been advanced.
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.

See Also