コード例 #1
0
ファイル: Pop3Connection.cs プロジェクト: alex765022/IBN
        /// <summary>
        /// Uidls this instance.
        /// </summary>
        /// <returns></returns>
        public Pop3UIDInfoList Uidl()
        {
            this.SendCommand("UIDL\r\n");
            string uidlResponse = this.ReadOKResponse();

            Pop3UIDInfoList list = new Pop3UIDInfoList();

            while (true)
            {
                string responseLine = ReadLine();

                if (responseLine.StartsWith("."))
                {
                    break;
                }

                string[] NumArray = responseLine.Split(_Delimiter);
                if (NumArray.Length != 2)
                {
                    throw new Pop3ServerIncorectAnswerException();
                }

                Pop3UIDInfo message = null;

                try
                {
                    message = new Pop3UIDInfo(Int32.Parse(NumArray[0]), NumArray[1]);
                }
                catch (Exception ex)
                {
                    throw new Pop3ServerIncorectAnswerException("Incorect response format.", ex);
                }

                list.Add(message);
            }
            return(list);
        }
コード例 #2
0
ファイル: Pop3Connection.cs プロジェクト: 0anion0/IBN
        /// <summary>
        /// Uidls this instance.
        /// </summary>
        /// <returns></returns>
        public Pop3UIDInfoList Uidl()
        {
            this.SendCommand("UIDL\r\n");
            string uidlResponse = this.ReadOKResponse();

            Pop3UIDInfoList list = new Pop3UIDInfoList();

            while (true)
            {
                string responseLine = ReadLine();

                if (responseLine.StartsWith("."))
                    break;

                string[] NumArray = responseLine.Split(_Delimiter);
                if (NumArray.Length != 2)
                    throw new Pop3ServerIncorectAnswerException();

                Pop3UIDInfo message = null;

                try
                {
                    message = new Pop3UIDInfo(Int32.Parse(NumArray[0]), NumArray[1]);
                }
                catch (Exception ex)
                {
                    throw new Pop3ServerIncorectAnswerException("Incorect response format.", ex);
                }

                list.Add(message);
            }
            return list;
        }
コード例 #3
0
ファイル: Pop3UIDInfoList.cs プロジェクト: 0anion0/IBN
 internal void Add(Pop3UIDInfo uid)
 {
     this.List.Add(uid);
 }
コード例 #4
0
ファイル: Pop3UIDInfoList.cs プロジェクト: alex765022/IBN
 internal void Add(Pop3UIDInfo uid)
 {
     this.List.Add(uid);
 }