Click or drag to resize
MimeKit

MimeParserSetStream Method (ParserOptions, Stream, Boolean)

Note: This API is now obsolete.

Set the stream to parse.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
[ObsoleteAttribute("Use SetStream(Stream, MimeFormat) or SetStream(Stream, MimeFormat, bool) instead.")]
public void SetStream(
	ParserOptions options,
	Stream stream,
	bool persistent = false
)

Parameters

options
Type: MimeKitParserOptions
The parser options.
stream
Type: System.IOStream
The stream to parse.
persistent (Optional)
Type: SystemBoolean
true if the stream is persistent; otherwise false.
Exceptions
ExceptionCondition
ArgumentNullException

options is null.

-or-

stream 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