1 write to _dictionary
Microsoft.CodeAnalysis.Collections.Package (1)
Segmented\ImmutableSegmentedDictionary`2.cs (1)
81
_dictionary
= dictionary ?? throw new ArgumentNullException(nameof(dictionary));
37 references to _dictionary
Microsoft.CodeAnalysis.Collections.Package (37)
Segmented\ImmutableSegmentedDictionary`2.cs (23)
66
/// <see cref="
_dictionary
"/> field, that counts as a dereference of <c>this</c>. Calling other instance members
84
public IEqualityComparer<TKey> KeyComparer =>
_dictionary
.Comparer;
86
public int Count =>
_dictionary
.Count;
88
public bool IsEmpty =>
_dictionary
.Count == 0;
90
public bool IsDefault =>
_dictionary
== null;
92
public bool IsDefaultOrEmpty =>
_dictionary
?.Count is null or 0;
116
object ICollection.SyncRoot =>
_dictionary
;
120
public TValue this[TKey key] =>
_dictionary
[key];
130
get => ((IDictionary)
_dictionary
)[key];
190
=>
_dictionary
.ContainsKey(key);
193
=>
_dictionary
.ContainsValue(value);
196
=> new(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
201
if (!self.
_dictionary
.ContainsKey(key))
265
=>
_dictionary
.TryGetValue(key, out value);
301
=>
_dictionary
?.GetHashCode() ?? 0;
310
=>
_dictionary
== other.
_dictionary
;
333
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
336
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.DictionaryEntry);
339
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
342
=> ((ICollection<KeyValuePair<TKey, TValue>>)
_dictionary
).CopyTo(array, arrayIndex);
345
=> ((IDictionary)
_dictionary
).Contains(key);
348
=> ((ICollection)
_dictionary
).CopyTo(array, index);
Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (2)
45
=> _dictionary.
_dictionary
.Keys.CopyTo(array, arrayIndex);
48
=> ((ICollection)_dictionary.
_dictionary
.Keys).CopyTo(array, index);
Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (8)
22
var dictionary = Volatile.Read(ref Unsafe.AsRef(in location.
_dictionary
));
31
var dictionary = Interlocked.Exchange(ref Unsafe.AsRef(in location.
_dictionary
), value.
_dictionary
);
40
var dictionary = Interlocked.CompareExchange(ref Unsafe.AsRef(in location.
_dictionary
), value.
_dictionary
, comparand.
_dictionary
);
49
=> ref SegmentedCollectionsMarshal.GetValueRefOrNullRef(dictionary.
_dictionary
, key);
57
=> dictionary.
_dictionary
;
Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (2)
60
internal readonly SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _mutableDictionary ?? _dictionary.
_dictionary
;
104
_mutableDictionary = new SegmentedDictionary<TKey, TValue>(originalDictionary.
_dictionary
, originalDictionary.KeyComparer);
Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (2)
45
=> _dictionary.
_dictionary
.Values.CopyTo(array, arrayIndex);
48
=> ((ICollection)_dictionary.
_dictionary
.Values).CopyTo(array, index);