Пример #1
0
 public ConnectResponse(Pop3Response response, Stream networkStream)
     : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
 {
     if (networkStream == null)
     {
         throw new ArgumentNullException("networkStream");
     }
     _networkStream = networkStream;
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ListResponse"/> class.
        /// </summary>
        /// <param name="response">The response.</param>
        /// <param name="items">The items.</param>
        public ListResponse(Pop3Response response, List<Pop3ListItem> items)
            : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items");
            }

            _items = items;
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RetrResponse"/> class.
        /// </summary>
        /// <param name="response">The response.</param>
        /// <param name="messageLines">The message lines.</param>
        public RetrResponse(Pop3Response response, string[] messageLines)
            : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
        {
            if (messageLines == null)
            {
                throw new ArgumentNullException("messageLines");
            }
            string[] values = response.HostMessage.Split(' ');
            if (values.Length == 2)
            {
                _octects = Convert.ToInt64(values[1]);
            }

            _messageLines = messageLines;
        }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StatResponse"/> class.
 /// </summary>
 /// <param name="response">The response.</param>
 /// <param name="messageCount">The message count.</param>
 /// <param name="octets">The octets.</param>
 public StatResponse(Pop3Response response, int messageCount, long octets)
     : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
 {
     _messageCount = messageCount;
     _octets = octets;
 }