Class ChangeSetEx
- Namespace
- Dynamic
Data
- Assembly
- DynamicData.dll
Change set extensions.
- Inheritance
-
Change
Set Ex
Methods
Flatten<T>(IChangeSet<T>)
Returns a flattened source with the index.
Parameters
source
IChangeSet <T>The source.
Returns
- IEnumerable<Item
Change <T>> An enumerable of change sets.
Type Parameters
T
The type of the item.
Exceptions
- Argument
Null Exception source.
GetChangeType(ListChangeReason)
Gets the type of the change i.e. whether it is an item or a range change.
Parameters
source
ListChange Reason The source.
Returns
- Change
Type 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
- IChange
Set <TDestination> The change set.
Type Parameters
TSource
The type of the source.
TDestination
The type of the destination.
Exceptions
- Argument
Null Exception 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.