MimeParserSetStream(Stream, MimeFormat, MimeContentStorage) Method

Set the stream to parse.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void SetStream(
	Stream stream,
	MimeFormat format,
	MimeContentStorage storage
)

Parameters

stream  Stream
The stream to parse.
format  MimeFormat
The format of the stream.
storage  MimeContentStorage
The storage used for parsed MIME part content.

Implements

IMimeParserSetStream(Stream, MimeFormat, MimeContentStorage)

Remarks

Sets the stream to parse.

Memory copies MIME part content into memory (the default). Source references content in the seekable input stream instead. The caller owns the stream in both modes. With Source, keep it open and its contents unchanged while the parsed content is in use. Disposing parsed messages or entities does not close the input stream.

Exceptions

ArgumentOutOfRangeException format or storage is not a valid value.
ArgumentException storage is Source and stream is not seekable.
ArgumentNullException stream is .

See Also