1 write to _dictionary
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
79_dictionary = dictionary ?? throw new ArgumentNullException(nameof(dictionary));
37 references to _dictionary
Microsoft.CodeAnalysis.CodeStyle (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 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]; 188=> _dictionary.ContainsKey(key); 191=> _dictionary.ContainsValue(value); 194=> new(_dictionary, Enumerator.ReturnType.KeyValuePair); 199if (!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)
20var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary)); 29var dictionary = Interlocked.Exchange(ref Unsafe.AsRef(in location._dictionary), value._dictionary); 38var 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)
58internal 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);