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