Legacy Mime ParserIs End Of Stream Property
Get a value indicating whether the parser has reached the end of the input stream.
Definition
Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
if this parser has reached the end of the input stream; otherwise, .
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public bool IsEndOfStream { get; }Property Value
Booleanif this parser has reached the end of the input stream; otherwise, .
Implements
IMimeParserIsEndOfStreamRemarks
Gets a value indicating whether the parser has reached the end of the input stream.
Example
C#
public static void ParseMbox (string fileName)
{
// Load every message from a Unix mbox spool.
using (var stream = fileName.OpenRead (fileName)) {
var parser = new MimeParser (stream, MimeFormat.Mbox);
while (!parser.IsEndOfStream) {
MimeMessage message = parser.ParseMessage ();
long mboxMarkerOffset = parser.MboxMarkerOffset;
string mboxMarker = parser.MboxMarker;
Console.WriteLine ($"MBOX marker found @ {mboxMarkerOffset}: {mboxMarker}");
// TODO: Do something with the message.
}
}
}