Tnef WriterOpen Attribute Stream Method
Open a stream for writing the raw value of an attribute.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The value stream.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Stream OpenAttributeStream(
TnefAttributeTag tag
)Parameters
- tag TnefAttributeTag
- The attribute tag.
Return Value
StreamThe value stream.
Remarks
Opens a stream for writing the raw value of an attribute, such as the content of an AttachData attribute.
The value is buffered using TemporaryStreamFactory until the stream is disposed. No other attribute may be written until the stream has been disposed.
Exceptions
| 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. -or- The temporary stream factory returned an invalid stream. |
| IOException | An I/O error occurred. |