1 write to _dictionary
Microsoft.Build.Framework (1)
ImmutableSegmentedDictionary`2.cs (1)
79
_dictionary
= dictionary ?? throw new ArgumentNullException(nameof(dictionary));
44 references to _dictionary
Microsoft.Build.Framework (44)
ImmutableSegmentedDictionary`2.cs (32)
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];
150
var dictionary = new SegmentedDictionary<TKey, TValue>(self.
_dictionary
, self.
_dictionary
.Comparer);
168
ICollection<KeyValuePair<TKey, TValue>> collectionToCheck = dictionary ?? self.
_dictionary
;
172
dictionary ??= new SegmentedDictionary<TKey, TValue>(self.
_dictionary
, self.
_dictionary
.Comparer);
200
=>
_dictionary
.ContainsKey(key);
203
=>
_dictionary
.ContainsValue(value);
206
=> new(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
211
if (!self.
_dictionary
.ContainsKey(key))
214
var dictionary = new SegmentedDictionary<TKey, TValue>(self.
_dictionary
, self.
_dictionary
.Comparer);
237
var dictionary = new SegmentedDictionary<TKey, TValue>(self.
_dictionary
, self.
_dictionary
.Comparer);
275
=>
_dictionary
.TryGetValue(key, out value);
308
=>
_dictionary
?.GetHashCode() ?? 0;
317
=>
_dictionary
== other.
_dictionary
;
340
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
343
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.DictionaryEntry);
346
=> new Enumerator(
_dictionary
, Enumerator.ReturnType.KeyValuePair);
349
=> ((ICollection<KeyValuePair<TKey, TValue>>)
_dictionary
).CopyTo(array, arrayIndex);
352
=> ((IDictionary)
_dictionary
).Contains(key);
355
=> ((ICollection)
_dictionary
).CopyTo(array, index);
ImmutableSegmentedDictionary`2+Builder.cs (2)
60
private SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _mutableDictionary ?? _dictionary.
_dictionary
;
98
return _mutableDictionary ??= new SegmentedDictionary<TKey, TValue>(_dictionary.
_dictionary
, _dictionary.KeyComparer);
ImmutableSegmentedDictionary`2+KeyCollection.cs (2)
43
=> _dictionary.
_dictionary
.Keys.CopyTo(array, arrayIndex);
46
=> ((ICollection)_dictionary.
_dictionary
.Keys).CopyTo(array, index);
ImmutableSegmentedDictionary`2+PrivateInterlocked.cs (6)
19
var dictionary = Volatile.Read(ref Unsafe.AsRef(in location.
_dictionary
));
28
var dictionary = Interlocked.Exchange(ref Unsafe.AsRef(in location.
_dictionary
), value.
_dictionary
);
37
var dictionary = Interlocked.CompareExchange(ref Unsafe.AsRef(in location.
_dictionary
), value.
_dictionary
, comparand.
_dictionary
);
ImmutableSegmentedDictionary`2+ValueCollection.cs (2)
43
=> _dictionary.
_dictionary
.Values.CopyTo(array, arrayIndex);
46
=> ((ICollection)_dictionary.
_dictionary
.Values).CopyTo(array, index);