Tnef ReaderRead Value As Bytes Method
Read the current attribute's raw value.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The value.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public byte[] ReadValueAsBytes(
CancellationToken cancellationToken = default
)Parameters
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
ByteThe value.
Remarks
Reads the current attribute's raw value.
The value may only be read once.
If the value is larger than MaxPropertyValueLength or the remaining MaxTotalDataBytes allow, a DataSizeLimitExceeded issue is reported and an empty array is returned. Use OpenValueStream to read large values.
Exceptions
| ObjectDisposedException | The reader has been disposed. |
| InvalidOperationException |
The reader is not positioned on an attribute. -or- The attribute's value has already been read. |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| IOException | An I/O error occurred. |