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)