Пример #1
0
        /// <summary>
        /// Raises event GetTopLines.
        /// </summary>
        /// <param name="session"></param>
        /// <param name="message">Message wich top lines to get.</param>
        /// <param name="nLines">Header + number of body lines to get.</param>
        /// <returns></returns>
        internal byte[] OnGetTopLines(POP3_Session session, POP3_Message message, int nLines)
        {
            POP3_Message_EventArgs oArgs = new POP3_Message_EventArgs(session, message, null, nLines);

            if (GetTopLines != null)
            {
                GetTopLines(this, oArgs);
            }
            return(oArgs.MessageData);
        }
Пример #2
0
        /// <summary>
        /// Raises delete message event.
        /// </summary>
        /// <param name="session"></param>
        /// <param name="message">Message which to delete.</param>
        /// <returns></returns>
        internal virtual bool OnDeleteMessage(POP3_Session session, POP3_Message message)
        {
            POP3_Message_EventArgs oArg = new POP3_Message_EventArgs(session, message, null);

            if (DeleteMessage != null)
            {
                DeleteMessage(this, oArg);
            }

            return(true);
        }