79 references to Instance
System.ServiceModel.Activities (79)
System\ServiceModel\Activities\Dispatcher\WorkflowServiceInstance.cs (79)
4157if (this.OperationTransaction != null && this.Instance.transactionContext == null) 4159this.Instance.transactionContext = new TransactionContext(this.Instance, this.OperationTransaction); 4160this.Instance.isInTransaction = true; 4161this.Instance.isRunnable = false; 4285return this.Instance.ValidateStateForTerminate(this.OperationTransaction); 4290this.Instance.Controller.Terminate(reason); 4293if (this.Instance.persistenceContext.IsSuspended) 4295this.Instance.persistenceContext.IsSuspended = false; 4296this.Instance.persistenceContext.SuspendedReason = null; 4300if (!this.Instance.isInTransaction) 4302this.Instance.isRunnable = true; 4303this.Instance.state = State.Active; 4308this.Instance.GetCompletionState(); 4314this.Instance.CompletePendingOperations(); 4348if (!this.shouldTrackAbort && this.Instance.hasDataToPersist) 4366return this.Instance.ValidateStateForAbort(); 4372Fx.Assert(!this.shouldTrackAbort && this.Instance.hasDataToPersist, "We should only get here when we need to terminate the unload."); 4375this.Instance.RecoverLastReference(); 4382return this.Instance.persistenceContext.BeginRelease(this.Instance.persistTimeout, callback, state); 4391this.Instance.AbortInstance(this.reason, true); 4400this.Instance.persistenceContext.EndRelease(result); 4401if (!this.shouldTrackAbort && this.Instance.Controller.TrackingEnabled) 4403this.Instance.Controller.Track(new WorkflowInstanceRecord(this.Instance.Id, this.Instance.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Unloaded, this.Instance.DefinitionIdentity)); 4411this.Instance.AbortInstance(this.reason, true, this.shouldTrackAbort); 4420this.Instance.AbortInstance(this.reason, true); 4462return this.Instance.ValidateStateForAbort(); 4474return this.Instance.persistenceContext.BeginUpdateSuspendMetadata(this.reason, this.Instance.persistTimeout, callback, state); 4483this.Instance.AbortInstance(this.reason, true); 4492this.Instance.persistenceContext.EndUpdateSuspendMetadata(result); 4494if (this.Instance.Controller.TrackingEnabled) 4496this.Instance.Controller.Track(new WorkflowInstanceSuspendedRecord(this.Instance.Id, this.Instance.WorkflowDefinition.DisplayName, data.reason.Message, this.Instance.DefinitionIdentity)); 4499this.Instance.serviceHost.WorkflowServiceHostPerformanceCounters.WorkflowSuspended(); 4503this.Instance.AbortInstance(this.reason, true); 4537return this.Instance.ValidateStateForCancel(this.OperationTransaction); 4542this.Instance.Controller.ScheduleCancel(); 4545if (this.Instance.persistenceContext.IsSuspended) 4547this.Instance.persistenceContext.IsSuspended = false; 4548this.Instance.persistenceContext.SuspendedReason = null; 4552if (!this.Instance.isInTransaction) 4554this.Instance.isRunnable = true; 4555this.Instance.state = State.Active; 4560this.Instance.isTransactedCancelled = true; 4566this.Instance.CompletePendingOperations(); 4594return this.Instance.ValidateStateForRun(this.OperationTransaction, this.operationName); 4599if (!this.Instance.isInTransaction) 4601this.Instance.RunCore(); 4644return this.Instance.ValidateStateForSuspend(this.OperationTransaction); 4664this.Instance.CompletePendingOperations(); 4678IAsyncResult result = this.parent.Instance.BeginWaitForCanPersist(ref this.parent.ownsLock, this.parent.timeoutHelper.RemainingTime(), 4694thisPtr.parent.Instance.EndWaitForCanPersist(result, ref thisPtr.parent.ownsLock); 4696thisPtr.parent.Instance.persistenceContext.IsSuspended = true; 4697thisPtr.parent.Instance.persistenceContext.SuspendedReason = thisPtr.parent.reason; 4698thisPtr.parent.Instance.state = State.Suspended; 4700if (thisPtr.parent.Instance.Controller.TrackingEnabled) 4702thisPtr.parent.Instance.Controller.Track(new WorkflowInstanceSuspendedRecord(thisPtr.parent.Instance.Id, thisPtr.parent.Instance.WorkflowDefinition.DisplayName, thisPtr.parent.reason, thisPtr.parent.Instance.DefinitionIdentity)); 4720thisPtr.parent.Instance.Controller.RequestPause(); 4748return this.Instance.ValidateStateForUnsuspend(this.OperationTransaction); 4753if (!this.Instance.isInTransaction) 4755this.Instance.isRunnable = true; 4757this.Instance.persistenceContext.IsSuspended = false; 4758this.Instance.persistenceContext.SuspendedReason = null; 4759this.Instance.state = State.Active; 4761if (this.Instance.Controller.TrackingEnabled) 4763this.Instance.Controller.Track(new WorkflowInstanceRecord(this.Instance.Id, this.Instance.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Unsuspended, this.Instance.DefinitionIdentity));