Class ReadOnlyMap<TLeft, TRight>
Represents a read-only 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.
Implements
Namespace: Singulink.Collections
Assembly: Singulink.Collections.dll
Syntax
public class ReadOnlyMap<TLeft, TRight> : IMap<TLeft, TRight>, ICollection<KeyValuePair<TLeft, TRight>>, IReadOnlyMap<TLeft, TRight>, IReadOnlyCollection<KeyValuePair<TLeft, TRight>>, IEnumerable<KeyValuePair<TLeft, TRight>>, IEnumerable where TLeft : notnull where TRight : notnullType 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. | 
Constructors
| Name | Description | 
|---|---|
| ReadOnlyMap(IMap<TLeft, TRight>) | Initializes a new instance of the ReadOnlyMap<TLeft, TRight> class. | 
Properties
| Name | Description | 
|---|---|
| Count | Gets the number of mappings contained in the map. | 
| this[TLeft] | Gets 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 | 
|---|---|
| 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. | 
| CopyTo(KeyValuePair<TLeft, TRight>[], int) | Copies the left and right value pairs to an array starting at the specified array index. | 
| GetEnumerator() | Returns an enumerator that iterates through the left and right value pairs. | 
| 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. | 
