1 write to _dictionary
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
79
_dictionary
= dictionary ?? throw new ArgumentNullException(nameof(dictionary));
37 references to _dictionary
Microsoft.CodeAnalysis (37)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (23)
64
/// <see cref="
_dictionary
"/> field, that counts as a dereference of <c>this</c>. Calling other instance members
82
public IEqualityComparer<TKey> KeyComparer =>
_dictionary
.Comparer;
84
public int Count =>
_dictionary
.Count;
86
public bool IsEmpty =>
_dictionary
.Count == 0;
88
public bool IsDefault =>
_dictionary
== null;
90
public bool IsDefaultOrEmpty =>
_dictionary
?.Count is null or 0;
114
object ICollection.SyncRoot =>
_dictionary
;
118
public TValue this[TKey key] =>
_dictionary
[key];
128
get => ((IDictionary)
_dictionary
)[key];
188
=>
_dictionary
.ContainsKey(key);
191
=>
_dictionary
.ContainsValue(value);
194
=> new(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
199
if (!self.
_dictionary
.ContainsKey(key))
263
=>
_dictionary
.TryGetValue(key, out value);
299
=>
_dictionary
?.GetHashCode() ?? 0;
308
=>
_dictionary
== other.
_dictionary
;
331
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
334
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.DictionaryEntry);
337
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
340
=> ((ICollection<KeyValuePair<TKey, TValue>>)
_dictionary
).CopyTo(array, arrayIndex);
343
=> ((IDictionary)
_dictionary
).Contains(key);
346
=> ((ICollection)
_dictionary
).CopyTo(array, index);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (2)
43
=> _dictionary.
_dictionary
.Keys.CopyTo(array, arrayIndex);
46
=> ((ICollection)_dictionary.
_dictionary
.Keys).CopyTo(array, index);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (8)
20
var dictionary = Volatile.Read(ref Unsafe.AsRef(in location.
_dictionary
));
29
var dictionary = Interlocked.Exchange(ref Unsafe.AsRef(in location.
_dictionary
), value.
_dictionary
);
38
var dictionary = Interlocked.CompareExchange(ref Unsafe.AsRef(in location.
_dictionary
), value.
_dictionary
, comparand.
_dictionary
);
47
=> ref SegmentedCollectionsMarshal.GetValueRefOrNullRef(dictionary.
_dictionary
, key);
55
=> dictionary.
_dictionary
;
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (2)
58
internal readonly SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _mutableDictionary ?? _dictionary.
_dictionary
;
102
_mutableDictionary = new SegmentedDictionary<TKey, TValue>(originalDictionary.
_dictionary
, originalDictionary.KeyComparer);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (2)
43
=> _dictionary.
_dictionary
.Values.CopyTo(array, arrayIndex);
46
=> ((ICollection)_dictionary.
_dictionary
.Values).CopyTo(array, index);