4 instantiations of PersistenceContext
System.ServiceModel.Activities (4)
System\ServiceModel\Activities\Dispatcher\PersistenceProviderDirectory.cs (4)
957
this.context = new
PersistenceContext
(this.ppd, this.suggestedIdOrId == Guid.Empty ? Guid.NewGuid() : this.suggestedIdOrId, this.key, this.associatedKeys);
1115
this.context = new
PersistenceContext
(this.ppd, this.ppd.store, this.handle, this.suggestedIdOrId, null, true, false, null, null);
1119
this.context = new
PersistenceContext
(this.ppd, this.ppd.store, this.handle, this.view.InstanceId, this.view.InstanceKeys.Values.Select((keyView) => new InstanceKey(keyView.InstanceKey, keyView.InstanceKeyMetadata)), true, true, this.view, null);
1128
this.context = new
PersistenceContext
(this.ppd, this.ppd.store, this.handle, this.view.InstanceId, this.view.InstanceKeys.Values.Select((keyView) => new InstanceKey(keyView.InstanceKey, keyView.InstanceKeyMetadata)), false, true, this.view, this.updatedIdentity);
71 references to PersistenceContext
System.ServiceModel.Activities (71)
System\ServiceModel\Activities\Dispatcher\DurableInstanceManager.cs (5)
613
IEnumerator<
PersistenceContext
> workflowServiceInstances;
683
IEnumerable<
PersistenceContext
> contexts = this.instanceManager.PersistenceProviderDirectory.GetContexts();
684
this.instanceCount = contexts.Count<
PersistenceContext
>();
1000
PersistenceContext
persistenceContext;
1230
PersistenceContext
previousPersistenceContext = thisPtr.persistenceContext;
System\ServiceModel\Activities\Dispatcher\PersistenceContext.cs (10)
722
PersistenceContext
persistenceContext;
724
public CloseAsyncResult(
PersistenceContext
persistenceContext, AsyncCallback callback, object state)
774
readonly
PersistenceContext
persistenceContext;
779
public SaveAsyncResult(
PersistenceContext
persistenceContext, IDictionary<XName, InstanceValue> instance, SaveStatus saveStatus, TimeSpan timeout,
971
readonly
PersistenceContext
persistenceContext;
975
public ReleaseAsyncResult(
PersistenceContext
persistenceContext, TimeSpan timeout, AsyncCallback callback, object state)
1123
readonly
PersistenceContext
persistenceContext;
1129
public AssociateKeysAsyncResult(
PersistenceContext
persistenceContext, ICollection<InstanceKey> associatedKeys, TimeSpan timeout,
1320
readonly
PersistenceContext
persistenceContext;
1324
public UpdateSuspendMetadataAsyncResult(
PersistenceContext
persistenceContext, Exception reason, TimeSpan timeout, AsyncCallback callback, object state)
System\ServiceModel\Activities\Dispatcher\PersistenceContextEnlistment.cs (13)
24
List<
PersistenceContext
> enlistedContexts;
31
internal PersistenceContextEnlistment(
PersistenceContext
context, Transaction transaction)
35
this.enlistedContexts = new List<
PersistenceContext
>();
39
internal void AddToEnlistment(
PersistenceContext
context)
169
foreach (
PersistenceContext
context in pcEnlist.enlistedContexts)
174
lock (
PersistenceContext
.Enlistments)
176
PersistenceContext
.Enlistments.Remove(pcEnlist.transaction.GetHashCode());
191
foreach (
PersistenceContext
context in pcEnlist.enlistedContexts)
197
lock (
PersistenceContext
.Enlistments)
199
PersistenceContext
.Enlistments.Remove(pcEnlist.transaction.GetHashCode());
214
foreach (
PersistenceContext
context in pcEnlist.enlistedContexts)
220
lock (
PersistenceContext
.Enlistments)
222
PersistenceContext
.Enlistments.Remove(pcEnlist.transaction.GetHashCode());
System\ServiceModel\Activities\Dispatcher\PersistenceProviderDirectory.cs (35)
32
readonly Dictionary<Guid,
PersistenceContext
> keyMap;
36
[Fx.Tag.Cache(typeof(
PersistenceContext
), Fx.Tag.CacheAttrition.ElementOnCallback, SizeLimit = "MaxConcurrentInstances")]
37
Dictionary<Guid,
PersistenceContext
> instanceCache;
76
this.keyMap = new Dictionary<Guid,
PersistenceContext
>();
77
this.instanceCache = new Dictionary<Guid,
PersistenceContext
>();
95
public WorkflowServiceInstance InitializeInstance(Guid instanceId,
PersistenceContext
context, IDictionary<XName, InstanceValue> instance, WorkflowCreationContext creationContext)
105
public WorkflowServiceInstance InitializeInstance(Guid instanceId,
PersistenceContext
context, WorkflowIdentity definitionIdentity, WorkflowIdentityKey updatedIdentity, IDictionary<XName, InstanceValue> instance, WorkflowCreationContext creationContext)
139
public IEnumerable<
PersistenceContext
> GetContexts()
186
public
PersistenceContext
EndLoad(IAsyncResult result, out bool fromCache)
218
public
PersistenceContext
EndLoadOrCreate(IAsyncResult result, out bool fromCache)
255
List<
PersistenceContext
> contextsToAbort = null;
262
foreach (
PersistenceContext
context in this.instanceCache.Values.ToArray())
293
PersistenceContext
context;
315
PersistenceContext
context;
329
internal bool TryAddAssociations(
PersistenceContext
context, IEnumerable<InstanceKey> keys, HashSet<InstanceKey> keysToAssociate, HashSet<InstanceKey> keysToDisassociate)
336
List<
PersistenceContext
> contextsToAbort = null;
353
PersistenceContext
conflictingContext;
376
PersistenceContext
contextToAbort;
397
internal void RemoveAssociations(
PersistenceContext
context, IEnumerable<InstanceKey> keys)
424
internal void RemoveInstance(
PersistenceContext
context)
430
internal void RemoveInstance(
PersistenceContext
context, bool permanent)
466
void AbortContexts(List<
PersistenceContext
> contextsToAbort)
470
foreach (
PersistenceContext
contextToAbort in contextsToAbort)
478
PersistenceContext
LoadFromCache(InstanceKey key, Guid suggestedIdOrId, bool canCreateInstance)
480
PersistenceContext
foundContext = null;
584
void DetachContext(
PersistenceContext
contextToAbort, ref List<
PersistenceContext
> contextsToAbort)
588
contextsToAbort = new List<
PersistenceContext
>();
594
void DetachContext(
PersistenceContext
contextToAbort)
730
PersistenceContext
context;
734
List<
PersistenceContext
> contextsToAbort;
741
PersistenceContext
result;
818
public static
PersistenceContext
End(IAsyncResult result, out bool fromCache)
1234
PersistenceContext
conflictingContext;
1252
PersistenceContext
contextToAbort;
System\ServiceModel\Activities\Dispatcher\TransactionWaitAsyncResult.cs (5)
21
internal TransactionWaitAsyncResult(Transaction transaction,
PersistenceContext
persistenceContext, TimeSpan timeout, AsyncCallback callback, object state)
79
internal
PersistenceContext
PersistenceContext { get; set; }
147
lock (
PersistenceContext
.Enlistments)
151
if (!
PersistenceContext
.Enlistments.TryGetValue(key, out enlistment))
158
PersistenceContext
.Enlistments.Add(key, enlistment);
System\ServiceModel\Activities\Dispatcher\WorkflowServiceInstance.cs (3)
74
PersistenceContext
persistenceContext;
138
WorkflowServiceInstance(Activity workflowDefinition, WorkflowIdentity definitionIdentity, Guid instanceId, WorkflowServiceHost serviceHost,
PersistenceContext
persistenceContext)
315
public static WorkflowServiceInstance InitializeInstance(
PersistenceContext
persistenceContext, Guid instanceId, Activity workflowDefinition, WorkflowIdentity definitionIdentity, IDictionary<XName, InstanceValue> loadedObject, WorkflowCreationContext creationContext,