Class ObservableListEx
- Namespace
- Dynamic
Data
- Assembly
- DynamicData.dll
Extensions for ObservableList.
- Inheritance
-
Observable
List Ex
Methods
Adapt<T>(IObservable<IChangeSet<T>>, IChangeSetAdaptor<T>)
Injects a side effect into a change set observable.
public static IObservable<IChangeSet<T>> Adapt<T>(this IObservable<IChangeSet<T>> source, IChangeSetAdaptor<T> adaptor) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
adaptorIChangeSet <T>Adaptor The adaptor.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or adaptor.
AddKey<TObject, TKey>(IObservable<IChangeSet<TObject>>, Func<TObject, TKey>)
Adds a key to the change set result which enables all observable cache features of dynamic data.
public static IObservable<IChangeSet<TObject, TKey>> AddKey<TObject, TKey>(this IObservable<IChangeSet<TObject>> source, Func<TObject, TKey> keySelector) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
keySelectorFunc<TObject, TKey>The key selector.
Returns
- IObservable<IChange
Set <TObject, TKey>> An observable which emits the change set.
Type Parameters
TObjectThe type of object.
TKeyThe type of key.
Remarks
All indexed changes are dropped i.e. sorting is not supported by this function.
And<T>(IObservableList<IObservableList<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.
public static IObservable<IChangeSet<T>> And<T>(this IObservableList<IObservableList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservableList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
And<T>(IObservableList<ISourceList<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.
public static IObservable<IChangeSet<T>> And<T>(this IObservableList<ISourceList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <ISourceList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
And<T>(IObservableList<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.
public static IObservable<IChangeSet<T>> And<T>(this IObservableList<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservable<IChangeSet <T>>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
And<T>(ICollection<IObservable<IChangeSet<T>>>)
Apply a logical And operator between the collections. Items which are in all of the sources are included in the result.
public static IObservable<IChangeSet<T>> And<T>(this ICollection<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesICollection<IObservable<IChangeSet <T>>>The sources.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
And<T>(IObservable<IChangeSet<T>>, params IObservable<IChangeSet<T>>[])
Apply a logical And operator between the collections. Items which are in all of the sources are included in the result.
public static IObservable<IChangeSet<T>> And<T>(this IObservable<IChangeSet<T>> source, params IObservable<IChangeSet<T>>[] others) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
othersIObservable<IChangeSet <T>>[]The others.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
AsObservableList<T>(ISourceList<T>)
Converts the source list to an read only observable list.
Parameters
sourceISourceList <T>The source.
Returns
- IObservable
List <T> An observable list.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source.
AsObservableList<T>(IObservable<IChangeSet<T>>)
Converts the source observable to an read only observable list.
public static IObservableList<T> AsObservableList<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable
List <T> An observable list.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source.
AutoRefreshOnObservable<TObject, TAny>(IObservable<IChangeSet<TObject>>, Func<TObject, IObservable<TAny>>, TimeSpan?, IScheduler?)
Automatically refresh downstream operator. The refresh is triggered when the observable receives a notification.
public static IObservable<IChangeSet<TObject>> AutoRefreshOnObservable<TObject, TAny>(this IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<TAny>> reevaluator, TimeSpan? changeSetBuffer = null, IScheduler? scheduler = null) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source observable change set.
reevaluatorFunc<TObject, IObservable<TAny>>An observable which acts on items within the collection and produces a value when the item should be refreshed.
changeSetBufferTimeSpan ?Batch up changes by specifying the buffer. This greatly increases performance when many elements require a refresh.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <TObject>> An observable change set with additional refresh changes.
Type Parameters
TObjectThe type of object.
TAnyA ignored type used for specifying what to auto refresh on.
AutoRefresh<TObject>(IObservable<IChangeSet<TObject>>, TimeSpan?, TimeSpan?, IScheduler?)
Automatically refresh downstream operators when any property changes.
public static IObservable<IChangeSet<TObject>> AutoRefresh<TObject>(this IObservable<IChangeSet<TObject>> source, TimeSpan? changeSetBuffer = null, TimeSpan? propertyChangeThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged
Parameters
sourceIObservable<IChangeSet <TObject>>The source observable.
changeSetBufferTimeSpan ?Batch up changes by specifying the buffer. This greatly increases performance when many elements have successive property changes.
propertyChangeThrottleTimeSpan ?When observing on multiple property changes, apply a throttle to prevent excessive refresh invocations.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <TObject>> An observable change set with additional refresh changes.
Type Parameters
TObjectThe type of object.
AutoRefresh<TObject, TProperty>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TProperty>>, TimeSpan?, TimeSpan?, IScheduler?)
Automatically refresh downstream operators when properties change.
public static IObservable<IChangeSet<TObject>> AutoRefresh<TObject, TProperty>(this IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TProperty>> propertyAccessor, TimeSpan? changeSetBuffer = null, TimeSpan? propertyChangeThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged
Parameters
sourceIObservable<IChangeSet <TObject>>The source observable.
propertyAccessorExpression<Func<TObject, TProperty>>Specify a property to observe changes. When it changes a Refresh is invoked.
changeSetBufferTimeSpan ?Batch up changes by specifying the buffer. This greatly increases performance when many elements have successive property changes.
propertyChangeThrottleTimeSpan ?When observing on multiple property changes, apply a throttle to prevent excessive refresh invocations.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <TObject>> An observable change set with additional refresh changes.
Type Parameters
TObjectThe type of object.
TPropertyThe type of property.
Bind<T>(IObservable<IChangeSet<T>>, IObservableCollection<T>, BindingOptions)
Binds a clone of the observable change set to the target observable collection.
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, BindingOptions options) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
targetCollectionIObservableCollection <T>The target collection.
optionsBindingOptions The binding options.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or targetCollection.
Bind<T>(IObservable<IChangeSet<T>>, IObservableCollection<T>, int)
Binds a clone of the observable change set to the target observable collection.
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, int resetThreshold = 25) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
targetCollectionIObservableCollection <T>The target collection.
resetThresholdintThe reset threshold.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or targetCollection.
Bind<T>(IObservable<IChangeSet<T>>, out ReadOnlyObservableCollection<T>, BindingOptions)
Creates a binding to a readonly observable collection which is specified as an 'out' parameter.
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, BindingOptions options) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
readOnlyObservableCollectionReadOnly <T>Observable Collection The resulting read only observable collection.
optionsBindingOptions The binding options.
Returns
- IObservable<IChange
Set <T>> A continuation of the source stream.
Type Parameters
TThe type of the item.
Bind<T>(IObservable<IChangeSet<T>>, out ReadOnlyObservableCollection<T>, int)
Creates a binding to a readonly observable collection which is specified as an 'out' parameter.
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, int resetThreshold = 25) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
readOnlyObservableCollectionReadOnly <T>Observable Collection The resulting read only observable collection.
resetThresholdintThe reset threshold.
Returns
- IObservable<IChange
Set <T>> A continuation of the source stream.
Type Parameters
TThe type of the item.
Bind<T>(IObservable<IChangeSet<T>>, BindingList<T>, int)
Binds a clone of the observable change set to the target observable collection.
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, BindingList<T> bindingList, int resetThreshold = 25) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
bindingListBindingList <T>The target binding list.
resetThresholdintThe reset threshold.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or targetCollection.
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, bool, TimeSpan?, IScheduler?)
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.
public static IObservable<IChangeSet<T>> BufferIf<T>(this IObservable<IChangeSet<T>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState, TimeSpan? timeOut, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
pauseIfTrueSelectorIObservable<bool>When true, observable begins to buffer and when false, window closes and buffered result if notified.
initialPauseStateboolif set to
true[initial pause state].timeOutTimeSpan ?Specify a time to ensure the buffer window does not stay open for too long.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, bool, IScheduler?)
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.
public static IObservable<IChangeSet<T>> BufferIf<T>(this IObservable<IChangeSet<T>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
pauseIfTrueSelectorIObservable<bool>When true, observable begins to buffer and when false, window closes and buffered result if notified.
initialPauseStateboolif set to
true[initial pause state].schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, TimeSpan?, IScheduler?)
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.
public static IObservable<IChangeSet<T>> BufferIf<T>(this IObservable<IChangeSet<T>> source, IObservable<bool> pauseIfTrueSelector, TimeSpan? timeOut, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
pauseIfTrueSelectorIObservable<bool>When true, observable begins to buffer and when false, window closes and buffered result if notified.
timeOutTimeSpan ?Specify a time to ensure the buffer window does not stay open for too long.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
BufferIf<T>(IObservable<IChangeSet<T>>, IObservable<bool>, IScheduler?)
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.
public static IObservable<IChangeSet<T>> BufferIf<T>(this IObservable<IChangeSet<T>> source, IObservable<bool> pauseIfTrueSelector, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
pauseIfTrueSelectorIObservable<bool>When true, observable begins to buffer and when false, window closes and buffered result if notified.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
BufferInitial<TObject>(IObservable<IChangeSet<TObject>>, TimeSpan, IScheduler?)
Buffers changes for an initial period only. After the period has elapsed, not further buffering occurs.
public static IObservable<IChangeSet<TObject>> BufferInitial<TObject>(this IObservable<IChangeSet<TObject>> source, TimeSpan initialBuffer, IScheduler? scheduler = null) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source change set.
initialBufferTimeSpan The period to buffer, measure from the time that the first item arrives.
schedulerISchedulerThe scheduler to buffer on.
Returns
- IObservable<IChange
Set <TObject>> An observable which emits the change set.
Type Parameters
TObjectThe type of object.
CastToObject<T>(IObservable<IChangeSet<T>>)
Cast the underlying type of an object. Use before a Cast function.
public static IObservable<IChangeSet<object>> CastToObject<T>(this IObservable<IChangeSet<T>> source) where T : class
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <object>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Cast<TDestination>(IObservable<IChangeSet<object>>)
Cast the changes to another form.
public static IObservable<IChangeSet<TDestination>> Cast<TDestination>(this IObservable<IChangeSet<object>> source) where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <object>>The source.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TDestinationThe type of the destination.
Cast<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, 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.
public static IObservable<IChangeSet<TDestination>> Cast<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, TDestination> conversionFactory) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
conversionFactoryFunc<TSource, TDestination>The conversion factory.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TSourceThe type of the object.
TDestinationThe type of the destination.
Clone<T>(IObservable<IChangeSet<T>>, IList<T>)
Clones the target list as a side effect of the stream.
public static IObservable<IChangeSet<T>> Clone<T>(this IObservable<IChangeSet<T>> source, IList<T> target) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
targetIList<T>The target of the clone.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source.
Convert<TObject, TDestination>(IObservable<IChangeSet<TObject>>, Func<TObject, 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.
[Obsolete("Prefer Cast as it is does the same thing but is semantically correct")]
public static IObservable<IChangeSet<TDestination>> Convert<TObject, TDestination>(this IObservable<IChangeSet<TObject>> source, Func<TObject, TDestination> conversionFactory) where TObject : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
conversionFactoryFunc<TObject, TDestination>The conversion factory.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
TDestinationThe type of the destination.
DeferUntilLoaded<T>(IObservableList<T>)
Defer the subscription until the cache has been inflated with data.
public static IObservable<IChangeSet<T>> DeferUntilLoaded<T>(this IObservableList<T> source) where T : notnull
Parameters
sourceIObservableList <T>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
DeferUntilLoaded<T>(IObservable<IChangeSet<T>>)
Defer the subscription until the stream has been inflated with data.
public static IObservable<IChangeSet<T>> DeferUntilLoaded<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
DisposeMany<T>(IObservable<IChangeSet<T>>)
Disposes each item when no longer required.
Individual items are disposed after removal or replacement changes have been sent downstream. All items previously-published on the stream are disposed after the stream finalizes.
public static IObservable<IChangeSet<T>> DisposeMany<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <T>> A continuation of the original stream.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
DistinctValues<TObject, TValue>(IObservable<IChangeSet<TObject>>, Func<TObject, TValue>)
Selects distinct values from the source, using the specified value selector.
public static IObservable<IChangeSet<TValue>> DistinctValues<TObject, TValue>(this IObservable<IChangeSet<TObject>> source, Func<TObject, TValue> valueSelector) where TObject : notnull where TValue : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
valueSelectorFunc<TObject, TValue>The transform factory.
Returns
- IObservable<IChange
Set <TValue>> An observable which emits the change set.
Type Parameters
TObjectThe type of the source.
TValueThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
Except<T>(IObservableList<IObservableList<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.
public static IObservable<IChangeSet<T>> Except<T>(this IObservableList<IObservableList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservableList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Except<T>(IObservableList<ISourceList<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.
public static IObservable<IChangeSet<T>> Except<T>(this IObservableList<ISourceList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <ISourceList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Except<T>(IObservableList<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.
public static IObservable<IChangeSet<T>> Except<T>(this IObservableList<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservable<IChangeSet <T>>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Except<T>(ICollection<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.
public static IObservable<IChangeSet<T>> Except<T>(this ICollection<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesICollection<IObservable<IChangeSet <T>>>The sources.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Except<T>(IObservable<IChangeSet<T>>, params 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.
public static IObservable<IChangeSet<T>> Except<T>(this IObservable<IChangeSet<T>> source, params IObservable<IChangeSet<T>>[] others) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
othersIObservable<IChangeSet <T>>[]The others.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
ExpireAfter<T>(ISourceList<T>, Func<T, TimeSpan?>, TimeSpan?, IScheduler?)
Removes items from the cache according to the value specified by the time selector function.
public static IObservable<IEnumerable<T>> ExpireAfter<T>(this ISourceList<T> source, Func<T, TimeSpan?> timeSelector, TimeSpan? pollingInterval = null, IScheduler? scheduler = null) where T : notnull
Parameters
sourceISourceList <T>The source.
timeSelectorFunc<T, TimeSpan ?>Selector returning when to expire the item. Return null for non-expiring item.
pollingIntervalTimeSpan ?Enter the polling interval to optimise expiry timers, if omitted 1 timer is created for each unique expiry time.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IEnumerable<T>>
An observable which emits the enumerable of items.
Type Parameters
TThe type of the item.
FilterOnObservable<TObject>(IObservable<IChangeSet<TObject>>, Func<TObject, IObservable<bool>>, TimeSpan?, IScheduler?)
Filters source on the specified observable property using the specified predicate.
The filter will automatically reapply when a property changes.
public static IObservable<IChangeSet<TObject>> FilterOnObservable<TObject>(this IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<bool>> objectFilterObservable, TimeSpan? propertyChangedThrottle = null, IScheduler? scheduler = null) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
objectFilterObservableFunc<TObject, IObservable<bool>>The filter property selector. When the observable changes the filter will be re-evaluated.
propertyChangedThrottleTimeSpan ?The property changed throttle.
schedulerISchedulerThe scheduler used when throttling.
Returns
- IObservable<IChange
Set <TObject>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
FilterOnProperty<TObject, TProperty>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TProperty>>, Func<TObject, bool>, TimeSpan?, IScheduler?)
Filters source on the specified property using the specified predicate.
The filter will automatically reapply when a property changes.
[Obsolete("Use AutoRefresh(), followed by Filter() instead")]
public static IObservable<IChangeSet<TObject>> FilterOnProperty<TObject, TProperty>(this IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TProperty>> propertySelector, Func<TObject, bool> predicate, TimeSpan? propertyChangedThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
propertySelectorExpression<Func<TObject, TProperty>>The property selector. When the property changes the filter specified will be re-evaluated.
predicateFunc<TObject, bool>A predicate based on the object which contains the changed property.
propertyChangedThrottleTimeSpan ?The property changed throttle.
schedulerISchedulerThe scheduler used when throttling.
Returns
- IObservable<IChange
Set <TObject>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
TPropertyThe type of the property.
Filter<T>(IObservable<IChangeSet<T>>, Func<T, bool>)
Filters the source using the specified valueSelector.
public static IObservable<IChangeSet<T>> Filter<T>(this IObservable<IChangeSet<T>> source, Func<T, bool> predicate) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
predicateFunc<T, bool>The valueSelector.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source.
Filter<T>(IObservable<IChangeSet<T>>, IObservable<Func<T, bool>>, ListFilterPolicy)
Filters source using the specified filter observable predicate.
public static IObservable<IChangeSet<T>> Filter<T>(this IObservable<IChangeSet<T>> source, IObservable<Func<T, bool>> predicate, ListFilterPolicy filterPolicy = ListFilterPolicy.CalculateDiff) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
predicateIObservable<Func<T, bool>>The predicate which indicates which items should be included.
filterPolicyListFilter Policy Should the filter clear and replace, or calculate a diff-set.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or filterController.
Filter<T, TState>(IObservable<IChangeSet<T>>, IObservable<TState>, Func<TState, T, bool>, ListFilterPolicy, bool)
Creates a filtered stream which can be dynamically filtered, based on state values passed through to a static filtering predicate.
public static IObservable<IChangeSet<T>> Filter<T, TState>(this IObservable<IChangeSet<T>> source, IObservable<TState> predicateState, Func<TState, T, bool> predicate, ListFilterPolicy filterPolicy = ListFilterPolicy.CalculateDiff, bool suppressEmptyChangeSets = true) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
predicateStateIObservable<TState>A stream of state values to be passed to
predicate.predicateFunc<TState, T, bool>A static predicate to be used to determine which items should be included or excluded by the filter.
filterPolicyListFilter Policy The policy that the operator should use when performing re-filtering operations.
suppressEmptyChangeSetsboolBy default empty changeset notifications are suppressed for performance reasons. Set to false to publish empty changesets. Doing so can be useful for monitoring loading status.
Returns
- IObservable<IChange
Set <T>> An observable which emits change sets.
Type Parameters
TThe type of the item.
TStateThe type of state value required by
predicate.
Remarks
Usually, predicateState should emit an initial value, immediately upon subscription. This is because predicate cannot be invoked until the first state value is received, and accordingly, the operator will treat all items as excluded until then. Each value emitted by predicateState will trigger a full re-filtering of the entire collection, according to filterPolicy.
Exceptions
- Argument
Null Exception Throws for
source,predicateState, andpredicate.
FlattenBufferResult<T>(IObservable<IList<IChangeSet<T>>>)
Convert the result of a buffer operation to a change set.
public static IObservable<IChangeSet<T>> FlattenBufferResult<T>(this IObservable<IList<IChangeSet<T>>> source) where T : notnull
Parameters
sourceIObservable<IList<IChangeSet <T>>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
ForEachChange<TObject>(IObservable<IChangeSet<TObject>>, Action<Change<TObject>>)
Provides a call back for each item change.
public static IObservable<IChangeSet<TObject>> ForEachChange<TObject>(this IObservable<IChangeSet<TObject>> source, Action<Change<TObject>> action) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
actionAction<Change<TObject>>The action.
Returns
- IObservable<IChange
Set <TObject>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
ForEachItemChange<TObject>(IObservable<IChangeSet<TObject>>, Action<ItemChange<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.
public static IObservable<IChangeSet<TObject>> ForEachItemChange<TObject>(this IObservable<IChangeSet<TObject>> source, Action<ItemChange<TObject>> action) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
actionAction<ItemChange <TObject>>The action.
Returns
- IObservable<IChange
Set <TObject>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
GroupOnPropertyWithImmutableState<TObject, TGroup>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TGroup>>, TimeSpan?, IScheduler?)
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.
public static IObservable<IChangeSet<IGrouping<TObject, TGroup>>> GroupOnPropertyWithImmutableState<TObject, TGroup>(this IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TGroup>> propertySelector, TimeSpan? propertyChangedThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged where TGroup : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
propertySelectorExpression<Func<TObject, TGroup>>The property selector used to group the items.
propertyChangedThrottleTimeSpan ?The property changed throttle.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <IGrouping<TObject, TGroup>>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
TGroupThe type of the group.
GroupOnProperty<TObject, TGroup>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TGroup>>, TimeSpan?, IScheduler?)
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.
public static IObservable<IChangeSet<IGroup<TObject, TGroup>>> GroupOnProperty<TObject, TGroup>(this IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TGroup>> propertySelector, TimeSpan? propertyChangedThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged where TGroup : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
propertySelectorExpression<Func<TObject, TGroup>>The property selector used to group the items.
propertyChangedThrottleTimeSpan ?The property changed throttle.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChange
Set <IGroup<TObject, TGroup>>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
TGroupThe type of the group.
GroupOn<TObject, TGroup>(IObservable<IChangeSet<TObject>>, Func<TObject, TGroup>, IObservable<Unit>?)
Groups the source on the value returned by group selector factory. The groupings contains an inner observable list.
public static IObservable<IChangeSet<IGroup<TObject, TGroup>>> GroupOn<TObject, TGroup>(this IObservable<IChangeSet<TObject>> source, Func<TObject, TGroup> groupSelector, IObservable<Unit>? regrouper = null) where TObject : notnull where TGroup : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
groupSelectorFunc<TObject, TGroup>The group selector.
regrouperIObservable<Unit>Force the grouping function to recalculate the group value. For example if you have a time based grouping with values like `Last Minute', 'Last Hour', 'Today' etc regrouper is used to refresh these groupings.
Returns
- IObservable<IChange
Set <IGroup<TObject, TGroup>>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
TGroupThe type of the group.
Exceptions
- Argument
Null Exception source or groupSelector.
GroupWithImmutableState<TObject, TGroupKey>(IObservable<IChangeSet<TObject>>, Func<TObject, TGroupKey>, IObservable<Unit>?)
Groups the source on the value returned by group selector factory. Each update produces immutable grouping.
public static IObservable<IChangeSet<IGrouping<TObject, TGroupKey>>> GroupWithImmutableState<TObject, TGroupKey>(this IObservable<IChangeSet<TObject>> source, Func<TObject, TGroupKey> groupSelectorKey, IObservable<Unit>? regrouper = null) where TObject : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
groupSelectorKeyFunc<TObject, TGroupKey>The group selector key.
regrouperIObservable<Unit>Force the grouping function to recalculate the group value. For example if you have a time based grouping with values like `Last Minute', 'Last Hour', 'Today' etc regrouper is used to refresh these groupings.
Returns
- IObservable<IChange
Set <IGrouping<TObject, TGroupKey>>> An observable which emits the change set.
Type Parameters
TObjectThe type of the object.
TGroupKeyThe type of the group key.
Exceptions
- Argument
Null Exception source or groupSelectorKey.
LimitSizeTo<T>(ISourceList<T>, int, IScheduler?)
Limits the size of the source cache to the specified limit. Notifies which items have been removed from the source list.
public static IObservable<IEnumerable<T>> LimitSizeTo<T>(this ISourceList<T> source, int sizeLimit, IScheduler? scheduler = null) where T : notnull
Parameters
sourceISourceList <T>The source.
sizeLimitintThe size limit.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IEnumerable<T>>
An observable which emits a enumerable of items.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source.
- Argument
Exception sizeLimit cannot be zero.
MergeChangeSets<TObject>(IObservableList<IObservable<IChangeSet<TObject>>>, IEqualityComparer<TObject>?)
Merges all of the Cache Observable ChangeSets into a single ChangeSets that correctly handles removal of the parent items.
public static IObservable<IChangeSet<TObject>> MergeChangeSets<TObject>(this IObservableList<IObservable<IChangeSet<TObject>>> source, IEqualityComparer<TObject>? equalityComparer = null) where TObject : notnull
Parameters
sourceIObservableList <IObservable<IChangeSet <TObject>>>The SourceList of Observable Cache ChangeSets.
equalityComparerIEqualityComparer <TObject>Optional IEqualityComparer<T> instance to determine if two elements are the same.
Returns
- IObservable<IChange
Set <TObject>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject>(IEnumerable<IObservable<IChangeSet<TObject>>>, IEqualityComparer<TObject>?, IScheduler?, bool)
Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events.
public static IObservable<IChangeSet<TObject>> MergeChangeSets<TObject>(this IEnumerable<IObservable<IChangeSet<TObject>>> source, IEqualityComparer<TObject>? equalityComparer = null, IScheduler? scheduler = null, bool completable = true) where TObject : notnull
Parameters
sourceIEnumerable<IObservable<IChangeSet <TObject>>>The Source Observable ChangeSet.
equalityComparerIEqualityComparer <TObject>IEqualityComparer<T> instance to determine if two elements are the same.
schedulerIScheduler(Optional) System.
Reactive. instance to use when enumerating the collection.Concurrency. IScheduler completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChange
Set <TObject>> The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject>(IObservable<IChangeSet<IObservable<IChangeSet<TObject>>>>, IEqualityComparer<TObject>?)
Merges each Observable ChangeSet in the ObservableList into a single stream of ChangeSets that correctly handles removal of the parent items.
public static IObservable<IChangeSet<TObject>> MergeChangeSets<TObject>(this IObservable<IChangeSet<IObservable<IChangeSet<TObject>>>> source, IEqualityComparer<TObject>? equalityComparer = null) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <IObservable<IChangeSet <TObject>>>>The List Observable ChangeSet of Cache Observable ChangeSets.
equalityComparerIEqualityComparer <TObject>Optional IEqualityComparer<T> instance to determine if two elements are the same.
Returns
- IObservable<IChange
Set <TObject>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject>(IObservable<IChangeSet<TObject>>, IEnumerable<IObservable<IChangeSet<TObject>>>, IEqualityComparer<TObject>?, IScheduler?, bool)
Operator similiar to Merge except it is ChangeSet aware. Merges the source changeset and the collection of other changesets together into a single stream of ChangeSet events.
public static IObservable<IChangeSet<TObject>> MergeChangeSets<TObject>(this IObservable<IChangeSet<TObject>> source, IEnumerable<IObservable<IChangeSet<TObject>>> others, IEqualityComparer<TObject>? equalityComparer = null, IScheduler? scheduler = null, bool completable = true) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The Source Observable ChangeSet.
othersIEnumerable<IObservable<IChangeSet <TObject>>>The Other Observable ChangeSets.
equalityComparerIEqualityComparer <TObject>IEqualityComparer<T> instance to determine if two elements are the same.
schedulerIScheduler(Optional) System.
Reactive. instance to use when enumerating the collection.Concurrency. IScheduler completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChange
Set <TObject>> The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject>(IObservable<IChangeSet<TObject>>, IObservable<IChangeSet<TObject>>, IEqualityComparer<TObject>?, IScheduler?, bool)
Operator similiar to Merge except it is ChangeSet aware. Merges both observable changesets into a single stream of ChangeSet events.
public static IObservable<IChangeSet<TObject>> MergeChangeSets<TObject>(this IObservable<IChangeSet<TObject>> source, IObservable<IChangeSet<TObject>> other, IEqualityComparer<TObject>? equalityComparer = null, IScheduler? scheduler = null, bool completable = true) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The Source Observable ChangeSet.
otherIObservable<IChangeSet <TObject>>The Other Observable ChangeSet.
equalityComparerIEqualityComparer <TObject>IEqualityComparer<T> instance to determine if two elements are the same.
schedulerIScheduler(Optional) System.
Reactive. instance to use when enumerating the collection.Concurrency. IScheduler completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChange
Set <TObject>> The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject>(IObservable<IObservable<IChangeSet<TObject>>>, IEqualityComparer<TObject>?)
Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events.
public static IObservable<IChangeSet<TObject>> MergeChangeSets<TObject>(this IObservable<IObservable<IChangeSet<TObject>>> source, IEqualityComparer<TObject>? equalityComparer = null) where TObject : notnull
Parameters
sourceIObservable<IObservable<IChangeSet <TObject>>>The Source Observable ChangeSet.
equalityComparerIEqualityComparer <TObject>IEqualityComparer<T> instance to determine if two elements are the same.
Returns
- IObservable<IChange
Set <TObject>> The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject, TKey>(IObservableList<IObservable<IChangeSet<TObject, TKey>>>, IComparer<TObject>)
Merges each Observable ChangeSet in the ObservableList into a single stream of ChangeSets that correctly handles multiple Keys and removal of the parent items.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservableList<IObservable<IChangeSet<TObject, TKey>>> source, IComparer<TObject> comparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservableList <IObservable<IChangeSet <TObject, TKey>>>The SourceList of Observable Cache ChangeSets.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple child changesets.
Returns
- IObservable<IChange
Set <TObject, TKey>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the object key.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject, TKey>(IObservableList<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>?, IComparer<TObject>?)
Merges all of the Cache Observable ChangeSets into a single ChangeSets while correctly handling multiple Keys and removal of the parent items.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservableList<IObservable<IChangeSet<TObject, TKey>>> source, IEqualityComparer<TObject>? equalityComparer = null, IComparer<TObject>? comparer = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservableList <IObservable<IChangeSet <TObject, TKey>>>The SourceList of Observable Cache ChangeSets.
equalityComparerIEqualityComparer <TObject>Optional IEqualityComparer<T> instance to determine if two elements are the same.
comparerIComparer<TObject>Optional IComparer<T> instance to determine which element to emit if the same key is emitted from multiple child changesets.
Returns
- IObservable<IChange
Set <TObject, TKey>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the object key.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<IObservable<IChangeSet<TObject, TKey>>>>, IComparer<TObject>)
Merges all of the Cache Observable ChangeSets into a single ChangeSets while correctly handling multiple Keys and removal of the parent items.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<IObservable<IChangeSet<TObject, TKey>>>> source, IComparer<TObject> comparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet <IObservable<IChangeSet <TObject, TKey>>>>The List Observable ChangeSet of Cache Observable ChangeSets.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple child changesets.
Returns
- IObservable<IChange
Set <TObject, TKey>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the object key.
Exceptions
- Argument
Null Exception Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<IObservable<IChangeSet<TObject, TKey>>>>, IEqualityComparer<TObject>?, IComparer<TObject>?)
Merges each Observable ChangeSet in the ObservableList into a single stream of ChangeSets that correctly handles multiple Keys and removal of the parent items.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<IObservable<IChangeSet<TObject, TKey>>>> source, IEqualityComparer<TObject>? equalityComparer = null, IComparer<TObject>? comparer = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet <IObservable<IChangeSet <TObject, TKey>>>>The List Observable ChangeSet of Cache Observable ChangeSets.
equalityComparerIEqualityComparer <TObject>Optional IEqualityComparer<T> instance to determine if two elements are the same.
comparerIComparer<TObject>Optional IComparer<T> instance to determine which element to emit if the same key is emitted from multiple child changesets.
Returns
- IObservable<IChange
Set <TObject, TKey>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the object key.
Exceptions
- Argument
Null Exception Parameter was null.
MergeManyChangeSets<TObject, TDestination>(IObservable<IChangeSet<TObject>>, Func<TObject, IObservable<IChangeSet<TDestination>>>, IEqualityComparer<TDestination>?)
Operator similiar to MergeMany except it is List ChangeSet aware. It uses observableSelector to transform each item in the source into a child IChangeSet<TObject> and merges the result children together into a single stream of ChangeSets that correctly handles removal of the parent items and other changes to the source list.
public static IObservable<IChangeSet<TDestination>> MergeManyChangeSets<TObject, TDestination>(this IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<IChangeSet<TDestination>>> observableSelector, IEqualityComparer<TDestination>? equalityComparer = null) where TObject : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, IObservable<IChangeSet <TDestination>>>Factory Function used to create child changesets.
equalityComparerIEqualityComparer <TDestination>Optional IEqualityComparer<T> instance to determine if two elements are the same.
Returns
- IObservable<IChange
Set <TDestination>> The result from merging the children list changesets together.
Type Parameters
TObjectThe type of the object.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception Parameter was null.
MergeManyChangeSets<TObject, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TDestination>)
Operator similiar to MergeMany except it is Cache ChangeSet aware. It uses observableSelector to transform each item in the source into a child IChangeSet<TObject, TKey> and merges the result children together into a single stream of ChangeSets that correctly handles multiple Keys and removal of the parent items.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TDestination> comparer) where TObject : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, IObservable<IChangeSet <TDestination, TDestinationKey>>>Factory Function used to create child changesets.
comparerIComparer<TDestination>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple child changesets.
Returns
- IObservable<IChange
Set <TDestination, TDestinationKey>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- Argument
Null Exception Parameter was null.
MergeManyChangeSets<TObject, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Operator similiar to MergeMany except it is Cache ChangeSet aware. It uses observableSelector to transform each item in the source into a child IChangeSet<TObject, TKey> and merges the result children together into a single stream of ChangeSets that correctly handles multiple Keys and removal of the parent items.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TObject : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, IObservable<IChangeSet <TDestination, TDestinationKey>>>Factory Function used to create child changesets.
equalityComparerIEqualityComparer <TDestination>Optional IEqualityComparer<T> instance to determine if two elements are the same.
comparerIComparer<TDestination>Optional IComparer<T> instance to determine which element to emit if the same key is emitted from multiple child changesets.
Returns
- IObservable<IChange
Set <TDestination, TDestinationKey>> The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- Argument
Null Exception Parameter was null.
MergeMany<T, TDestination>(IObservable<IChangeSet<T>>, Func<T, 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.
public static IObservable<TDestination> MergeMany<T, TDestination>(this IObservable<IChangeSet<T>> source, Func<T, IObservable<TDestination>> observableSelector) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
observableSelectorFunc<T, IObservable<TDestination>>The observable selector.
Returns
- IObservable<TDestination>
An observable which emits the destination value.
Type Parameters
TThe type of the object.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or observableSelector.
NotEmpty<T>(IObservable<IChangeSet<T>>)
Prevents an empty notification.
public static IObservable<IChangeSet<T>> NotEmpty<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source.
OnItemAdded<T>(IObservable<IChangeSet<T>>, Action<T>)
Callback for each item as and when it is being added to the stream.
public static IObservable<IChangeSet<T>> OnItemAdded<T>(this IObservable<IChangeSet<T>> source, Action<T> addAction) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
addActionAction<T>The add action.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
OnItemRefreshed<TObject>(IObservable<IChangeSet<TObject>>, Action<TObject>)
Callback for each item as and when it is being refreshed in the stream.
public static IObservable<IChangeSet<TObject>> OnItemRefreshed<TObject>(this IObservable<IChangeSet<TObject>> source, Action<TObject> refreshAction) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
refreshActionAction<TObject>The refresh action.
Returns
- IObservable<IChange
Set <TObject>> An observable which emits a change set with items being added.
Type Parameters
TObjectThe type of the object.
OnItemRemoved<T>(IObservable<IChangeSet<T>>, Action<T>, bool)
Callback for each item as and when it is being removed from the stream.
public static IObservable<IChangeSet<T>> OnItemRemoved<T>(this IObservable<IChangeSet<T>> source, Action<T> removeAction, bool invokeOnUnsubscribe = true) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
removeActionAction<T>The remove action.
invokeOnUnsubscribeboolShould the remove action be invoked when the subscription is disposed.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source or removeAction.
Or<T>(IObservableList<IObservableList<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.
public static IObservable<IChangeSet<T>> Or<T>(this IObservableList<IObservableList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservableList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Or<T>(IObservableList<ISourceList<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.
public static IObservable<IChangeSet<T>> Or<T>(this IObservableList<ISourceList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <ISourceList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Or<T>(IObservableList<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.
public static IObservable<IChangeSet<T>> Or<T>(this IObservableList<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservable<IChangeSet <T>>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Or<T>(ICollection<IObservable<IChangeSet<T>>>)
Apply a logical Or operator between the collections. Items which are in any of the sources are included in the result.
public static IObservable<IChangeSet<T>> Or<T>(this ICollection<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesICollection<IObservable<IChangeSet <T>>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Or<T>(IObservable<IChangeSet<T>>, params IObservable<IChangeSet<T>>[])
Apply a logical Or operator between the collections. Items which are in any of the sources are included in the result.
public static IObservable<IChangeSet<T>> Or<T>(this IObservable<IChangeSet<T>> source, params IObservable<IChangeSet<T>>[] others) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
othersIObservable<IChangeSet <T>>[]The others.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Page<T>(IObservable<IChangeSet<T>>, IObservable<IPageRequest>)
Applies paging to the data source.
public static IObservable<IPageChangeSet<T>> Page<T>(this IObservable<IChangeSet<T>> source, IObservable<IPageRequest> requests) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
requestsIObservable<IPageRequest >Observable to control page requests.
Returns
- IObservable<IPage
Change <T>>Set An observable which emits the change set.
Type Parameters
TThe type of the item.
PopulateInto<T>(IObservable<IChangeSet<T>>, ISourceList<T>)
list.
public static IDisposable PopulateInto<T>(this IObservable<IChangeSet<T>> source, ISourceList<T> destination) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
destinationISourceList <T>The destination.
Returns
- IDisposable
An observable which emits the change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source or destination.
QueryWhenChanged<T>(IObservable<IChangeSet<T>>)
The latest copy of the cache is exposed for querying i) after each modification to the underlying data ii) upon subscription.
public static IObservable<IReadOnlyCollection<T>> QueryWhenChanged<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IRead
Only <T>>Collection An observable which emits the read only collection.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
QueryWhenChanged<TObject, TDestination>(IObservable<IChangeSet<TObject>>, Func<IReadOnlyCollection<TObject>, TDestination>)
The latest copy of the cache is exposed for querying after each modification to the underlying data.
public static IObservable<TDestination> QueryWhenChanged<TObject, TDestination>(this IObservable<IChangeSet<TObject>> source, Func<IReadOnlyCollection<TObject>, TDestination> resultSelector) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
resultSelectorFunc<IReadOnly <TObject>, TDestination>Collection The result selector.
Returns
- IObservable<TDestination>
An observable which emits the destination value.
Type Parameters
TObjectThe type of the object.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or resultSelector.
RefCount<T>(IObservable<IChangeSet<T>>)
List equivalent to Publish().RefCount(). The source is cached so long as there is at least 1 subscriber.
public static IObservable<IChangeSet<T>> RefCount<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
RemoveIndex<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.
public static IObservable<IChangeSet<T>> RemoveIndex<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Reverse<T>(IObservable<IChangeSet<T>>)
Reverse sort of the change set.
public static IObservable<IChangeSet<T>> Reverse<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or comparer.
SkipInitial<T>(IObservable<IChangeSet<T>>)
Defer the subscription until loaded and skip initial change set.
public static IObservable<IChangeSet<T>> SkipInitial<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
Sort<T>(IObservable<IChangeSet<T>>, IComparer<T>, SortOptions, IObservable<Unit>?, IObservable<IComparer<T>>?, int)
Sorts the sequence using the specified comparer.
public static IObservable<IChangeSet<T>> Sort<T>(this IObservable<IChangeSet<T>> source, IComparer<T> comparer, SortOptions options = SortOptions.None, IObservable<Unit>? resort = null, IObservable<IComparer<T>>? comparerChanged = null, int resetThreshold = 50) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
comparerIComparer<T>The comparer used for sorting.
optionsSortOptions For improved performance, specify SortOptions.UseBinarySearch. This can only be used when the values which are sorted on are immutable.
resortIObservable<Unit>OnNext of this observable causes data to resort. This is required when the value which is sorted on mutable.
comparerChangedIObservable<IComparer<T>>An observable comparer used to change the comparer on which the sorted list i.
resetThresholdintSince sorting can be slow for large record sets, the reset threshold is used to force the list re-ordered.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or comparer.
Sort<T>(IObservable<IChangeSet<T>>, IObservable<IComparer<T>>, SortOptions, IObservable<Unit>?, int)
Sorts the sequence using the specified observable comparer.
public static IObservable<IChangeSet<T>> Sort<T>(this IObservable<IChangeSet<T>> source, IObservable<IComparer<T>> comparerChanged, SortOptions options = SortOptions.None, IObservable<Unit>? resort = null, int resetThreshold = 50) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
comparerChangedIObservable<IComparer<T>>An observable comparer used to change the comparer on which the sorted list i.
optionsSortOptions For improved performance, specify SortOptions.UseBinarySearch. This can only be used when the values which are sorted on are immutable.
resortIObservable<Unit>OnNext of this observable causes data to resort. This is required when the value which is sorted on mutable.
resetThresholdintSince sorting can be slow for large record sets, the reset threshold is used to force the list re-ordered.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Null Exception source or comparer.
StartWithEmpty<T>(IObservable<IChangeSet<T>>)
Prepends an empty change set to the source.
public static IObservable<IChangeSet<T>> StartWithEmpty<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source observable of change set values.
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of item.
SubscribeMany<T>(IObservable<IChangeSet<T>>, Func<T, IDisposable>)
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.
public static IObservable<IChangeSet<T>> SubscribeMany<T>(this IObservable<IChangeSet<T>> source, Func<T, IDisposable> subscriptionFactory) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
subscriptionFactoryFunc<T, IDisposable>The subscription function.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Remarks
Subscribes to each item when it is added or updates and unsubscribes when it is removed.
Exceptions
- Argument
Null Exception source or subscriptionFactory.
SuppressRefresh<T>(IObservable<IChangeSet<T>>)
Suppress refresh notifications.
public static IObservable<IChangeSet<T>> SuppressRefresh<T>(this IObservable<IChangeSet<T>> source) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source observable change set.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the object.
Switch<T>(IObservable<IObservableList<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.
public static IObservable<IChangeSet<T>> Switch<T>(this IObservable<IObservableList<T>> sources) where T : notnull
Parameters
sourcesIObservable<IObservableList <T>>The source.
Returns
- IObservable<IChange
Set <T>> The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception sourcesis null.
Switch<T>(IObservable<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.
public static IObservable<IChangeSet<T>> Switch<T>(this IObservable<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesIObservable<IObservable<IChangeSet <T>>>The source.
Returns
- IObservable<IChange
Set <T>> The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception sourcesis null.
ToCollection<TObject>(IObservable<IChangeSet<TObject>>)
Converts the change set into a fully formed collection. Each change in the source results in a new collection.
public static IObservable<IReadOnlyCollection<TObject>> ToCollection<TObject>(this IObservable<IChangeSet<TObject>> source) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
Returns
- IObservable<IRead
Only <TObject>>Collection An observable which emits the read only collection.
Type Parameters
TObjectThe type of the object.
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, Func<T, TimeSpan?>?, int, IScheduler?)
Converts the observable to an observable change set, allowing size and time limit to be specified. Change set observes observable change events.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<IEnumerable<T>> source, Func<T, TimeSpan?>? expireAfter, int limitSizeTo, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IEnumerable<T>>The source.
expireAfterFunc<T, TimeSpan ?>Specify on a per object level the maximum time before an object expires from a cache.
limitSizeTointRemove the oldest items when the size has reached this limit.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source or keySelector.
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, Func<T, TimeSpan?>, IScheduler?)
Converts the observable to an observable change set, allowing size to be specified. Change set observes observable change events.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<IEnumerable<T>> source, Func<T, TimeSpan?> expireAfter, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IEnumerable<T>>The source.
expireAfterFunc<T, TimeSpan ?>Specify on a per object level the maximum time before an object expires from a cache.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, int, IScheduler?)
Converts the observable to an observable change set, allowing size and time limit to be specified. Change set observes observable change events.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<IEnumerable<T>> source, int limitSizeTo, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IEnumerable<T>>The source.
limitSizeTointRemove the oldest items when the size has reached this limit.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
ToObservableChangeSet<T>(IObservable<IEnumerable<T>>, IScheduler?)
Converts the observable to an observable change set. Change set observes observable change events.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<IEnumerable<T>> source, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<IEnumerable<T>>The source.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
ToObservableChangeSet<T>(IObservable<T>, Func<T, TimeSpan?>?, int, IScheduler?)
Converts the observable to an observable change set, allowing size and time limit to be specified. Change set observes observable change events.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<T> source, Func<T, TimeSpan?>? expireAfter, int limitSizeTo, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<T>The source.
expireAfterFunc<T, TimeSpan ?>Specify on a per object level the maximum time before an object expires from a cache.
limitSizeTointRemove the oldest items when the size has reached this limit. Supply -1 to disable size limiting.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
ToObservableChangeSet<T>(IObservable<T>, Func<T, TimeSpan?>, IScheduler?)
Converts the observable to an observable change set, allowing time expiry to be specified. Change set observes observable change events.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<T> source, Func<T, TimeSpan?> expireAfter, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<T>The source.
expireAfterFunc<T, TimeSpan ?>Specify on a per object level the maximum time before an object expires from a cache.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
ToObservableChangeSet<T>(IObservable<T>, int, IScheduler?)
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.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<T> source, int limitSizeTo, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<T>The source.
limitSizeTointRemove the oldest items when the size has reached this limit. Supply -1 to disable size limiting.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
ToObservableChangeSet<T>(IObservable<T>, IScheduler?)
Converts the observable to an observable change set. Change set observes observable change events.
public static IObservable<IChangeSet<T>> ToObservableChangeSet<T>(this IObservable<T> source, IScheduler? scheduler = null) where T : notnull
Parameters
sourceIObservable<T>The source.
schedulerISchedulerThe scheduler (only used for time expiry).
Returns
- IObservable<IChange
Set <T>> An observable which emits a change set.
Type Parameters
TThe type of the object.
Exceptions
- Argument
Null Exception source.
ToSortedCollection<TObject>(IObservable<IChangeSet<TObject>>, IComparer<TObject>)
Converts the change set into a fully formed sorted collection. Each change in the source results in a new sorted collection.
public static IObservable<IReadOnlyCollection<TObject>> ToSortedCollection<TObject>(this IObservable<IChangeSet<TObject>> source, IComparer<TObject> comparer) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
comparerIComparer<TObject>The sort comparer.
Returns
- IObservable<IRead
Only <TObject>>Collection An observable which emits the read only collection.
Type Parameters
TObjectThe type of the object.
ToSortedCollection<TObject, TSortKey>(IObservable<IChangeSet<TObject>>, Func<TObject, TSortKey>, SortDirection)
Converts the change set into a fully formed sorted collection. Each change in the source results in a new sorted collection.
public static IObservable<IReadOnlyCollection<TObject>> ToSortedCollection<TObject, TSortKey>(this IObservable<IChangeSet<TObject>> source, Func<TObject, TSortKey> sort, SortDirection sortOrder = SortDirection.Ascending) where TObject : notnull
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
sortFunc<TObject, TSortKey>The sort function.
sortOrderSortDirection The sort order. Defaults to ascending.
Returns
- IObservable<IRead
Only <TObject>>Collection An observable which emits the read only collection.
Type Parameters
TObjectThe type of the object.
TSortKeyThe sort key.
Top<T>(IObservable<IChangeSet<T>>, int)
Limits the size of the result set to the specified number of items.
public static IObservable<IChangeSet<T>> Top<T>(this IObservable<IChangeSet<T>> source, int numberOfItems) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
numberOfItemsintThe number of items.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
TransformAsync<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Optional<TDestination>, int, Task<TDestination>>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination>> TransformAsync<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, Optional<TDestination>, int, Task<TDestination>> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, Optional<TDestination>, int, Task<TDestination>>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> A an observable change set of the transformed object.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
TransformAsync<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Optional<TDestination>, Task<TDestination>>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination>> TransformAsync<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, Optional<TDestination>, Task<TDestination>> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, Optional<TDestination>, Task<TDestination>>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> A an observable change set of the transformed object.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
TransformAsync<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, int, Task<TDestination>>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination>> TransformAsync<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, int, Task<TDestination>> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, int, Task<TDestination>>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> A an observable change set of the transformed object.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
TransformAsync<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Task<TDestination>>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination>> TransformAsync<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, Task<TDestination>> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, Task<TDestination>>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> A an observable change set of the transformed object.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, IObservableList<TDestination>>, IEqualityComparer<TDestination>?)
Flatten the nested observable list, and observe subsequent observable collection changes.
public static IObservable<IChangeSet<TDestination>> TransformMany<TDestination, TSource>(this IObservable<IChangeSet<TSource>> source, Func<TSource, IObservableList<TDestination>> manySelector, IEqualityComparer<TDestination>? equalityComparer = null) where TDestination : notnull where TSource : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
manySelectorFunc<TSource, IObservableList <TDestination>>The selector function which selects the enumerable.
equalityComparerIEqualityComparer <TDestination>Used when an item has been replaced to determine whether child items are the same as previous children.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, IEnumerable<TDestination>>, IEqualityComparer<TDestination>?)
Equivalent to a select many transform. To work, the key must individually identify each child.
public static IObservable<IChangeSet<TDestination>> TransformMany<TDestination, TSource>(this IObservable<IChangeSet<TSource>> source, Func<TSource, IEnumerable<TDestination>> manySelector, IEqualityComparer<TDestination>? equalityComparer = null) where TDestination : notnull where TSource : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
manySelectorFunc<TSource, IEnumerable<TDestination>>The selector function which selects the enumerable.
equalityComparerIEqualityComparer <TDestination>Used when an item has been replaced to determine whether child items are the same as previous children.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
Exceptions
- Argument
Null Exception source or manySelector.
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, ObservableCollection<TDestination>>, IEqualityComparer<TDestination>?)
Flatten the nested observable collection, and observe subsequently observable collection changes.
public static IObservable<IChangeSet<TDestination>> TransformMany<TDestination, TSource>(this IObservable<IChangeSet<TSource>> source, Func<TSource, ObservableCollection<TDestination>> manySelector, IEqualityComparer<TDestination>? equalityComparer = null) where TDestination : notnull where TSource : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
manySelectorFunc<TSource, ObservableCollection <TDestination>>The selector function which selects the enumerable.
equalityComparerIEqualityComparer <TDestination>Used when an item has been replaced to determine whether child items are the same as previous children.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TransformMany<TDestination, TSource>(IObservable<IChangeSet<TSource>>, Func<TSource, ReadOnlyObservableCollection<TDestination>>, IEqualityComparer<TDestination>?)
Flatten the nested observable collection, and observe subsequently observable collection changes.
public static IObservable<IChangeSet<TDestination>> TransformMany<TDestination, TSource>(this IObservable<IChangeSet<TSource>> source, Func<TSource, ReadOnlyObservableCollection<TDestination>> manySelector, IEqualityComparer<TDestination>? equalityComparer = null) where TDestination : notnull where TSource : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
manySelectorFunc<TSource, ReadOnly <TDestination>>Observable Collection The selector function which selects the enumerable.
equalityComparerIEqualityComparer <TDestination>Used when an item has been replaced to determine whether child items are the same as previous children.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Optional<TDestination>, int, TDestination>, bool)
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.
public static IObservable<IChangeSet<TDestination>> Transform<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, Optional<TDestination>, int, TDestination> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, Optional<TDestination>, int, TDestination>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> A an observable change set of the transformed object.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, Optional<TDestination>, TDestination>, bool)
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.
public static IObservable<IChangeSet<TDestination>> Transform<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, Optional<TDestination>, TDestination> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, Optional<TDestination>, TDestination>The transform function.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> A an observable change set of the transformed object.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, int, TDestination>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination>> Transform<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, int, TDestination> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, int, TDestination>The transform function.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> A an observable change set of the transformed object.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
Transform<TSource, TDestination>(IObservable<IChangeSet<TSource>>, Func<TSource, TDestination>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination>> Transform<TSource, TDestination>(this IObservable<IChangeSet<TSource>> source, Func<TSource, TDestination> transformFactory, bool transformOnRefresh = false) where TSource : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet <TSource>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChange
Set <TDestination>> An observable which emits the change set.
Type Parameters
TSourceThe type of the source.
TDestinationThe type of the destination.
Exceptions
- Argument
Null Exception source or valueSelector.
Virtualise<T>(IObservable<IChangeSet<T>>, IObservable<IVirtualRequest>)
Virtualises the source using parameters provided via the requests observable.
public static IObservable<IVirtualChangeSet<T>> Virtualise<T>(this IObservable<IChangeSet<T>> source, IObservable<IVirtualRequest> requests) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
requestsIObservable<IVirtualRequest >The requests.
Returns
- IObservable<IVirtual
Change <T>>Set An observable which emits the change set.
Type Parameters
TThe type of the item.
WhenAnyPropertyChanged<TObject>(IObservable<IChangeSet<TObject>>, params string[])
Watches each item in the collection and notifies when any of them has changed.
public static IObservable<TObject?> WhenAnyPropertyChanged<TObject>(this IObservable<IChangeSet<TObject>> source, params string[] propertiesToMonitor) where TObject : INotifyPropertyChanged
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
propertiesToMonitorstring[]specify properties to Monitor, or omit to monitor all property changes.
Returns
- IObservable<TObject>
An observable which emits the object.
Type Parameters
TObjectThe type of the object.
WhenPropertyChanged<TObject, TValue>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TValue>>, bool)
Watches each item in the collection and notifies when any of them has changed.
public static IObservable<PropertyValue<TObject, TValue>> WhenPropertyChanged<TObject, TValue>(this IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TValue>> propertyAccessor, bool notifyOnInitialValue = true) where TObject : INotifyPropertyChanged
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
propertyAccessorExpression<Func<TObject, TValue>>The property accessor.
notifyOnInitialValueboolIf true the resulting observable includes the initial value.
Returns
- IObservable<Property
Value <TObject, TValue>> An observable which emits the property value.
Type Parameters
TObjectThe type of object.
TValueThe type of the value.
WhenValueChanged<TObject, TValue>(IObservable<IChangeSet<TObject>>, Expression<Func<TObject, TValue>>, bool)
Watches each item in the collection and notifies when any of them has changed.
public static IObservable<TValue?> WhenValueChanged<TObject, TValue>(this IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TValue>> propertyAccessor, bool notifyOnInitialValue = true) where TObject : INotifyPropertyChanged
Parameters
sourceIObservable<IChangeSet <TObject>>The source.
propertyAccessorExpression<Func<TObject, TValue>>The property accessor.
notifyOnInitialValueboolIf true the resulting observable includes the initial value.
Returns
- IObservable<TValue>
An observable which emits the value.
Type Parameters
TObjectThe type of object.
TValueThe type of the value.
WhereReasonsAreNot<T>(IObservable<IChangeSet<T>>, params ListChangeReason[])
Excludes updates for the specified reasons.
public static IObservable<IChangeSet<T>> WhereReasonsAreNot<T>(this IObservable<IChangeSet<T>> source, params ListChangeReason[] reasons) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
reasonsListChange []Reason The reasons.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Exception Must enter at least 1 reason.
WhereReasonsAre<T>(IObservable<IChangeSet<T>>, params ListChangeReason[])
Includes changes for the specified reasons only.
public static IObservable<IChangeSet<T>> WhereReasonsAre<T>(this IObservable<IChangeSet<T>> source, params ListChangeReason[] reasons) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
reasonsListChange []Reason The reasons.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Exceptions
- Argument
Exception Must enter at least 1 reason.
Xor<T>(IObservableList<IObservableList<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.
public static IObservable<IChangeSet<T>> Xor<T>(this IObservableList<IObservableList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservableList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Xor<T>(IObservableList<ISourceList<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.
public static IObservable<IChangeSet<T>> Xor<T>(this IObservableList<ISourceList<T>> sources) where T : notnull
Parameters
sourcesIObservableList <ISourceList <T>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Xor<T>(IObservableList<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.
public static IObservable<IChangeSet<T>> Xor<T>(this IObservableList<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesIObservableList <IObservable<IChangeSet <T>>>The source.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Xor<T>(ICollection<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.
public static IObservable<IChangeSet<T>> Xor<T>(this ICollection<IObservable<IChangeSet<T>>> sources) where T : notnull
Parameters
sourcesICollection<IObservable<IChangeSet <T>>>The sources.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.
Xor<T>(IObservable<IChangeSet<T>>, params 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.
public static IObservable<IChangeSet<T>> Xor<T>(this IObservable<IChangeSet<T>> source, params IObservable<IChangeSet<T>>[] others) where T : notnull
Parameters
sourceIObservable<IChangeSet <T>>The source.
othersIObservable<IChangeSet <T>>[]The others.
Returns
- IObservable<IChange
Set <T>> An observable which emits the change set.
Type Parameters
TThe type of the item.