public InstanceCommandWithTemporaryHandleAsyncResult(InstanceStore instanceStore, InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.instanceStore = instanceStore; this.command = command; this.temporaryHandle = instanceStore.CreateInstanceHandle(); var currentTransaction = Transaction.Current; if (currentTransaction != null) { this.dependentTransaction = currentTransaction.DependentClone(DependentCloneOption.BlockCommitUntilComplete); } this.OnCompleting = completeCallback; IAsyncResult result; using (this.PrepareTransactionalCall(this.dependentTransaction)) { result = instanceStore.BeginExecute(this.temporaryHandle, command, timeout, this.PrepareAsyncCompletion(commandCompletedCallback), this); } if (this.SyncContinue(result)) { this.Complete(true); } }