src\Dependencies\Collections\Segmented\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\Segmented\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)