Exemple #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(Pop3Session session, Pop3Message message, int nLines)
        {
            Pop3Message_EventArgs oArgs = new Pop3Message_EventArgs(session, message, null, nLines);

            if (this.GetTopLines != null)
            {
                this.GetTopLines(this, oArgs);
            }
            return(oArgs.MessageData);
        }
Exemple #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(Pop3Session session, Pop3Message message)
        {
            Pop3Message_EventArgs oArg = new Pop3Message_EventArgs(session, message, null);

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

            return(true);
        }
Exemple #3
0
        /// <summary>
        /// Raises event get message.
        /// </summary>
        /// <param name="session"></param>
        /// <param name="message">Message which to get.</param>
        /// <param name="sessionSocket">Message which to get.</param>
        /// <returns></returns>
        internal virtual byte[] OnGetMail(Pop3Session session, Pop3Message message, Socket sessionSocket)
        {
            Pop3Message_EventArgs oArg = new Pop3Message_EventArgs(session, message, sessionSocket);

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

            return(oArg.MessageData);
        }
		/// <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(Pop3Session session,Pop3Message message,int nLines)
		{
			Pop3Message_EventArgs oArgs = new Pop3Message_EventArgs(session,message,null,nLines);
			if(this.GetTopLines != null){
				this.GetTopLines(this,oArgs);
			}
			return oArgs.MessageData;
		}
		/// <summary>
		/// Raises delete message event.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="message">Message which to delete.</param>
		/// <returns></returns>
		internal virtual bool OnDeleteMessage(Pop3Session session,Pop3Message message) 
		{				
			Pop3Message_EventArgs oArg = new Pop3Message_EventArgs(session,message,null);
			if(this.DeleteMessage != null){
				this.DeleteMessage(this,oArg);
			}
			
			return true;
		}
		/// <summary>
		/// Raises event get message.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="message">Message which to get.</param>
		/// <param name="sessionSocket">Message which to get.</param>
		/// <returns></returns>
		internal virtual byte[] OnGetMail(Pop3Session session,Pop3Message message,Socket sessionSocket) 
		{			
			Pop3Message_EventArgs oArg = new Pop3Message_EventArgs(session,message,sessionSocket);
			if(this.GetMessage != null){
				this.GetMessage(this,oArg);
			}
			
			return oArg.MessageData;
		}