using System; //using System.Net.Sockets; using System.IO; namespace Ant.Service.Utilities { /// /// This class represents the Pop3 DELE command. /// internal sealed class DeleCommand : Pop3Command { int _messageId = int.MinValue; /// /// Initializes a new instance of the class. /// /// The stream. /// The message id. public DeleCommand(Stream stream, int messageId) : base(stream, false, Pop3State.Transaction) { if (messageId < 0) { throw new ArgumentOutOfRangeException("_messageId"); } _messageId = messageId; } /// /// Creates the DELE request message. /// /// /// The byte[] containing the DELE request message. /// protected override byte[] CreateRequestMessage() { return GetRequestMessage(string.Concat(Pop3Commands.Dele, _messageId.ToString(), Pop3Commands.Crlf)); } } }