Click or drag to resize
MimeKit

MimeParserSetStream(Stream, Boolean) Method

Set the stream to parse.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public void SetStream(
	Stream stream,
	bool persistent
)

Parameters

stream  Stream
The stream to parse.
persistent  Boolean
true if the stream is persistent; otherwise false.

Implements

IMimeParserSetStream(Stream, Boolean)
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
Remarks

Sets the stream to parse.

If persistent is true and stream is seekable, then the MimeParser will not copy the content of MimeParts into memory. Instead, it will use a BoundStream to reference a substream of stream. This has the potential to not only save memory usage, but also improve MimeParser performance.

It should be noted, however, that disposing stream will make it impossible for MimeContent to read the content.

See Also