8 instantiations of SegmentedDictionary
Microsoft.CodeAnalysis.InteractiveHost (8)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
75public static readonly ImmutableSegmentedDictionary<TKey, TValue> Empty = new(new SegmentedDictionary<TKey, TValue>()); 285return new ImmutableSegmentedDictionary<TKey, TValue>(new SegmentedDictionary<TKey, TValue>(keyComparer));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
51_mutableDictionary = new SegmentedDictionary<TKey, TValue>(value); 104_mutableDictionary = new SegmentedDictionary<TKey, TValue>(originalDictionary._dictionary, originalDictionary.KeyComparer); 136_mutableDictionary = new SegmentedDictionary<TKey, TValue>(KeyComparer);
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
395return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedDictionary<TKey, TValue>(), Enumerator.KeyValuePair))!; 1364return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedDictionary<TKey, TValue>()))!; 1572return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedDictionary<TKey, TValue>()))!;
43 references to SegmentedDictionary
Microsoft.CodeAnalysis.InteractiveHost (43)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
77private readonly SegmentedDictionary<TKey, TValue> _dictionary; 79private ImmutableSegmentedDictionary(SegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (2)
39private SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _builder.ReadOnlyDictionary; 154internal SegmentedDictionary<TKey, TValue> GetOrCreateMutableDictionary()
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
16private readonly SegmentedDictionary<TKey, TValue> _dictionary; 18private SegmentedDictionary<TKey, TValue>.Enumerator _enumerator; 20internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary, ReturnType returnType)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (6)
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); 51/// <inheritdoc cref="SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary{TKey, TValue}(SegmentedDictionary{TKey, TValue}?)"/> 52internal static ImmutableSegmentedDictionary<TKey, TValue> AsImmutableSegmentedDictionary(SegmentedDictionary<TKey, TValue>? dictionary) 56internal static SegmentedDictionary<TKey, TValue>? AsSegmentedDictionary(ImmutableSegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (4)
27private SegmentedDictionary<TKey, TValue>? _mutableDictionary; 50var valuesToAdd = ReadOnlyDictionary; 60internal readonly SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _mutableDictionary ?? _dictionary._dictionary; 96internal SegmentedDictionary<TKey, TValue> GetOrCreateMutableDictionary()
src\Dependencies\Collections\Segmented\SegmentedCollectionsMarshal.cs (11)
47/// Gets either a ref to a <typeparamref name="TValue"/> in the <see cref="SegmentedDictionary{TKey, TValue}"/> or a 55/// Items should not be added or removed from the <see cref="SegmentedDictionary{TKey, TValue}"/> while the ref 59public static ref TValue GetValueRefOrNullRef<TKey, TValue>(SegmentedDictionary<TKey, TValue> dictionary, TKey key) 61=> ref SegmentedDictionary<TKey, TValue>.PrivateMarshal.FindValue(dictionary, key); 182/// Gets an <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value wrapping the input <see cref="SegmentedDictionary{TKey, TValue}"/>. 201public static ImmutableSegmentedDictionary<TKey, TValue> AsImmutableSegmentedDictionary<TKey, TValue>(SegmentedDictionary<TKey, TValue>? dictionary) 206/// Gets the underlying <see cref="SegmentedDictionary{TKey, TValue}"/> for an input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value. 210/// <param name="dictionary">The input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value to get the underlying <see cref="SegmentedDictionary{TKey, TValue}"/> from.</param> 211/// <returns>The underlying <see cref="SegmentedDictionary{TKey, TValue}"/> for <paramref name="dictionary"/>, if present; otherwise, <see langword="null"/>.</returns> 220/// property is <see langword="true"/>), the resulting <see cref="SegmentedDictionary{TKey, TValue}"/> will be <see langword="null"/>. 223public static SegmentedDictionary<TKey, TValue>? AsSegmentedDictionary<TKey, TValue>(ImmutableSegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (13)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 158var source = (SegmentedDictionary<TKey, TValue>)enumerable; 1174private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1183internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary, int getEnumeratorRetType) 1298private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1300public KeyCollection(SegmentedDictionary<TKey, TValue> dictionary) 1432private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1437internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary) 1506private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1508public ValueCollection(SegmentedDictionary<TKey, TValue> dictionary) 1640private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1645internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2+PrivateMarshal.cs (2)
16/// <inheritdoc cref="SegmentedCollectionsMarshal.GetValueRefOrNullRef{TKey, TValue}(SegmentedDictionary{TKey, TValue}, TKey)"/> 17public static ref TValue FindValue(SegmentedDictionary<TKey, TValue> dictionary, TKey key)