Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 4
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;
		}
Esempio n. 5
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;
		}
Esempio n. 6
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;
		}