private void OnUnload(WorkflowApplicationEventArgs arg) { Log.DebugFormat("OnUnload()"); InstanceId = arg.InstanceId; Unloaded.Set(); SynchronizationContext.CompleteWork(); }
private UnhandledExceptionAction OnException(WorkflowApplicationUnhandledExceptionEventArgs arg) { Log.WarnFormat("Error: {0} - {1}", arg.ExceptionSource, arg.UnhandledException); lock (Result) { Result.Error = arg.UnhandledException; } Unloaded.Set(); return(UnhandledExceptionAction.Abort); }