Example #1
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="errorType"></param>
 /// <param name="affectedEmails"></param>
 /// <param name="errorText"></param>
 /// <param name="jobID"></param>
 public SMTP_Error(SMTP_ErrorType errorType, string[] affectedEmails, string errorText, string jobID)
 {
     m_ErrorType      = errorType;
     m_AffectedEmails = affectedEmails;
     m_ErrorText      = errorText;
     m_jobID          = jobID;
 }
Example #2
0
        /// <summary>
        /// Raises Error event.
        /// </summary>
        /// <param name="type">Error type.</param>
        /// <param name="affectedAddresses">Affected email addresses.</param>
        /// <param name="errorText">Error text.</param>
        protected void OnError(SMTP_ErrorType type, string[] affectedAddresses, string errorText)
        {
            // we must lock write(add), becuse multiple Threads may raise OnError same time.
            lock (m_pErrors){
                m_pErrors.Add(new SMTP_Error(type, affectedAddresses, errorText));
            }

            if (this.Error != null)
            {
                if (m_pOwnerUI == null)
                {
                    this.Error(this, new SMTP_Error(type, affectedAddresses, errorText));
                }
                // For UI we must use invoke, because UI doesn't support multi Threading.
                else
                {
                    m_pOwnerUI.Invoke(this.Error, new object[] { this, new SMTP_Error(type, affectedAddresses, errorText) });
                }
            }
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="errorType"></param>
 /// <param name="affectedEmails"></param>
 /// <param name="errorText"></param>
 public SMTP_Error(SMTP_ErrorType errorType, string[] affectedEmails, string errorText)
 {
     m_ErrorType      = errorType;
     m_AffectedEmails = affectedEmails;
     m_ErrorText      = errorText;
 }
Example #4
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="errorType"></param>
 /// <param name="affectedEmails"></param>
 /// <param name="errorText"></param>
 public SMTP_Error(SMTP_ErrorType errorType,string[] affectedEmails,string errorText)
 {
     m_ErrorType      = errorType;
     m_AffectedEmails = affectedEmails;
     m_ErrorText      = errorText;
 }
		/// <summary>
		/// Raises Error event.
		/// </summary>
		/// <param name="type">Error type.</param>
		/// <param name="affectedAddresses">Affected email addresses.</param>
		/// <param name="errorText">Error text.</param>
		protected void OnError(SMTP_ErrorType type,string[] affectedAddresses,string errorText)
		{
			// we must lock write(add), becuse multiple Threads may raise OnError same time.
			lock(m_pErrors){
				m_pErrors.Add(new SMTP_Error(type,affectedAddresses,errorText));
			}

			if(this.Error != null){
				if(m_pOwnerUI == null){
					this.Error(this,new SMTP_Error(type,affectedAddresses,errorText));
				}
				// For UI we must use invoke, because UI doesn't support multi Threading.
				else{
					m_pOwnerUI.Invoke(this.Error,new object[]{this,new SMTP_Error(type,affectedAddresses,errorText)});
				}
			}
		}