/// <summary> /// Stores message header + specified number lines of message body to the specified stream. /// </summary> /// <param name="stream">Stream where to store data.</param> /// <param name="lineCount">Number of lines to get from message body.</param> /// <exception cref="ObjectDisposedException">Is raised when this object is disposed and this method is accessed.</exception> /// <exception cref="ArgumentNullException">Is raised when argument <b>stream</b> value is null.</exception> /// <exception cref="InvalidOperationException">Is raised when message is marked for deletion and this method is accessed.</exception> /// <exception cref="POP3_ClientException">Is raised when POP3 serveer returns error.</exception> public void MessageTopLinesToStream(Stream stream, int lineCount) { if (this.IsDisposed) { throw new ObjectDisposedException(this.GetType().Name); } if (stream == null) { throw new ArgumentNullException("Argument 'stream' value can't be null."); } if (this.IsMarkedForDeletion) { throw new InvalidOperationException("Can't access message, it's marked for deletion."); } m_Pop3Client.GetTopOfMessage(this.SequenceNumber, stream, lineCount); }