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 84public IEqualityComparer<TKey> KeyComparer => _dictionary.Comparer; 86public int Count => _dictionary.Count; 88public bool IsEmpty => _dictionary.Count == 0; 90public bool IsDefault => _dictionary == null; 92public bool IsDefaultOrEmpty => _dictionary?.Count is null or 0; 116object ICollection.SyncRoot => _dictionary; 120public TValue this[TKey key] => _dictionary[key]; 130get => ((IDictionary)_dictionary)[key]; 190=> _dictionary.ContainsKey(key); 193=> _dictionary.ContainsValue(value); 196=> new(_dictionary, Enumerator.ReturnType.KeyValuePair); 201if (!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)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary)); 31var dictionary = Interlocked.Exchange(ref Unsafe.AsRef(in location._dictionary), value._dictionary); 40var 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)
60internal 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);