예제 #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
 public ConnectResponse(Pop3Response response, Stream networkStream)
     : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
 {
     if (networkStream == null)
     {
         throw new ArgumentNullException("networkStream");
     }
     NetworkStream = networkStream;
 }
예제 #3
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 <Pop3ListItemResult> items)
            : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items");
            }

            Items = items;
        }
예제 #4
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<Pop3ListItemResult> items)
            : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items");
            }

            Items = items;
        }
예제 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RetrieveResponse"/> class.
        /// </summary>
        /// <param name="response">The response.</param>
        /// <param name="messageLines">The message lines.</param>
        public RetrieveResponse(Pop3Response response, byte[] rawBytes)
            : base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
        {
            if (rawBytes == null)
            {
                throw new ArgumentNullException("rawBytes");
            }
            string[] values = response.HostMessage.Split(' ');
            if (values.Length == 2)
            {
                Octets = Convert.ToInt64(values[1]);
            }

            RawBytes = rawBytes;
        }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RetrieveResponse"/> class.
        /// </summary>
        /// <param name="response">The response.</param>
        /// <param name="messageLines">The message lines.</param>
        public RetrieveResponse(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)
            {
                Octets = Convert.ToInt64(values[1]);
            }

            MessageLines = messageLines;
        }