Legacy Mime ParserSet Stream(Stream, Mime Format, Boolean) Method
Set the stream to parse.
Definition
Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void SetStream(
Stream stream,
MimeFormat format,
bool persistent
)Parameters
- stream Stream
- The stream to parse.
- format MimeFormat
- The format of the stream.
- persistent Boolean
- if the stream is persistent; otherwise, .
Remarks
Sets the stream to parse.
If persistent is and stream is seekable, then the LegacyMimeParser will not copy the content of MimeParts into memory. Instead, it will use a BoundedStream to reference a substream of stream. This has the potential to not only save memory usage, but also improve LegacyMimeParser performance.
It should be noted, however, that disposing stream will make it impossible for MimeContent to read the content.
Exceptions
| ArgumentNullException | stream is . |