예제 #1
0
 /// <summary>
 ///     Used to invoke the <see cref="WorkFailed" /> event
 /// </summary>
 private void OnFailed(Exception e)
 {
     logger.Log(LogLevel.Error, this, string.Format("{0}: {1}", MethodBase.GetCurrentMethod(), e));
     if (WorkFailed != null)
     {
         WorkFailed.BeginInvoke(this, e, iar => WorkFailed.EndInvoke(iar), null);
     }
 }
예제 #2
0
 /// <summary>
 ///     Used to invoke the <see cref="WorkFailed" /> event
 /// </summary>
 private void OnFailed(Exception e)
 {
     //LogError("Worker failed at {0}", DateTime.Now);
     LogException(e, MethodBase.GetCurrentMethod());
     if (WorkFailed != null)
     {
         WorkFailed.BeginInvoke(this, e, iar => WorkFailed.EndInvoke(iar), null);
     }
 }