Table of Contents

Struct CollectionDictionary<T, U>.Lookup

Namespace
The.Utility
Assembly
Instagile.dll

A read-only wrapper that implements ILookup<TKey, TElement> for a CollectionDictionary<T, U>.

public readonly struct CollectionDictionary<T, U>.Lookup : ILookup<T, U>, IEnumerable<IGrouping<T, U>>, IEnumerable
Implements
ILookup<T, U>
Inherited Members

Constructors

Lookup(CollectionDictionary<T, U>)

A read-only wrapper that implements ILookup<TKey, TElement> for a CollectionDictionary<T, U>.

public Lookup(CollectionDictionary<T, U> parent)

Parameters

parent CollectionDictionary<T, U>

Properties

Count

Gets the number of key-collection pairs in the lookup.

public int Count { get; }

Property Value

int

this[T]

Gets the collection of values associated with the specified key.

public IEnumerable<U> this[T key] { get; }

Parameters

key T

The key of the collection to get.

Property Value

IEnumerable<U>

The collection of values associated with the key.

Methods

Contains(T)

Determines whether the lookup contains a specified key.

public bool Contains(T key)

Parameters

key T

The key to locate in the lookup.

Returns

bool

true if the lookup contains an element with the specified key; otherwise, false.

GetEnumerator()

Returns an enumerator that iterates through the groupings in the lookup.

public IEnumerator<IGrouping<T, U>> GetEnumerator()

Returns

IEnumerator<IGrouping<T, U>>

An enumerator for the lookup.