Tnef Property ReaderRead Value Method
Read the current 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 Object? ReadValue(
CancellationToken cancellationToken = default
)Parameters
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
ObjectThe value.
Remarks
Reads the current value as its native type.
A Currency value is returned as a Decimal that has already been scaled by 1/10000, since [MS-OXCDATA] defines PtypCurrency as a 64-bit signed integer with 4 digits to the right of the decimal point.
Variable-length values 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 value is returned.
Exceptions
| ObjectDisposedException | The TnefReader has been disposed. |
| InvalidOperationException |
The TnefReader has been advanced to another attribute. -or- The reader is not positioned on a value. -or- The value has already been read. |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| IOException | An I/O error occurred. |