1 write to _set
Microsoft.CodeAnalysis.Threading.Package (1)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
75_set = set;
30 references to _set
Microsoft.CodeAnalysis.Threading.Package (30)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (20)
60/// <see cref="_set"/> field, that counts as a dereference of <c>this</c>. Calling other instance members 79public IEqualityComparer<T> KeyComparer => _set.Comparer; 82public int Count => _set.Count; 84public bool IsDefault => _set == null; 87public bool IsEmpty => _set.Count == 0; 93object ICollection.SyncRoot => _set; 145=> _set.Contains(value); 177=> new(_set); 199=> _set.IsProperSubsetOf(other); 203=> _set.IsProperSupersetOf(other); 207=> _set.IsSubsetOf(other); 211=> _set.IsSupersetOf(other); 215=> _set.Overlaps(other); 237=> _set.SetEquals(other); 268if (_set.TryGetValue(equalValue, out var value)) 313return new ImmutableSegmentedHashSet<T>(new SegmentedHashSet<T>(self._set, equalityComparer)); 317=> _set?.GetHashCode() ?? 0; 323=> _set == other._set; 347=> _set.CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (7)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set)); 31var set = Interlocked.Exchange(ref Unsafe.AsRef(in location._set), value._set); 40var set = Interlocked.CompareExchange(ref Unsafe.AsRef(in location._set), value._set, comparand._set); 53=> set._set;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (3)
58internal readonly SegmentedHashSet<T> ReadOnlySet => _mutableSet ?? _set._set; 70_mutableSet = new SegmentedHashSet<T>(originalSet._set, originalSet.KeyComparer); 141GetOrCreateMutableSet().ExceptWith(otherSet._set);