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