TnefOleObjectConverterConvertAsync Method

Asynchronously render an OLE object attachment as an image.

Definition

Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public virtual Task<Stream?> ConvertAsync(
	TnefAttachment attachment,
	CancellationToken cancellationToken = default
)

Parameters

attachment  TnefAttachment
The OLE object attachment.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskStream
A stream containing the image, or if the object cannot be rendered.

Remarks

Asynchronously renders an OLE object attachment as a PNG, JPEG, GIF, BMP or WebP image.

The default implementation calls Convert(TnefAttachment, CancellationToken).

See Also