コード例 #1
0
        /*
         *      /// <summary>
         *      /// Raises event 'Search'.
         *      /// </summary>
         *      /// <param name="session">IMAP session what calls this search.</param>
         *      /// <param name="folder">Folder what messages to search.</param>
         *      /// <param name="matcher">Matcher what must be used to check if message matches searching criterial.</param>
         *      /// <returns></returns>
         *      internal IMAP_eArgs_Search OnSearch(IMAP_Session session,string folder,IMAP_SearchMatcher matcher)
         *      {
         *              IMAP_eArgs_Search eArgs = new IMAP_eArgs_Search(session,folder,matcher);
         *              if(this.Search != null){
         *                      this.Search(session,eArgs);
         *              }
         *
         *              return eArgs;
         *      }*/

        /// <summary>
        /// Raises event 'StoreMessageFlags'.
        /// </summary>
        /// <param name="session">Reference to IMAP session.</param>
        /// <param name="msg">Message which flags to store.</param>
        /// <returns></returns>
        internal string OnStoreMessageFlags(IMAP_Session session, IMAP_Message msg)
        {
            Message_EventArgs eArgs =
                new Message_EventArgs(Core.Decode_IMAP_UTF7_String(session.SelectedMailbox), msg);

            if (StoreMessageFlags != null)
            {
                StoreMessageFlags(session, eArgs);
            }

            return(eArgs.ErrorText);
        }
コード例 #2
0
        /// <summary>
        /// Raises event 'CopyMessage'.
        /// </summary>
        /// <param name="session">Reference to IMAP session.</param>
        /// <param name="msg">Message which to copy.</param>
        /// <param name="location">New message location.</param>
        /// <returns></returns>
        internal string OnCopyMessage(IMAP_Session session, IMAP_Message msg, string location)
        {
            Message_EventArgs eArgs =
                new Message_EventArgs(Core.Decode_IMAP_UTF7_String(session.SelectedMailbox), msg, location);

            if (CopyMessage != null)
            {
                CopyMessage(session, eArgs);
            }

            return(eArgs.ErrorText);
        }
コード例 #3
0
        /// <summary>
        /// Raises event 'DeleteMessage'.
        /// </summary>
        /// <param name="session">Reference to IMAP session.</param>
        /// <param name="message">Message which to delete.</param>
        /// <returns></returns>
        internal string OnDeleteMessage(IMAP_Session session, IMAP_Message message)
        {
            Message_EventArgs eArgs =
                new Message_EventArgs(Core.Decode_IMAP_UTF7_String(session.SelectedMailbox), message);

            if (DeleteMessage != null)
            {
                DeleteMessage(session, eArgs);
            }

            return(eArgs.ErrorText);
        }
コード例 #4
0
        /// <summary>
        /// Raises event 'StoreMessage'.
        /// </summary>
        /// <param name="session">Reference to IMAP session.</param>
        /// <param name="folder">Folder where to store.</param>
        /// <param name="msg">Message which to store.</param>
        /// <param name="messageData">Message data which to store.</param>
        /// <returns></returns>
        internal string OnStoreMessage(IMAP_Session session,
                                       string folder,
                                       IMAP_Message msg,
                                       byte[] messageData)
        {
            Message_EventArgs eArgs = new Message_EventArgs(folder, msg);

            eArgs.MessageData = messageData;
            if (StoreMessage != null)
            {
                StoreMessage(session, eArgs);
            }

            return(eArgs.ErrorText);
        }