Show / Hide Table of Contents

Class TwoWayDictionary<TKey, TValue>

Two way dictionary.

Inheritance
System.Object
TwoWayDictionary<TKey, TValue>
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>
System.Collections.IEnumerable
Namespace: Edgar.Legacy.GeneralAlgorithms.DataStructures.Common
Assembly: Edgar.dll
Syntax
public class TwoWayDictionary<TKey, TValue> : Object, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
Type Parameters
Name Description
TKey
TValue
Remarks

Methods from System.Collections.Generic.IDictionary<, > keep their old semantics.

Constructors

TwoWayDictionary()

Declaration
public TwoWayDictionary()

Properties

Count

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

IsReadOnly

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean

Item[TKey]

Declaration
public TValue this[TKey key] { get; set; }
Parameters
Type Name Description
TKey key
Property Value
Type Description
TValue

Keys

Declaration
public ICollection<TKey> Keys { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<TKey>

Values

Declaration
public ICollection<TValue> Values { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<TValue>

Methods

Add(TKey, TValue)

Declaration
public void Add(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value

Clear()

Declaration
public void Clear()

ContainsKey(TKey)

Declaration
public bool ContainsKey(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean

ContainsValue(TValue)

Determines whether the dictionary contains an element with the specified value.

Declaration
public bool ContainsValue(TValue value)
Parameters
Type Name Description
TValue value
Returns
Type Description
System.Boolean

GetByValue(TValue)

Gets the key associated with the specified value.

Declaration
public TKey GetByValue(TValue value)
Parameters
Type Name Description
TValue value
Returns
Type Description
TKey

GetEnumerator()

Declaration
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>

Remove(TKey)

Declaration
public bool Remove(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean

TryGetKey(TValue, out TKey)

Gets the key associated with the specified value.

Declaration
public bool TryGetKey(TValue value, out TKey key)
Parameters
Type Name Description
TValue value
TKey key
Returns
Type Description
System.Boolean

TryGetValue(TKey, out TValue)

Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
System.Boolean

Implements

System.Collections.Generic.IDictionary<, >
System.Collections.Generic.ICollection<>
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
Back to top Generated by DocFX