/// <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); } }
/// <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); } }