Class Lookup<TSource, TKey>
Denotes an incremental lookup implementation
Inherited Members
Namespace: NMF.Expressions.Linq
Assembly: NMF.Expressions.Utilities.dll
Syntax
public class Lookup<TSource, TKey> : ILookupExpression<TSource, TKey>, IEnumerableExpression<TKey>, IEnumerable<TKey>, IEnumerableExpression, IEnumerable
Type Parameters
Name | Description |
---|---|
TSource | The source type of elements |
TKey | The key type |
Constructors
| Edit this page View SourceLookup(IEnumerableExpression<TSource>, ObservingFunc<TSource, TKey>)
Creates a new lookup for the given source and key selector
Declaration
public Lookup(IEnumerableExpression<TSource> source, ObservingFunc<TSource, TKey> keySelector)
Parameters
Type | Name | Description |
---|---|---|
IEnumerableExpression<TSource> | source | The source collection |
ObservingFunc<TSource, TKey> | keySelector | A function that selects the keys of a given element |
Properties
| Edit this page View Sourcethis[TKey]
Gets the elements for the provided key
Declaration
public IEnumerableExpression<TSource> this[TKey key] { get; }
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The key |
Property Value
Type | Description |
---|---|
IEnumerableExpression<TSource> | The elements for this key |
Keys
Gets a collection of keys
Declaration
public IEnumerableExpression<TKey> Keys { get; }
Property Value
Type | Description |
---|---|
IEnumerableExpression<TKey> |
Methods
| Edit this page View SourceAsNotifiable()
Gets notifications for this collection
Declaration
public INotifyEnumerable<TKey> AsNotifiable()
Returns
Type | Description |
---|---|
INotifyEnumerable<TKey> | A collection that will notify clients as new elements change |
GetEnumerator()
Declaration
public IEnumerator<TKey> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<TKey> |
Implements
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?>>)