public void WriteHeader(MimeHeaderReader reader) { this.AssertOpen(); Header header = Header.ReadFrom(reader); header.WriteTo(this); }
public static Header ReadFrom(MimeHeaderReader reader) { if (reader.MimeReader == null) { throw new ArgumentNullException("reader"); } return(reader.MimeReader.ReadHeaderObject()); }
public void WritePart(MimeReader reader) { if (reader == null) { throw new ArgumentNullException("reader"); } this.AssertOpen(); if (!MimeReader.StateIsOneOf(reader.ReaderState, MimeReaderState.PartStart | MimeReaderState.InlineStart)) { throw new InvalidOperationException(Strings.OperationNotValidInThisReaderState); } this.StartPart(); MimeHeaderReader headerReader = reader.HeaderReader; while (headerReader.ReadNextHeader()) { this.WriteHeader(headerReader); } this.WriteContent(reader); this.EndPart(); }