Table of Contents

Class ObservableCollectionEx

Namespace
DynamicData.Binding
Assembly
DynamicData.dll

Extensions to convert an observable collection into a dynamic stream.

public static class ObservableCollectionEx
Inheritance
ObservableCollectionEx

Methods

ObserveCollectionChanges(INotifyCollectionChanged)

Observes notify collection changed args.

public static IObservable<EventPattern<NotifyCollectionChangedEventArgs>> ObserveCollectionChanges(this INotifyCollectionChanged source)

Parameters

source INotifyCollectionChanged

The source collection.

Returns

IObservable<EventPattern<NotifyCollectionChangedEventArgs>>

An observable that emits the event patterns.

ToObservableChangeSet<T>(ObservableCollection<T>)

Convert an observable collection into an observable change set. Change set observes collection change events.

public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this ObservableCollection<T> source) where T : notnull

Parameters

source ObservableCollection<T>

The source.

Returns

IObservable<IChangeSet<T>>

An observable that emits the change set.

Type Parameters

T

The type of the object.

Exceptions

ArgumentNullException

source.

ToObservableChangeSet<T>(ReadOnlyObservableCollection<T>)

Convert the readonly observable collection into an observable change set. Change set observes collection change events.

public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this ReadOnlyObservableCollection<T> source) where T : notnull

Parameters

source ReadOnlyObservableCollection<T>

The source.

Returns

IObservable<IChangeSet<T>>

An observable that emits the change set.

Type Parameters

T

The type of the object.

Exceptions

ArgumentNullException

source.

ToObservableChangeSet<TObject, TKey>(ObservableCollection<TObject>, Func<TObject, TKey>)

Convert an observable collection into an observable change set. Change set observes collection change events.

public static IObservable<IChangeSet<TObject, TKey>> ToObservableChangeSet<TObject, TKey>(this ObservableCollection<TObject> source, Func<TObject, TKey> keySelector) where TObject : notnull where TKey : notnull

Parameters

source ObservableCollection<TObject>

The source.

keySelector Func<TObject, TKey>

The key selector.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable that emits the change set.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source or keySelector.

ToObservableChangeSet<TObject, TKey>(ReadOnlyObservableCollection<TObject>, Func<TObject, TKey>)

Convert the readonly observable collection into an observable change set. Change set observes collection change events.

public static IObservable<IChangeSet<TObject, TKey>> ToObservableChangeSet<TObject, TKey>(this ReadOnlyObservableCollection<TObject> source, Func<TObject, TKey> keySelector) where TObject : notnull where TKey : notnull

Parameters

source ReadOnlyObservableCollection<TObject>

The source.

keySelector Func<TObject, TKey>

The key selector.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable that emits the change set.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source or keySelector.

ToObservableChangeSet<TCollection, T>(TCollection)

Convert an observable collection into an observable change set. Change set observes collection change events.

public static IObservable<IChangeSet<T>> ToObservableChangeSet<TCollection, T>(this TCollection source) where TCollection : INotifyCollectionChanged, IEnumerable<T> where T : notnull

Parameters

source TCollection

The source.

Returns

IObservable<IChangeSet<T>>

An observable that emits the change set.

Type Parameters

TCollection

The type of collection.

T

The type of the object.

Exceptions

ArgumentNullException

source.