Tnef WriterWrite Attribute Async(Tnef Attribute Tag, Byte, Cancellation Token) Method
Asynchronously write an attribute with a raw value.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
An asynchronous task context.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Task WriteAttributeAsync(
TnefAttributeTag tag,
byte[] buffer,
CancellationToken cancellationToken = default
)Parameters
- tag TnefAttributeTag
- The attribute tag.
- buffer Byte
- The value.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskAn asynchronous task context.
Remarks
Asynchronously writes an attribute with the specified raw value.
Exceptions
| ArgumentNullException | buffer is . |
| ArgumentException | tag is not an attribute that can be written. |
| ObjectDisposedException | The writer has been disposed. |
| InvalidOperationException |
The attribute cannot be written at this point in the stream. -or- The stream or property writer for the previous attribute has not been disposed. |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| IOException | An I/O error occurred. |