Table of Contents

Namespace NanoByte.Common.Dispatch

Functionality like double dispatch and two/three-way merging.

Classes

AggregateDispatcher<TBase>

Calls different action delegates based on the runtime types of objects. Calls multiple delegates when they all match a type (through inheritance).

AggregateDispatcher<TBase, TResult>

Calls different function delegates (with enumerable return values) based on the runtime types of objects. Aggregates results when multiple delegates match a type (through inheritance).

BucketRule<T>

A rule for Bucketizer<T>.

BucketRule<TElement, TValue>

A rule for Bucketizer<TElement, TValue>.

Bucketizer

Contains extension methods for creating bucketizers.

Bucketizer<T>

Splits collections into multiple buckets based on predicate matching. The first matching predicate wins. Create with Bucketize<T>(IEnumerable<T>).

Bucketizer<TElement, TValue>

Splits collections into multiple buckets based on value-mapping. Create with Bucketize<TElement, TValue>(IEnumerable<TElement>, Func<TElement, TValue>).

Merge

Provides utility methods for merging System.Collections.Generic.ICollection<T>s.

ModelViewSync<TModel, TView>

Keeps two collections of different types in sync based on mapping rules.

PerTypeDispatcher<TBase>

Calls different action delegates based on the runtime types of objects. Types must be exact matches. Inheritance is not considered.

PerTypeDispatcher<TBase, TResult>

Calls different function delegates (with return values) based on the runtime types of objects. Types must be exact matches. Inheritance is not considered.

Interfaces

IChangeNotify<TSender>

An object that can notify interested parties of changes in properties of interest.

IMergeable<T>

An equatable element that can be merged using 3-way merging.