QuitCommand.cs 862 B

12345678910111213141516171819202122232425262728
  1. using System.IO;
  2. namespace Ant.Service.Utilities
  3. {
  4. /// <summary>
  5. /// This class represents the Pop3 QUIT command.
  6. /// </summary>
  7. internal sealed class QuitCommand : Pop3Command<Pop3Response>
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="QuitCommand"/> class.
  11. /// </summary>
  12. /// <param name="stream">The stream.</param>
  13. public QuitCommand(Stream stream)
  14. : base(stream, false, Pop3State.Transaction | Pop3State.Authorization) { }
  15. /// <summary>
  16. /// Creates the Quit request message.
  17. /// </summary>
  18. /// <returns>
  19. /// The byte[] containing the QUIT request message.
  20. /// </returns>
  21. protected override byte[] CreateRequestMessage()
  22. {
  23. return GetRequestMessage(Pop3Commands.Quit);
  24. }
  25. }
  26. }