Class IncrementalLookup<TSource, TKey>
- Namespace
- NMF.Expressions.Linq
- Assembly
- NMF.Expressions.Utilities.dll
Implements an incremental lookup
public class IncrementalLookup<TSource, TKey> : ObservableEnumerable<TKey>, INotifyEnumerable<TKey>, INotifyEnumerable, INotifiable, ICollection<TKey>, IEnumerable<TKey>, INotifyCollectionChanged, IDisposable, ISuccessorList, IList, ICollection, IEnumerable, INotifyLookup<TSource, TKey>
Type Parameters
TSource
The source type of elements
TKey
The type along which the elements are grouped
- Inheritance
-
ObservableEnumerable<TKey>IncrementalLookup<TSource, TKey>
- Implements
-
INotifyEnumerable<TKey>ICollection<TKey>IEnumerable<TKey>INotifyLookup<TSource, TKey>
- Inherited Members
- Extension Methods
-
ObservableExtensions.Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, double>>)ObservableExtensions.Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, float?>>)ObservableExtensions.IsProperSubsetOf<T>(INotifyEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>)ObservableExtensions.TopX<TItem, TKey>(INotifyEnumerable<TItem>, int, Expression<Func<TItem, TKey>>)
Constructors
IncrementalLookup(INotifyEnumerable<TSource>, ObservingFunc<TSource, TKey>)
Creates an incremental lookup
public IncrementalLookup(INotifyEnumerable<TSource> source, ObservingFunc<TSource, TKey> keySelector)
Parameters
source
INotifyEnumerable<TSource>The source of elements
keySelector
ObservingFunc<TSource, TKey>A function that selects the keys for an element
Properties
Dependencies
Nodes that notify this node.
public override IEnumerable<INotifiable> Dependencies { get; }
Property Value
this[TKey]
Gets the collection of elements for the given key
public INotifyEnumerable<TSource> this[TKey key] { get; }
Parameters
key
TKeyThe key
Property Value
- INotifyEnumerable<TSource>
A collection of associated elements
Keys
Gets a collection of keys
public INotifyEnumerable<TKey> Keys { get; }
Property Value
- INotifyEnumerable<TKey>
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public override IEnumerator<TKey> GetEnumerator()
Returns
- IEnumerator<TKey>
An enumerator that can be used to iterate through the collection.
Notify(IList<INotificationResult>)
Gets called when one of the dependencies signals a notification.
public override INotificationResult Notify(IList<INotificationResult> sources)
Parameters
sources
IList<INotificationResult>Contains information about what triggered this notification.
Returns
- INotificationResult
An object describing the changes that happened in this notification.
OnAttach()
Gets called when a successor attaches and there was no successor before
protected override void OnAttach()