Class Lookup<TSource, TKey>
- Namespace
- NMF.Expressions.Linq
- Assembly
- NMF.Expressions.Utilities.dll
Denotes an incremental lookup implementation
public class Lookup<TSource, TKey> : ILookupExpression<TSource, TKey>, IEnumerableExpression<TKey>, IEnumerable<TKey>, IEnumerableExpression, IEnumerable
Type Parameters
TSource
The source type of elements
TKey
The key type
- Inheritance
-
Lookup<TSource, TKey>
- Implements
-
ILookupExpression<TSource, TKey>IEnumerableExpression<TKey>IEnumerable<TKey>
- Inherited Members
- Extension Methods
-
ExpressionExtensions.Count<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, bool>>)ExpressionExtensions.IsSupersetOf<T>(IEnumerableExpression<T>, IEnumerable<T>, IEqualityComparer<T>)ExpressionExtensions.Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, double>>)ExpressionExtensions.Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, float?>>)
Constructors
Lookup(IEnumerableExpression<TSource>, ObservingFunc<TSource, TKey>)
Creates a new lookup for the given source and key selector
public Lookup(IEnumerableExpression<TSource> source, ObservingFunc<TSource, TKey> keySelector)
Parameters
source
IEnumerableExpression<TSource>The source collection
keySelector
ObservingFunc<TSource, TKey>A function that selects the keys of a given element
Properties
this[TKey]
Gets the elements for the provided key
public IEnumerableExpression<TSource> this[TKey key] { get; }
Parameters
key
TKeyThe key
Property Value
- IEnumerableExpression<TSource>
The elements for this key
Keys
Gets a collection of keys
public IEnumerableExpression<TKey> Keys { get; }
Property Value
- IEnumerableExpression<TKey>
Methods
AsNotifiable()
Gets notifications for this collection
public INotifyEnumerable<TKey> AsNotifiable()
Returns
- INotifyEnumerable<TKey>
A collection that will notify clients as new elements change
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<TKey> GetEnumerator()
Returns
- IEnumerator<TKey>
An enumerator that can be used to iterate through the collection.