The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

ObservableListEx Class

Summary

Extensions for ObservableList.
Namespace
DynamicData
Base Types
  • object
graph BT Type-->Base0["object"] Type["ObservableListEx"] class Type type-node

Syntax

public static class ObservableListEx

Methods

Name Value Summary
Adapt<T>(IObservable<IChangeSet<T>>, IChangeSetAdaptor<T>) IObservable<IChangeSet<T>>
Injects a side effect into a change set observable.
static
AddKey<TObject, TKey>(IObservable<IChangeSet<TObject>>, Func<TObject, TKey>) IObservable<IChangeSet<TObject, TKey>>
Adds a key to the change set result which enables all observable cache features of dynamic data.
static
And<T>(ICollection<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Apply a logical And operator between the collections. Items which are in all of the sources are included in the result.
static
And<T>(IObservable<IChangeSet<T>>, IObservable<IChangeSet<T>>[]) IObservable<IChangeSet<T>>
Apply a logical And operator between the collections. Items which are in all of the sources are included in the result.
static
And<T>(IObservableList<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Dynamically apply a logical And operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
And<T>(IObservableList<IObservableList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical And operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
And<T>(IObservableList<ISourceList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical And operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
AsObservableList<T>(IObservable<IChangeSet<T>>) IObservableList<T>
Converts the source observable to an read only observable list.
static
AsObservableList<T>(ISourceList<T>) IObservableList<T>
Converts the source list to an read only observable list.
static
AutoRefresh<TObject, TProperty>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TProperty>>, TimeSpan?, TimeSpan?, IScheduler?) IObservable<IChangeSet<TObject>>
Automatically refresh downstream operators when properties change.
static
AutoRefresh<TObject>(IObservable<IChangeSet<TObject>>, TimeSpan?, TimeSpan?, IScheduler?) IObservable<IChangeSet<TObject>>
Automatically refresh downstream operators when any property changes.
static
AutoRefreshOnObservable<TObject, TAny>(IObservable<IChangeSet<TObject>>, Func<TObject, IObservable<TAny>>, TimeSpan?, IScheduler?) IObservable<IChangeSet<TObject>>
Automatically refresh downstream operator. The refresh is triggered when the observable receives a notification.
static
Bind<T>(IObservable<IChangeSet<T>>, IObservableCollection<T>, int) IObservable<IChangeSet<T>>
Binds a clone of the observable change set to the target observable collection.
static
Bind<T>(IObservable<IChangeSet<T>>, ReadOnlyObservableCollection<T>, int) IObservable<IChangeSet<T>>
Creates a binding to a readonly observable collection which is specified as an 'out' parameter.
static
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, bool, IScheduler?) IObservable<IChangeSet<T>>
Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.
static
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, bool, TimeSpan?, IScheduler?) IObservable<IChangeSet<T>>
Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.
static
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, IScheduler?) IObservable<IChangeSet<T>>
Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.
static
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, TimeSpan?, IScheduler?) IObservable<IChangeSet<T>>
Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.
static
BufferInitial<TObject>(IObservable<IChangeSet<TObject>>, TimeSpan, IScheduler?) IObservable<IChangeSet<TObject>>
Buffers changes for an initial period only. After the period has elapsed, not further buffering occurs.
static
Cast<TDestination>(IObservable<IChangeSet<object>>) IObservable<IChangeSet<TDestination>>
Cast the changes to another form.
static
Cast<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, TDestination>) IObservable<IChangeSet<TDestination>>
Cast the changes to another form Alas, I had to add the converter due to type inference issues. The converter can be avoided by CastToObject() first.
static
CastToObject<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<object?>>
Cast the underlying type of an object. Use before a Cast function.
static
Clone<T>(IObservable<IChangeSet<T>>, IList<T>) IObservable<IChangeSet<T>>
Clones the target list as a side effect of the stream.
static
Convert<TObject, TDestination>(IObservable<IChangeSet<TObject>>, Func<TObject, TDestination>) IObservable<IChangeSet<TDestination>>
Convert the object using the specified conversion function. This is a lighter equivalent of Transform and is designed to be used with non-disposable objects.
static
DeferUntilLoaded<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Defer the subscription until the stream has been inflated with data.
static
DeferUntilLoaded<T>(IObservableList<T>) IObservable<IChangeSet<T>>
Defer the subscription until the cache has been inflated with data.
static
DisposeMany<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Disposes each item when no longer required. Individual items are disposed when removed or replaced. All items are disposed when the stream is disposed.
static
DistinctValues<TObject, TValue>(IObservable<IChangeSet<TObject>>, Func<TObject, TValue>) IObservable<IChangeSet<TValue>>
Selects distinct values from the source, using the specified value selector.
static
Except<T>(ICollection<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Apply a logical Except operator between the collections. Items which are in the source and not in the others are included in the result.
static
Except<T>(IObservable<IChangeSet<T>>, IObservable<IChangeSet<T>>[]) IObservable<IChangeSet<T>>
Apply a logical Except operator between the collections. Items which are in the source and not in the others are included in the result.
static
Except<T>(IObservableList<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Except operator. Items from the first observable list are included when an equivalent item does not exist in the other sources.
static
Except<T>(IObservableList<IObservableList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Except operator. Items from the first observable list are included when an equivalent item does not exist in the other sources.
static
Except<T>(IObservableList<ISourceList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Except operator. Items from the first observable list are included when an equivalent item does not exist in the other sources.
static
ExpireAfter<T>(ISourceList<T>, Func<T, TimeSpan?>, IScheduler?) IObservable<IEnumerable<T>>
Removes items from the cache according to the value specified by the time selector function.
static
ExpireAfter<T>(ISourceList<T>, Func<T, TimeSpan?>, TimeSpan?, IScheduler?) IObservable<IEnumerable<T>>
Removes items from the cache according to the value specified by the time selector function.
static
Filter<T>(IObservable<IChangeSet<T>>, Func<T, bool>) IObservable<IChangeSet<T>>
Filters the source using the specified valueSelector.
static
Filter<T>(IObservable<IChangeSet<T>>, IObservable<Func<T, bool>>, ListFilterPolicy) IObservable<IChangeSet<T>>
Filters source using the specified filter observable predicate.
static
FilterOnObservable<TObject>(IObservable<IChangeSet<TObject>>, Func<TObject, IObservable<bool>>, TimeSpan?, IScheduler?) IObservable<IChangeSet<TObject>>
Filters source on the specified observable property using the specified predicate. The filter will automatically reapply when a property changes.
static
FilterOnProperty<TObject, TProperty>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TProperty>>, Func<TObject, bool>, TimeSpan?, IScheduler?) IObservable<IChangeSet<TObject>>
Filters source on the specified property using the specified predicate. The filter will automatically reapply when a property changes.
static
FlattenBufferResult<T>(IObservable<IList<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Convert the result of a buffer operation to a change set.
static
ForEachChange<TObject>(IObservable<IChangeSet<TObject>>, Action<Change<TObject>>) IObservable<IChangeSet<TObject>>
Provides a call back for each item change.
static
ForEachItemChange<TObject>(IObservable<IChangeSet<TObject>>, Action<ItemChange<TObject>>) IObservable<IChangeSet<TObject>>
Provides a call back for each item change. Range changes are flattened, so there is only need to check for Add, Replace, Remove and Clear.
static
GroupOn<TObject, TGroup>(IObservable<IChangeSet<TObject>>, Func<TObject, TGroup>, IObservable<Unit>?) IObservable<IChangeSet<IGroup<TObject, TGroup>>>
Groups the source on the value returned by group selector factory. The groupings contains an inner observable list.
static
GroupOnProperty<TObject, TGroup>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TGroup>>, TimeSpan?, IScheduler?) IObservable<IChangeSet<IGroup<TObject, TGroup>>>
Groups the source using the property specified by the property selector. The resulting groupings contains an inner observable list. Groups are re-applied when the property value changed. When there are likely to be a large number of group property changes specify a throttle to improve performance.
static
GroupOnPropertyWithImmutableState<TObject, TGroup>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TGroup>>, TimeSpan?, IScheduler?) IObservable<IChangeSet<IGrouping<TObject, TGroup>>>
Groups the source using the property specified by the property selector. The resulting groupings are immutable. Groups are re-applied when the property value changed. When there are likely to be a large number of group property changes specify a throttle to improve performance.
static
GroupWithImmutableState<TObject, TGroupKey>(IObservable<IChangeSet<TObject>>, Func<TObject, TGroupKey>, IObservable<Unit>?) IObservable<IChangeSet<IGrouping<TObject, TGroupKey>>>
Groups the source on the value returned by group selector factory. Each update produces immutable grouping.
static
LimitSizeTo<T>(ISourceList<T>, int, IScheduler?) IObservable<IEnumerable<T>>
Limits the size of the source cache to the specified limit. Notifies which items have been removed from the source list.
static
MergeMany<T, TDestination>(IObservable<IChangeSet<T>>, Func<T, IObservable<TDestination>>) IObservable<TDestination>
Dynamically merges the observable which is selected from each item in the stream, and un-merges the item when it is no longer part of the stream.
static
NotEmpty<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Prevents an empty notification.
static
OnItemAdded<T>(IObservable<IChangeSet<T>>, Action<T>) IObservable<IChangeSet<T>>
Callback for each item as and when it is being added to the stream.
static
OnItemRemoved<T>(IObservable<IChangeSet<T>>, Action<T>) IObservable<IChangeSet<T>>
Callback for each item as and when it is being removed from the stream.
static
Or<T>(ICollection<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Apply a logical Or operator between the collections. Items which are in any of the sources are included in the result.
static
Or<T>(IObservable<IChangeSet<T>>, IObservable<IChangeSet<T>>[]) IObservable<IChangeSet<T>>
Apply a logical Or operator between the collections. Items which are in any of the sources are included in the result.
static
Or<T>(IObservableList<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Or operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
Or<T>(IObservableList<IObservableList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Or operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
Or<T>(IObservableList<ISourceList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Or operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
Page<T>(IObservable<IChangeSet<T>>, IObservable<IPageRequest>) IObservable<IChangeSet<T>>
Applies paging to the data source.
static
PopulateInto<T>(IObservable<IChangeSet<T>>, ISourceList<T>) IDisposable
list.
static
QueryWhenChanged<T>(IObservable<IChangeSet<T>>) IObservable<IReadOnlyCollection<T>>
The latest copy of the cache is exposed for querying i) after each modification to the underlying data ii) upon subscription.
static
QueryWhenChanged<TObject, TDestination>(IObservable<IChangeSet<TObject>>, Func<IReadOnlyCollection<TObject>, TDestination>) IObservable<TDestination>
The latest copy of the cache is exposed for querying after each modification to the underlying data.
static
RefCount<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
List equivalent to Publish().RefCount(). The source is cached so long as there is at least 1 subscriber.
static
RemoveIndex<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Removes the index from all changes. NB: This operator has been introduced as a temporary fix for creating an Or operator using merge many.
static
Reverse<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Reverse sort of the change set.
static
SkipInitial<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Defer the subscription until loaded and skip initial change set.
static
Sort<T>(IObservable<IChangeSet<T>>, IComparer<T>, SortOptions, IObservable<Unit>?, IObservable<IComparer<T>>?, int) IObservable<IChangeSet<T>>
Sorts the sequence using the specified comparer.
static
Sort<T>(IObservable<IChangeSet<T>>, IObservable<IComparer<T>>, SortOptions, IObservable<Unit>?, int) IObservable<IChangeSet<T>>
Sorts the sequence using the specified observable comparer.
static
StartWithEmpty<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Prepends an empty change set to the source.
static
SubscribeMany<T>(IObservable<IChangeSet<T>>, Func<T, IDisposable>) IObservable<IChangeSet<T>>
Subscribes to each item when it is added to the stream and unsubscribes when it is removed. All items will be unsubscribed when the stream is disposed.
static
SuppressRefresh<T>(IObservable<IChangeSet<T>>) IObservable<IChangeSet<T>>
Suppress refresh notifications.
static
Switch<T>(IObservable<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Transforms an observable sequence of observable changes sets into an observable sequence producing values only from the most recent observable sequence. Each time a new inner observable sequence is received, unsubscribe from the previous inner observable sequence and clear the existing result set.
static
Switch<T>(IObservable<IObservableList<T>>) IObservable<IChangeSet<T>>
Transforms an observable sequence of observable lists into a single sequence producing values only from the most recent observable sequence. Each time a new inner observable sequence is received, unsubscribe from the previous inner observable sequence and clear the existing result set.
static
ToCollection<TObject>(IObservable<IChangeSet<TObject>>) IObservable<IReadOnlyCollection<TObject>>
Converts the change set into a fully formed collection. Each change in the source results in a new collection.
static
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, Func<T, TimeSpan?>, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set, allowing size to be specified. Change set observes observable change events.
static
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, Func<T, TimeSpan?>?, int, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set, allowing size and time limit to be specified. Change set observes observable change events.
static
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, int, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set, allowing size and time limit to be specified. Change set observes observable change events.
static
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set. Change set observes observable change events.
static
ToObservableChangeSet<T>(IObservable<T>, Func<T, TimeSpan?>, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set, allowing time expiry to be specified. Change set observes observable change events.
static
ToObservableChangeSet<T>(IObservable<T>, Func<T, TimeSpan?>?, int, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set, allowing size and time limit to be specified. Change set observes observable change events.
static
ToObservableChangeSet<T>(IObservable<T>, int, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set, with a specified limit of how large the list can be. Change set observes observable change events.
static
ToObservableChangeSet<T>(IObservable<T>, IScheduler?) IObservable<IChangeSet<T>>
Converts the observable to an observable change set. Change set observes observable change events.
static
Top<T>(IObservable<IChangeSet<T>>, int) IObservable<IChangeSet<T>>
Limits the size of the result set to the specified number of items.
static
ToSortedCollection<TObject, TSortKey>(IObservable<IChangeSet<TObject>>, Func<TObject, TSortKey>, SortDirection) IObservable<IReadOnlyCollection<TObject>>
Converts the change set into a fully formed sorted collection. Each change in the source results in a new sorted collection.
static
ToSortedCollection<TObject>(IObservable<IChangeSet<TObject>>, IComparer<TObject>) IObservable<IReadOnlyCollection<TObject>>
Converts the change set into a fully formed sorted collection. Each change in the source results in a new sorted collection.
static
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, int, TDestination>, bool) IObservable<IChangeSet<TDestination>>
Projects each update item to a new form using the specified transform function.
static
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Optional<TDestination>, int, TDestination>, bool) IObservable<IChangeSet<TDestination>>
Projects each update item to a new form using the specified transform function *** Annoyingly when using this overload you will have to explicitly specify the generic type arguments as type inference fails.
static
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Optional<TDestination>, TDestination>, bool) IObservable<IChangeSet<TDestination>>
Projects each update item to a new form using the specified transform function. *** Annoyingly when using this overload you will have to explicitly specify the generic type arguments as type inference fails.
static
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, TDestination>, bool) IObservable<IChangeSet<TDestination>>
Projects each update item to a new form using the specified transform function.
static
TransformAsync<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Task<TDestination>>) IObservable<IChangeSet<TDestination>>
Projects each update item to a new form using the specified transform function.
static
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, IEnumerable<TDestination>>, IEqualityComparer<TDestination>?) IObservable<IChangeSet<TDestination>>
Equivalent to a select many transform. To work, the key must individually identify each child.
static
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, IObservableList<TDestination>>, IEqualityComparer<TDestination>?) IObservable<IChangeSet<TDestination>>
Flatten the nested observable list, and observe subsequent observable collection changes.
static
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, ObservableCollection<TDestination>>, IEqualityComparer<TDestination>?) IObservable<IChangeSet<TDestination>>
Flatten the nested observable collection, and observe subsequently observable collection changes.
static
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, ReadOnlyObservableCollection<TDestination>>, IEqualityComparer<TDestination>?) IObservable<IChangeSet<TDestination>>
Flatten the nested observable collection, and observe subsequently observable collection changes.
static
Virtualise<T>(IObservable<IChangeSet<T>>, IObservable<IVirtualRequest>) IObservable<IVirtualChangeSet<T>>
Virtualises the source using parameters provided via the requests observable.
static
WhenAnyPropertyChanged<TObject>(IObservable<IChangeSet<TObject>>, string[]) IObservable<TObject?>
Watches each item in the collection and notifies when any of them has changed.
static
WhenPropertyChanged<TObject, TValue>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TValue>>, bool) IObservable<PropertyValue<TObject, TValue>>
Watches each item in the collection and notifies when any of them has changed.
static
WhenValueChanged<TObject, TValue>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TValue>>, bool) IObservable<TValue?>
Watches each item in the collection and notifies when any of them has changed.
static
WhereReasonsAre<T>(IObservable<IChangeSet<T>>, ListChangeReason[]) IObservable<IChangeSet<T>>
Includes changes for the specified reasons only.
static
WhereReasonsAreNot<T>(IObservable<IChangeSet<T>>, ListChangeReason[]) IObservable<IChangeSet<T>>
Excludes updates for the specified reasons.
static
Xor<T>(ICollection<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Apply a logical Xor operator between the collections. Items which are only in one of the sources are included in the result.
static
Xor<T>(IObservable<IChangeSet<T>>, IObservable<IChangeSet<T>>[]) IObservable<IChangeSet<T>>
Apply a logical Xor operator between the collections. Items which are only in one of the sources are included in the result.
static
Xor<T>(IObservableList<IObservable<IChangeSet<T>>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Xor operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
Xor<T>(IObservableList<IObservableList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Xor operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static
Xor<T>(IObservableList<ISourceList<T>>) IObservable<IChangeSet<T>>
Dynamically apply a logical Xor operator between the items in the outer observable list. Items which are in any of the sources are included in the result.
static

Extension Methods

Name Value Summary
InvokeViewModelAction<T>(Action<T>) object
This is a thing I lifted from Prism.