System.Collections.Frozen.FrozenDictionary<TKey, TValue>
public abstract class FrozenDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection
Provides an immutable, read-only dictionary optimized for fast lookup and enumeration.
namespace System.Collections.Frozen
{
public abstract class FrozenDictionary<TKey, [Nullable(2)] TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection
{
[return: IsReadOnly]
internal delegate ref TValue AlternateLookupDelegate<TAlternateKey> (FrozenDictionary<TKey, TValue> dictionary, TAlternateKey key);
public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IEnumerator, IDisposable
{
public KeyValuePair<TKey, TValue> Current { get; }
public bool MoveNext();
}
public readonly struct AlternateLookup<TAlternateKey>
{
public FrozenDictionary<TKey, TValue> Dictionary { get; }
public TValue this[TAlternateKey key] { get; }
public bool ContainsKey(TAlternateKey key);
public bool TryGetValue(TAlternateKey key, out TValue value);
}
public static FrozenDictionary<TKey, TValue> Empty { get; }
public IEqualityComparer<TKey> Comparer { get; }
public ImmutableArray<TKey> Keys { get; }
public ImmutableArray<TValue> Values { get; }
public int Count { get; }
[Nullable(2)]
object IDictionary.this[object key] { get; set; }
[IsReadOnly]
public ref TValue this[TKey key] {
[return: IsReadOnly]
get;
}
TValue IDictionary<TKey, TValue>.this[TKey key] { get; set; }
TValue IReadOnlyDictionary<TKey, TValue>.this[TKey key] { get; }
public void CopyTo(KeyValuePair<TKey, TValue>[] destination, int destinationIndex);
public void CopyTo(Span<KeyValuePair<TKey, TValue>> destination);
public ref TValue GetValueRefOrNullRef(TKey key);
public bool ContainsKey(TKey key);
public bool TryGetValue(TKey key, out TValue value);
public Enumerator GetEnumerator();
public AlternateLookup<TAlternateKey> GetAlternateLookup<TAlternateKey>();
public bool TryGetAlternateLookup<TAlternateKey>(out AlternateLookup<TAlternateKey> lookup);
}
}