Table of Contents

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
IncrementalLookup<TSource, TKey>
Implements
INotifyLookup<TSource, TKey>
Inherited Members
Extension Methods

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

IEnumerable<INotifiable>

this[TKey]

Gets the collection of elements for the given key

public INotifyEnumerable<TSource> this[TKey key] { get; }

Parameters

key TKey

The 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()