7 writes to referenceCount
System.ServiceModel.Internals (7)
System\Runtime\Collections\ObjectCache.cs (7)
347this.referenceCount = 1; // start with a reference 406this.referenceCount++; 429this.referenceCount = -1; // not under a lock since we're not really in the cache 459this.referenceCount++; 465this.referenceCount--; 472this.referenceCount = -1; 497this.referenceCount = -1;
10 references to referenceCount
System.ServiceModel.Internals (10)
System\Runtime\Collections\ObjectCache.cs (10)
354return this.referenceCount; 383if (this.parent == null || this.referenceCount == -1) 392if (this.referenceCount == -1) 396else if (this.referenceCount == 0 && this.parent.ShouldPurgeItem(this, DateTime.UtcNow)) 428Fx.Assert(this.referenceCount == 1, "reference count should have never increased"); 437if (this.referenceCount > 1) 458Fx.Assert(this.referenceCount >= 0, "cannot take the item marked for disposal"); 464Fx.Assert(this.referenceCount > 0, "can only release an item that has references"); 471Fx.Assert(this.referenceCount == 0, "we should only dispose items without references"); 502Fx.Assert(this.referenceCount == -1, "we should only dispose items that have had LockedDispose called on them");