mscorlib(4.0.0.0) API with additions
System.Linq.Lookup< TKey, TElement > Class Template Reference

Represents a collection of keys each mapped to one or more values. More...

Inheritance diagram for System.Linq.Lookup< TKey, TElement >:
[legend]
Collaboration diagram for System.Linq.Lookup< TKey, TElement >:
[legend]

Public Member Functions

bool Contains (TKey key)
 Determines whether a specified key is in the T:System.Linq.Lookup`2. More...
 
IEnumerator< IGrouping< TKey, TElement > > GetEnumerator ()
 Returns a generic enumerator that iterates through the T:System.Linq.Lookup`2. More...
 
IEnumerable< TResult > ApplyResultSelector< TResult > (Func< TKey, IEnumerable< TElement >, TResult > resultSelector)
 Applies a transform function to each key and its associated values and returns the results. More...
 

Properties

int Count [get]
 Gets the number of key/value collection pairs in the T:System.Linq.Lookup`2. More...
 
IEnumerable< TElement > this[TKey key] [get]
 Gets the collection of values indexed by the specified key. More...
 
- Properties inherited from System.Linq.ILookup< TKey, TElement >
int Count [get]
 Gets the number of key/value collection pairs in the T:System.Linq.ILookup`2. More...
 
IEnumerable< TElement > this[TKey key] [get]
 Gets the T:System.Collections.Generic.IEnumerable`1 sequence of values indexed by a specified key. More...
 

Detailed Description

Represents a collection of keys each mapped to one or more values.

Template Parameters
TKeyThe type of the keys in the T:System.Linq.Lookup`2.
TElementThe type of the elements of each T:System.Collections.Generic.IEnumerable`1 value in the T:System.Linq.Lookup`2.

Definition at line 10 of file Lookup.cs.

Member Function Documentation

◆ ApplyResultSelector< TResult >()

IEnumerable<TResult> System.Linq.Lookup< TKey, TElement >.ApplyResultSelector< TResult > ( Func< TKey, IEnumerable< TElement >, TResult >  resultSelector)

Applies a transform function to each key and its associated values and returns the results.

Parameters
resultSelectorA function to project a result value from each key and its associated values.
Template Parameters
TResultThe type of the result values produced by resultSelector .
Returns
A collection that contains one value for each key/value collection pair in the T:System.Linq.Lookup`2.

Definition at line 240 of file Lookup.cs.

◆ Contains()

bool System.Linq.Lookup< TKey, TElement >.Contains ( TKey  key)

Determines whether a specified key is in the T:System.Linq.Lookup`2.

Parameters
keyThe key to find in the T:System.Linq.Lookup`2.
Returns
true if key is in the T:System.Linq.Lookup`2; otherwise, false.

Implements System.Linq.ILookup< TKey, TElement >.

Definition at line 213 of file Lookup.cs.

◆ GetEnumerator()

IEnumerator<IGrouping<TKey, TElement> > System.Linq.Lookup< TKey, TElement >.GetEnumerator ( )

Returns a generic enumerator that iterates through the T:System.Linq.Lookup`2.

Returns
An enumerator for the T:System.Linq.Lookup`2.

Implements System.Collections.IEnumerable.

Definition at line 221 of file Lookup.cs.

Property Documentation

◆ Count

int System.Linq.Lookup< TKey, TElement >.Count
get

Gets the number of key/value collection pairs in the T:System.Linq.Lookup`2.

Returns
The number of key/value collection pairs in the T:System.Linq.Lookup`2.

Definition at line 136 of file Lookup.cs.

◆ this[TKey key]

IEnumerable<TElement> System.Linq.Lookup< TKey, TElement >.this[TKey key]
get

Gets the collection of values indexed by the specified key.

Parameters
keyThe key of the desired collection of values.
Returns
The collection of values indexed by the specified key.

Definition at line 149 of file Lookup.cs.


The documentation for this class was generated from the following file: