Collections Collections
Collections Collections
DocFX + Singulink = ♥

Search Results for

    Class ReadOnlyMap<TLeft, TRight>

    Represents a read-only bidirectional one-to-one mapping between two sets of values. Values on each side of the map must be unique within their respective side.

    Inheritance
    object
    ReadOnlyMap<TLeft, TRight>
    Implements
    IMap<TLeft, TRight>
    IReadOnlyMap<TLeft, TRight>
    IReadOnlyCollection<KeyValuePair<TLeft, TRight>>
    ICollection<KeyValuePair<TLeft, TRight>>
    IEnumerable<KeyValuePair<TLeft, TRight>>
    IEnumerable
    Namespace: Singulink.Collections
    Assembly: Singulink.Collections.dll
    Syntax
    public class ReadOnlyMap<TLeft, TRight> : IMap<TLeft, TRight>, IReadOnlyMap<TLeft, TRight>, IReadOnlyCollection<KeyValuePair<TLeft, TRight>>, ICollection<KeyValuePair<TLeft, TRight>>, IEnumerable<KeyValuePair<TLeft, TRight>>, IEnumerable where TLeft : notnull where TRight : notnull
    Type 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(Map<TLeft, TRight>)

    Initializes a new instance of the ReadOnlyMap<TLeft, TRight> class.

    Properties

    Name Description
    Count

    Gets the number of associations in the map.

    this[TLeft]

    Gets the right value associated with the specified left value.

    LeftValues

    Gets a collection containing the values on the left side of the map.

    Reverse

    Gets a view of this map with the left and right sides swapped.

    RightValues

    Gets a collection containing the values on the right side of the map.

    Methods

    Name Description
    Contains(TLeft, TRight)

    Determines whether the map contains an association between the specified left and right values.

    ContainsLeft(TLeft)

    Determines whether the map contains the specified left value.

    ContainsRight(TRight)

    Determines whether the map contains the specified right value.

    GetEnumerator()

    Returns an enumerator that iterates through the left and right value pairs in the map.

    TryGetLeftValue(TRight, out TLeft)

    Attempts to get the left value associated with the specified right value.

    TryGetRightValue(TLeft, out TRight)

    Attempts to get the right value associated with the specified left value.

    Explicit Interface Implementations

    Name Description
    IMap<TLeft, TRight>.Add(TLeft, TRight)

    Not supported.

    IMap<TLeft, TRight>.this[TLeft]

    Gets the right value associated with the specified left value.

    IMap<TLeft, TRight>.Remove(TLeft, TRight)

    Not supported.

    IMap<TLeft, TRight>.RemoveLeft(TLeft)

    Not supported.

    IMap<TLeft, TRight>.RemoveRight(TRight)

    Not supported.

    IMap<TLeft, TRight>.Reverse

    Gets a view of this map with the left and right sides swapped.

    IMap<TLeft, TRight>.Set(TLeft, TRight)

    Not supported.

    IMap<TLeft, TRight>.TryAdd(TLeft, TRight)

    Not supported.

    ICollection<KeyValuePair<TLeft, TRight>>.Add(KeyValuePair<TLeft, TRight>)

    Not supported.

    ICollection<KeyValuePair<TLeft, TRight>>.Clear()

    Not supported.

    ICollection<KeyValuePair<TLeft, TRight>>.Contains(KeyValuePair<TLeft, TRight>)

    Determines whether the map contains an association between the specified left and right values.

    ICollection<KeyValuePair<TLeft, TRight>>.CopyTo(KeyValuePair<TLeft, TRight>[], int)

    Copies the left and right value pairs to an array starting at the specified array index.

    ICollection<KeyValuePair<TLeft, TRight>>.IsReadOnly

    Gets a value indicating whether this map is read-only. Always returns true.

    ICollection<KeyValuePair<TLeft, TRight>>.Remove(KeyValuePair<TLeft, TRight>)

    Not supported.

    IEnumerable.GetEnumerator()

    Returns an enumerator that iterates through the left and right value pairs in the map.

    Extension Methods

    CollectionExtensions.ToComparerEquatableArray<T>(IEnumerable<T>, IEqualityComparer<T>?)
    CollectionExtensions.ToEquatableArray<T>(IEnumerable<T>)
    © Singulink. All rights reserved.