StatResponse.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. 
  2. namespace Ant.Service.Utilities
  3. {
  4. /// <summary>
  5. /// This class represents the resulting Pop3 response from a STAT command
  6. /// executed against a Pop3 server.
  7. /// </summary>
  8. internal sealed class StatResponse : Pop3Response
  9. {
  10. private int _messageCount;
  11. /// <summary>
  12. /// Gets the message count.
  13. /// </summary>
  14. /// <value>The message count.</value>
  15. public int MessageCount
  16. {
  17. get { return _messageCount; }
  18. }
  19. private long _octets;
  20. /// <summary>
  21. /// Gets the octets.
  22. /// </summary>
  23. /// <value>The octets.</value>
  24. public long Octets
  25. {
  26. get { return _octets; }
  27. }
  28. /// <summary>
  29. /// Initializes a new instance of the <see cref="StatResponse"/> class.
  30. /// </summary>
  31. /// <param name="response">The response.</param>
  32. /// <param name="messageCount">The message count.</param>
  33. /// <param name="octets">The octets.</param>
  34. public StatResponse(Pop3Response response, int messageCount, long octets)
  35. : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
  36. {
  37. _messageCount = messageCount;
  38. _octets = octets;
  39. }
  40. }
  41. }