Beispiel #1
0
        /// POP3メールサーバーへListコマンドを送信します。
        /// <summary>
        /// Send list command to pop3 server.
        /// POP3メールサーバーへListコマンドを送信します。
        /// </summary>
        /// <param name="mailIndex"></param>
        /// <returns></returns>
        public ListCommandResult ExecuteList(Int64 mailIndex)
        {
            ListCommand       cm = new ListCommand(mailIndex);
            ListCommandResult rs = null;
            String            s  = "";

            this.CheckAuthenticate();
            s = this.Execute(cm);
            this.CheckResponseError(s);
            rs = new ListCommandResult(s);
            return(rs);
        }
Beispiel #2
0
        /// 非同期でPOP3メールサーバーへListコマンドを送信します。
        /// <summary>
        /// Send asynchronous list command to pop3 server.
        /// 非同期でPOP3メールサーバーへListコマンドを送信します。
        /// </summary>
        /// <param name="mailIndex"></param>
        /// <param name="callbackFunction"></param>
        /// <returns></returns>
        public void ExecuteList(Int64 mailIndex, Action <List <ListCommandResult> > callbackFunction)
        {
            ListCommand cm = new ListCommand(mailIndex);

            Action <Pop3CommandResult> md = response =>
            {
                this.CheckResponseError(response);
                List <ListCommandResult> l = new List <ListCommandResult>();
                var rs = new ListCommandResult(response.Text);
                l.Add(rs);
                callbackFunction(l);
            };

            this.CheckAuthenticate();
            this.BeginExecute(cm, md);
        }
Beispiel #3
0
        /// 非同期でPOP3メールサーバーへListコマンドを送信します。
        /// <summary>
        /// Send asynchronous list command to pop3 server.
        /// 非同期でPOP3メールサーバーへListコマンドを送信します。
        /// </summary>
        /// <param name="mailIndex"></param>
        /// <param name="callbackFunction"></param>
        /// <returns></returns>
        public void ExecuteList(Int64 mailIndex, Action<List<ListCommandResult>> callbackFunction)
        {
            ListCommand cm = new ListCommand(mailIndex);

            Action<Pop3CommandResult> md = response =>
            {
                this.CheckResponseError(response);
                List<ListCommandResult> l = new List<ListCommandResult>();
                var rs = new ListCommandResult(response.Text);
                l.Add(rs);
                callbackFunction(l);
            };
            this.CheckAuthenticate();
            this.BeginExecute(cm, md);
        }
Beispiel #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="text"></param>
 public ListCommandResult(String text)
 {
     this._MailIndex = ListCommandResult.GetMessageIndex(text);
     this._Size      = ListCommandResult.GetSize(text);
 }