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 82public IEqualityComparer<TKey> KeyComparer => _dictionary.Comparer; 84public int Count => _dictionary.Count; 86public bool IsEmpty => _dictionary.Count == 0; 88public bool IsDefault => _dictionary == null; 90public bool IsDefaultOrEmpty => _dictionary?.Count is null or 0; 114object ICollection.SyncRoot => _dictionary; 118public TValue this[TKey key] => _dictionary[key]; 128get => ((IDictionary)_dictionary)[key]; 150var dictionary = new SegmentedDictionary<TKey, TValue>(self._dictionary, self._dictionary.Comparer); 168ICollection<KeyValuePair<TKey, TValue>> collectionToCheck = dictionary ?? self._dictionary; 172dictionary ??= new SegmentedDictionary<TKey, TValue>(self._dictionary, self._dictionary.Comparer); 200=> _dictionary.ContainsKey(key); 203=> _dictionary.ContainsValue(value); 206=> new(_dictionary, Enumerator.ReturnType.KeyValuePair); 211if (!self._dictionary.ContainsKey(key)) 214var dictionary = new SegmentedDictionary<TKey, TValue>(self._dictionary, self._dictionary.Comparer); 237var 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)
60private SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _mutableDictionary ?? _dictionary._dictionary; 98return _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)
19var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary)); 28var dictionary = Interlocked.Exchange(ref Unsafe.AsRef(in location._dictionary), value._dictionary); 37var 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);