Table of Contents

Class ChangeSetEx

Namespace
DynamicData
Assembly
DynamicData.dll

Change set extensions.

public static class ChangeSetEx
Inheritance
ChangeSetEx

Methods

Flatten<T>(IChangeSet<T>)

Returns a flattened source with the index.

public static IEnumerable<ItemChange<T>> Flatten<T>(this IChangeSet<T> source) where T : notnull

Parameters

source IChangeSet<T>

The source.

Returns

IEnumerable<ItemChange<T>>

An enumerable of change sets.

Type Parameters

T

The type of the item.

Exceptions

ArgumentNullException

source.

GetChangeType(ListChangeReason)

Gets the type of the change i.e. whether it is an item or a range change.

public static ChangeType GetChangeType(this ListChangeReason source)

Parameters

source ListChangeReason

The source.

Returns

ChangeType

The change type.

Transform<TSource, TDestination>(IChangeSet<TSource>, Func<TSource, TDestination>)

Transforms the change set into a different type using the specified transform function.

public static IChangeSet<TDestination> Transform<TSource, TDestination>(this IChangeSet<TSource> source, Func<TSource, TDestination> transformer) where TSource : notnull where TDestination : notnull

Parameters

source IChangeSet<TSource>

The source.

transformer Func<TSource, TDestination>

The transformer.

Returns

IChangeSet<TDestination>

The change set.

Type Parameters

TSource

The type of the source.

TDestination

The type of the destination.

Exceptions

ArgumentNullException

source or transformer.

YieldWithoutIndex<T>(IEnumerable<Change<T>>)

Remove the index from the changes.

public static IEnumerable<Change<T>> YieldWithoutIndex<T>(this IEnumerable<Change<T>> source) where T : notnull

Parameters

source IEnumerable<Change<T>>

The source.

Returns

IEnumerable<Change<T>>

An enumerable of changes.

Type Parameters

T

The type of the item.