2 writes to InstanceHandle
System.Runtime.DurableInstancing (2)
System\Runtime\DurableInstancing\InstanceHandleReference.cs (2)
17
InstanceHandle
= instanceHandle;
27
InstanceHandle
= null;
46 references to InstanceHandle
System.Runtime.DurableInstancing (46)
System\Runtime\DurableInstancing\InstanceHandleReference.cs (1)
26
Fx.Assert(
InstanceHandle
!= null, "InstanceHandleReference already cancelled.");
System\Runtime\DurableInstancing\InstanceOwner.cs (45)
107
Fx.Assert(reference.
InstanceHandle
!= null, "Cannot cancel and complete a bind.");
108
Fx.Assert(reference.
InstanceHandle
.Version != -1, "Handle state must be set first.");
109
Fx.Assert(object.ReferenceEquals(this, reference.
InstanceHandle
.Owner), "TryCompleteBind called on the wrong owner for a handle.");
118
if (BoundHandles.TryGetValue(reference.
InstanceHandle
.Id, out existingHandle))
120
Fx.AssertAndFailFast(!object.ReferenceEquals(existingHandle, reference.
InstanceHandle
), "InstanceStore lock state is not correct.");
121
if (existingHandle.Version <= 0 || reference.
InstanceHandle
.Version <= 0)
123
if (existingHandle.Version != 0 || reference.
InstanceHandle
.Version != 0)
128
reference.
InstanceHandle
.ConflictingHandle = existingHandle;
132
if (existingHandle.Version > reference.
InstanceHandle
.Version)
134
reference.
InstanceHandle
.ConflictingHandle = existingHandle;
138
if (existingHandle.Version < reference.
InstanceHandle
.Version)
140
existingHandle.ConflictingHandle = reference.
InstanceHandle
;
142
BoundHandles[reference.
InstanceHandle
.Id] = reference.
InstanceHandle
;
146
if (existingHandle.Version == reference.
InstanceHandle
.Version)
156
BoundHandles.Add(reference.
InstanceHandle
.Id, reference.
InstanceHandle
);
177
Fx.Assert(reference.
InstanceHandle
!= null, "Cannot cancel and complete a bind.");
178
Fx.Assert(reference.
InstanceHandle
.Id != Guid.Empty, "Must be bound to an instance already.");
189
if (BoundHandles.TryGetValue(reference.
InstanceHandle
.Id, out existingHandle))
191
Fx.AssertAndFailFast(!object.ReferenceEquals(existingHandle, reference.
InstanceHandle
), "InstanceStore lock state is not correct in InitiateLockResolution.");
199
reference.
InstanceHandle
.ConflictingHandle = existingHandle;
205
reference.
InstanceHandle
.ConflictingHandle = existingHandle;
213
markerReference = new LockResolutionMarker(reference.
InstanceHandle
, instanceVersion);
243
Fx.Assert(reference.
InstanceHandle
!= null, "InstanceBound called after cancelling.");
244
Fx.Assert(reference.
InstanceHandle
.Id != Guid.Empty, "InstanceBound called, but the handle isn't bound.");
256
Fx.Assert(reference.
InstanceHandle
!= null, "Reference already canceled in CancelBind.");
257
Fx.Assert(object.ReferenceEquals(this, reference.
InstanceHandle
.Owner), "CancelBind called on the wrong owner for a handle.");
268
Fx.Assert(reference.
InstanceHandle
!= null, "Reference already canceled in FaultBind.");
269
Fx.Assert(object.ReferenceEquals(this, reference.
InstanceHandle
.Owner), "FaultBind called on the wrong owner for a handle.");
298
Fx.Assert(reference.
InstanceHandle
!= null, "Reference already canceled in FinishBind.");
299
Fx.Assert(object.ReferenceEquals(this, reference.
InstanceHandle
.Owner), "FinishBind called on the wrong owner for a handle.");
319
marker.
InstanceHandle
.ConflictingHandle = marker.ConflictingHandle;
332
Guid wasBoundToInstanceId = reference.
InstanceHandle
.Id;
362
if (handleRef.
InstanceHandle
!= null)
387
if (handleRef.
InstanceHandle
!= null)
389
if (handleRef.
InstanceHandle
.Id == Guid.Empty)
395
if (!InProgressHandlesPerInstance.TryGetValue(handleRef.
InstanceHandle
.Id, out acceptingQueue))
401
InProgressHandlesPerInstance.Add(handleRef.
InstanceHandle
.Id, acceptingQueue);
421
else if (handleRef.
InstanceHandle
.Id != Guid.Empty)
424
if (!InProgressHandlesPerInstance.TryGetValue(handleRef.
InstanceHandle
.Id, out queue))
427
InProgressHandlesPerInstance.Add(handleRef.
InstanceHandle
.Id, queue);
452
if (BoundHandles.TryGetValue(marker.
InstanceHandle
.Id, out existingHandle))
454
Fx.AssertAndFailFast(!object.ReferenceEquals(existingHandle, marker.
InstanceHandle
), "InstanceStore lock state is not correct in CheckOldestReference.");
536
Fx.Assert(
InstanceHandle
!= null, "NotifyNonConflicting called on a cancelled LockResolutionMarker.");