MimeParser(Stream, MimeFormat, MimeContentStorage) Constructor

Initialize a new instance of the MimeParser class.

Definition

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

Parameters

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

Remarks

Creates a new MimeParser that will parse the specified stream.

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