Interface IMap<TLeft, TRight>
Represents a collection of two types of values that map between each other in a bidirectional one-to-one relationship. Values on each side of the map must be unique on their respective side.
Inherited Members
Namespace: Singulink.Collections
Assembly: Singulink.Collections.dll
Syntax
public interface IMap<TLeft, TRight> : ICollection<KeyValuePair<TLeft, TRight>>, IEnumerable<KeyValuePair<TLeft, TRight>>, IEnumerableType Parameters
| Name | Description | 
|---|---|
| TLeft | The type of values on the left side of the map. | 
| TRight | The type of values on the right side of the map. | 
Properties
| Name | Description | 
|---|---|
| this[TLeft] | Gets or sets the right value associated with the specified left value. | 
| LeftValues | Gets the values on the left side of the map. | 
| Reverse | Gets the reverse map where the left and right side are flipped. | 
| RightValues | Gets the values on the right side of the map. | 
Methods
| Name | Description | 
|---|---|
| Add(TLeft, TRight) | Adds an association to map between the specified left and right value. | 
| Contains(TLeft, TRight) | Determines whether this map contains an association between the specified left and right value. | 
| ContainsLeft(TLeft) | Determines whether this map contains the specified left value. | 
| ContainsRight(TRight) | Determines whether this map contains the specified right value. | 
| Remove(TLeft, TRight) | Removes an association from the map between the specified left and right value if they currently map to each other. | 
| RemoveLeft(TLeft) | Removes an association from the map given the specified left value. | 
| RemoveRight(TRight) | Removes an association from the map given the specified right value. | 
| Set(TLeft, TRight) | Sets an association in the map between the specified left and right value, overriding any existing associations these values had. | 
| TryAdd(TLeft, TRight) | Attempts to add an association to map between the specified left and right value. | 
| TryGetLeftValue(TRight, out TLeft) | Gets the right value associated with the specified left value. | 
| TryGetRightValue(TLeft, out TRight) | Gets the right value associated with the specified left value. | 
