1 write to instance
System.ServiceModel.Activities (1)
System\ServiceModel\Activities\Dispatcher\WorkflowServiceInstance.cs (1)
3373
this.
instance
= instance;
52 references to instance
System.ServiceModel.Activities (52)
System\ServiceModel\Activities\Dispatcher\WorkflowServiceInstance.cs (52)
3417
Fx.Assert(this.
instance
.Controller.IsPersistable, "The runtime won't schedule this work item unless we've passed the guard");
3437
this.
instance
.ReleaseLock(ref this.ownsLock, this.isIdlePolicyPersist && this.tryResult);
3473
if (this.
instance
.AcquireLockAsync(this.timeoutHelper.RemainingTime(), ref this.ownsLock, lockAcquiredCallback, this))
3485
if (!this.
instance
.ValidateStateForUnload())
3492
this.
instance
.ValidateStateForPersist();
3495
if (this.
instance
.Controller.IsPersistable)
3507
IAsyncResult result = this.
instance
.BeginWaitForCanPersist(ref this.ownsLock, this.timeoutHelper.RemainingTime(),
3572
thisPtr.
instance
.ReleaseLock(ref thisPtr.ownsLock, thisPtr.isIdlePolicyPersist && thisPtr.tryResult);
3586
if (this.
instance
.state != State.Suspended && !this.
instance
.IsIdle)
3597
if (!this.
instance
.TryReleaseLastReference())
3609
if (this.operation == PersistenceOperation.Unload && this.
instance
.Controller.State == WorkflowInstanceState.Complete)
3616
if (this.
instance
.persistenceContext != null && this.
instance
.persistenceContext.State == CommunicationState.Created)
3618
IAsyncResult result = this.
instance
.persistenceContext.BeginOpen(timeoutHelper.RemainingTime(),
3662
thisPtr.
instance
.isRunnable = false;
3667
thisPtr.
instance
.MarkUnloaded();
3671
thisPtr.
instance
.DecrementBusyCount();
3678
thisPtr.
instance
.ReleaseLock(ref thisPtr.ownsLock, thisPtr.isIdlePolicyPersist && thisPtr.tryResult);
3707
thisPtr.
instance
.EndWaitForCanPersist(result, ref thisPtr.ownsLock);
3716
thisPtr.
instance
.persistenceContext.EndOpen(result);
3726
if (this.
instance
.persistenceContext != null)
3730
this.
instance
.TrackPersistence(this.operation);
3733
if (this.
instance
.Controller.HasPendingTrackingRecords)
3735
IAsyncResult result = this.
instance
.Controller.BeginFlushTrackingRecords(this.
instance
.trackTimeout, PrepareInnerAsyncCompletion(trackingCompleteCallback), this);
3748
thisPtr.
instance
.Controller.EndFlushTrackingRecords(result);
3758
Dictionary<XName, InstanceValue> initialPersistenceData = this.
instance
.GeneratePersistenceData();
3763
List<IPersistencePipelineModule> modules = this.
instance
.PipelineModules;
3786
if (this.
instance
.persistenceContext != null)
3808
this.context = new WorkflowPersistenceContext(this.
instance
, (this.pipeline != null && this.pipeline.IsSaveTransactionRequired) || this.isCompletionTransactionRequired,
3809
this.dependentTransaction, this.
instance
.persistTimeout);
3814
result = this.
instance
.persistenceContext.BeginSave(this.data, this.saveStatus, this.
instance
.persistTimeout, PrepareInnerAsyncCompletion(persistedCallback), this);
3839
thisPtr.
instance
.persistenceContext.EndSave(result);
3867
this.context = new WorkflowPersistenceContext(this.
instance
, this.pipeline.IsSaveTransactionRequired || this.isCompletionTransactionRequired,
3868
this.dependentTransaction, this.
instance
.persistTimeout);
3871
this.
instance
.persistencePipelineInUse = this.pipeline;
3873
if (this.
instance
.abortingExtensions)
3887
this.
instance
.persistencePipelineInUse = null;
3914
thisPtr.
instance
.persistencePipelineInUse = null;
3926
if (this.isUnloaded && this.
instance
.Controller.State == WorkflowInstanceState.Complete && this.
instance
.creationContext != null)
3933
this.context = new WorkflowPersistenceContext(this.
instance
, this.isCompletionTransactionRequired,
3934
this.dependentTransaction, this.
instance
.persistTimeout);
3939
result = this.
instance
.creationContext.OnBeginWorkflowCompleted(this.
instance
.completionState, this.
instance
.workflowOutputs, this.
instance
.terminationException,
3969
thisPtr.
instance
.creationContext.OnEndWorkflowCompleted(result);
3991
this.
instance
.serviceHost.WorkflowServiceHostPerformanceCounters.WorkflowPersistDuration(GetDuration());
4001
this.
instance
.hasPersistedDeleted = this.operation == PersistenceOperation.Delete;