8 instantiations of SegmentedDictionary
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (8)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (2)
73public static readonly ImmutableSegmentedDictionary<TKey, TValue> Empty = new(new SegmentedDictionary<TKey, TValue>()); 283return new ImmutableSegmentedDictionary<TKey, TValue>(new SegmentedDictionary<TKey, TValue>(keyComparer));
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
49_mutableDictionary = new SegmentedDictionary<TKey, TValue>(value); 102_mutableDictionary = new SegmentedDictionary<TKey, TValue>(originalDictionary._dictionary, originalDictionary.KeyComparer); 134_mutableDictionary = new SegmentedDictionary<TKey, TValue>(KeyComparer);
src\Dependencies\Collections\SegmentedDictionary`2.cs (3)
393return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedDictionary<TKey, TValue>(), Enumerator.KeyValuePair))!; 1362return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedDictionary<TKey, TValue>()))!; 1570return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedDictionary<TKey, TValue>()))!;
43 references to SegmentedDictionary
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (43)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (2)
75private readonly SegmentedDictionary<TKey, TValue> _dictionary; 77private ImmutableSegmentedDictionary(SegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (2)
37private SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _builder.ReadOnlyDictionary; 152internal SegmentedDictionary<TKey, TValue> GetOrCreateMutableDictionary()
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14private readonly SegmentedDictionary<TKey, TValue> _dictionary; 16private SegmentedDictionary<TKey, TValue>.Enumerator _enumerator; 18internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary, ReturnType returnType)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (6)
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); 49/// <inheritdoc cref="SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary{TKey, TValue}(SegmentedDictionary{TKey, TValue}?)"/> 50internal static ImmutableSegmentedDictionary<TKey, TValue> AsImmutableSegmentedDictionary(SegmentedDictionary<TKey, TValue>? dictionary) 54internal static SegmentedDictionary<TKey, TValue>? AsSegmentedDictionary(ImmutableSegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (4)
25private SegmentedDictionary<TKey, TValue>? _mutableDictionary; 48var valuesToAdd = ReadOnlyDictionary; 58internal readonly SegmentedDictionary<TKey, TValue> ReadOnlyDictionary => _mutableDictionary ?? _dictionary._dictionary; 94internal SegmentedDictionary<TKey, TValue> GetOrCreateMutableDictionary()
src\Dependencies\Collections\SegmentedCollectionsMarshal.cs (11)
45/// Gets either a ref to a <typeparamref name="TValue"/> in the <see cref="SegmentedDictionary{TKey, TValue}"/> or a 53/// Items should not be added or removed from the <see cref="SegmentedDictionary{TKey, TValue}"/> while the ref 57public static ref TValue GetValueRefOrNullRef<TKey, TValue>(SegmentedDictionary<TKey, TValue> dictionary, TKey key) 59=> ref SegmentedDictionary<TKey, TValue>.PrivateMarshal.FindValue(dictionary, key); 180/// Gets an <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value wrapping the input <see cref="SegmentedDictionary{TKey, TValue}"/>. 199public static ImmutableSegmentedDictionary<TKey, TValue> AsImmutableSegmentedDictionary<TKey, TValue>(SegmentedDictionary<TKey, TValue>? dictionary) 204/// Gets the underlying <see cref="SegmentedDictionary{TKey, TValue}"/> for an input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value. 208/// <param name="dictionary">The input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value to get the underlying <see cref="SegmentedDictionary{TKey, TValue}"/> from.</param> 209/// <returns>The underlying <see cref="SegmentedDictionary{TKey, TValue}"/> for <paramref name="dictionary"/>, if present; otherwise, <see langword="null"/>.</returns> 218/// property is <see langword="true"/>), the resulting <see cref="SegmentedDictionary{TKey, TValue}"/> will be <see langword="null"/>. 221public static SegmentedDictionary<TKey, TValue>? AsSegmentedDictionary<TKey, TValue>(ImmutableSegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\SegmentedDictionary`2.cs (13)
154if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 156var source = (SegmentedDictionary<TKey, TValue>)enumerable; 1172private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1181internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary, int getEnumeratorRetType) 1296private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1298public KeyCollection(SegmentedDictionary<TKey, TValue> dictionary) 1430private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1435internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary) 1504private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1506public ValueCollection(SegmentedDictionary<TKey, TValue> dictionary) 1638private readonly SegmentedDictionary<TKey, TValue> _dictionary; 1643internal Enumerator(SegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\SegmentedDictionary`2+PrivateMarshal.cs (2)
14/// <inheritdoc cref="SegmentedCollectionsMarshal.GetValueRefOrNullRef{TKey, TValue}(SegmentedDictionary{TKey, TValue}, TKey)"/> 15public static ref TValue FindValue(SegmentedDictionary<TKey, TValue> dictionary, TKey key)