Skip to main content
Version: 0.1.0

Class BiMap<TForwardKey, TReverseKey>.Indexer<TKey, TValue>

Namespace: ReadyM.Api.Helpers
Assembly: ReadyM.Api.dll

Publically read-only lookup to prevent inconsistent state between forward and reverse map lookups

public class BiMap<TForwardKey, TReverseKey>.Indexer<TKey, TValue> where TKey : notnull where TValue : notnull

Type Parameters

TKey

TValue

Inheritance

objectBiMap<TForwardKey, TReverseKey>.Indexer<TKey, TValue>

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

Indexer(Dictionary<TKey, TValue>, Dictionary<TValue, TKey>)

public Indexer(Dictionary<TKey, TValue> dictionary, Dictionary<TValue, TKey> inverse)

Parameters

dictionary Dictionary<TKey, TValue>

inverse Dictionary<TValue, TKey>

Properties

Keys

public IEnumerable<TKey> Keys { get; }

Property Value

IEnumerable<TKey>

Values

public IEnumerable<TValue> Values { get; }

Property Value

IEnumerable<TValue>

this[TKey]

public TValue this[TKey index] { get; set; }

Property Value

TValue

Methods

Clear()

public void Clear()

ContainsKey(TKey)

public bool ContainsKey(TKey key)

Parameters

key TKey

Returns

bool

GetEnumerator()

public Dictionary<TKey, TValue>.Enumerator GetEnumerator()

Returns

Dictionary<TKey, TValue>.Enumerator

ToDictionary()

Deep copy lookup as a dictionary

public Dictionary<TKey, TValue> ToDictionary()

Returns

Dictionary<TKey, TValue>

TryGetValue(TKey, out TValue)

public bool TryGetValue(TKey key, out TValue value)

Parameters

key TKey

value TValue

Returns

bool

Operators

implicit operator Dictionary<TKey, TValue>(Indexer<TKey, TValue>)

public static implicit operator Dictionary<TKey, TValue>(BiMap<TForwardKey, TReverseKey>.Indexer<TKey, TValue> indexer)

Parameters

indexer BiMap<TForwardKey, TReverseKey>.Indexer<TKey, TValue>

Returns

Dictionary<TKey, TValue>

  • Constructors
    • Indexer(Dictionary<TKey, TValue>, Dictionary<TValue, TKey>)
  • Properties
    • Keys
    • Values
    • this[TKey]
  • Methods
    • Clear()
    • ContainsKey(TKey)
    • GetEnumerator()
    • ToDictionary()
    • TryGetValue(TKey, out TValue)
  • Operators
    • implicit operator Dictionary<TKey, TValue>(Indexer<TKey, TValue>)