Class LookupExtensions
Denotes extensions to create a lookup
Inherited Members
Namespace: NMF.Expressions.Linq
Assembly: NMF.Expressions.Utilities.dll
Syntax
public static class LookupExtensions
Methods
| Edit this page View SourceToLookup<TSource, TKey>(IEnumerableExpression<TSource>, Expression<Func<TSource, TKey>>)
Creates a lookup of the given collection
Declaration
public static ILookupExpression<TSource, TKey> ToLookup<TSource, TKey>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
IEnumerableExpression<TSource> | source | The underlying source collection |
Expression<Func<TSource, TKey>> | keySelector | A predicate to select the key of an element |
Returns
Type | Description |
---|---|
ILookupExpression<TSource, TKey> | A lookup expression |
Type Parameters
Name | Description |
---|---|
TSource | The source type of elements |
TKey | The key type |
ToLookup<TSource, TKey>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>)
Creates a lookup of the given collection
Declaration
public static INotifyLookup<TSource, TKey> ToLookup<TSource, TKey>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The underlying source collection |
Expression<Func<TSource, TKey>> | keySelector | A predicate to select the key of an element |
Returns
Type | Description |
---|---|
INotifyLookup<TSource, TKey> | A lookup expression |
Type Parameters
Name | Description |
---|---|
TSource | The source type of elements |
TKey | The key type |