public bool TryUnload() { using (new WorkflowTraceTransfer(this.InstanceId)) { WorkflowExecutor executor = this._runtime.Load(this); using (executor.ExecutorLock.Enter()) { if (executor.IsInstanceValid) { try { return(executor.TryUnload()); } catch (InvalidOperationException) { if (executor.IsInstanceValid) { throw; } } } } return(false); } }