/// <summary> /// Raises the error event event. /// </summary> /// <param name="args">The <see cref="T:Mediachase.EMailRouter.ExceptionAbortEventArgs"/> instance containing the event data.</param> protected virtual void OnErrorEvent(ExceptionAbortEventArgs args) { if (this.Error != null) { this.Error(this, args); } }
private bool RaiseErrorEvent(Exception ex) { ExceptionAbortEventArgs args = new ExceptionAbortEventArgs(ex); RaiseErrorEvent(args); return(args.Abort); }
private void OnMessageLoaderError(object sender, ExceptionAbortEventArgs args) { if (args.Exception is Pop3Exception || args.Exception is System.Net.Sockets.SocketException || args.Exception is System.IO.IOException) { EMailRouterPop3BoxMessageLoader loader = (EMailRouterPop3BoxMessageLoader)sender; EMailRouterPop3Box.UpdateStatistic(loader.Owner.EMailRouterPop3BoxId, false, args.Exception.Message, 0); } else { Log.WriteError(args.Exception.ToString()); } }
/// <summary> /// Raises the error event. /// </summary> /// <param name="args">The <see cref="T:Mediachase.EMailRouter.ExceptionAbortEventArgs"/> instance containing the event data.</param> private void RaiseErrorEvent(ExceptionAbortEventArgs args) { OnErrorEvent(args); }
private bool RaiseErrorEvent(Exception ex) { ExceptionAbortEventArgs args = new ExceptionAbortEventArgs(ex); RaiseErrorEvent(args); return args.Abort; }