Class ObservableCacheEx
- Namespace
- DynamicData
- Assembly
- DynamicData.dll
Extensions for dynamic data.
public static class ObservableCacheEx
- Inheritance
-
ObservableCacheEx
Methods
Adapt<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IChangeSetAdaptor<TObject, TKey>)
Inject side effects into the stream using the specified adaptor.
public static IObservable<IChangeSet<TObject, TKey>> Adapt<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IChangeSetAdaptor<TObject, TKey> adaptor) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
adaptorIChangeSetAdaptor<TObject, TKey>The adaptor.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or destination.
Adapt<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, ISortedChangeSetAdaptor<TObject, TKey>)
Inject side effects into the stream using the specified sorted adaptor.
public static IObservable<IChangeSet<TObject, TKey>> Adapt<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, ISortedChangeSetAdaptor<TObject, TKey> adaptor) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
adaptorISortedChangeSetAdaptor<TObject, TKey>The adaptor.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or destination.
AddOrUpdate<TObject, TKey>(IIntermediateCache<TObject, TKey>, TObject, TKey)
Adds or updates the cache with the specified item / key pair.
public static void AddOrUpdate<TObject, TKey>(this IIntermediateCache<TObject, TKey> source, TObject item, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceIIntermediateCache<TObject, TKey>The source cache.
itemTObjectThe item to add or update.
keyTKeyThe key to add or update.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
AddOrUpdate<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>)
public static void AddOrUpdate<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> items) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemsIEnumerable<TObject>The items.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
AddOrUpdate<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>, IEqualityComparer<TObject>)
public static void AddOrUpdate<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> items, IEqualityComparer<TObject> equalityComparer) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemsIEnumerable<TObject>The items.
equalityComparerIEqualityComparer<TObject>The equality comparer used to determine whether a new item is the same as an existing cached item.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
AddOrUpdate<TObject, TKey>(ISourceCache<TObject, TKey>, TObject)
Adds or updates the cache with the specified item.
public static void AddOrUpdate<TObject, TKey>(this ISourceCache<TObject, TKey> source, TObject item) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemTObjectThe item.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
AddOrUpdate<TObject, TKey>(ISourceCache<TObject, TKey>, TObject, IEqualityComparer<TObject>)
Adds or updates the cache with the specified item.
public static void AddOrUpdate<TObject, TKey>(this ISourceCache<TObject, TKey> source, TObject item, IEqualityComparer<TObject> equalityComparer) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemTObjectThe item.
equalityComparerIEqualityComparer<TObject>The equality comparer used to determine whether a new item is the same as an existing cached item.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
And<TObject, TKey>(IObservableList<IObservableCache<TObject, TKey>>)
Dynamically apply a logical And operator between the items in the outer observable list. Items which are in all of the sources are included in the result.
public static IObservable<IChangeSet<TObject, TKey>> And<TObject, TKey>(this IObservableList<IObservableCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservableCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
And<TObject, TKey>(IObservableList<ISourceCache<TObject, TKey>>)
Dynamically apply a logical And operator between the items in the outer observable list. Items which are in all of the sources are included in the result.
public static IObservable<IChangeSet<TObject, TKey>> And<TObject, TKey>(this IObservableList<ISourceCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<ISourceCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
And<TObject, TKey>(IObservableList<IObservable<IChangeSet<TObject, TKey>>>)
Dynamically apply a logical And operator between the items in the outer observable list. Items which are in all of the sources are included in the result.
public static IObservable<IChangeSet<TObject, TKey>> And<TObject, TKey>(this IObservableList<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
And<TObject, TKey>(ICollection<IObservable<IChangeSet<TObject, TKey>>>)
Applied a logical And operator between the collections i.e items which are in all of the sources are included.
public static IObservable<IChangeSet<TObject, TKey>> And<TObject, TKey>(this ICollection<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesICollection<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.
And<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, params IObservable<IChangeSet<TObject, TKey>>[])
Applied a logical And operator between the collections i.e items which are in all of the sources are included.
public static IObservable<IChangeSet<TObject, TKey>> And<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, params IObservable<IChangeSet<TObject, TKey>>[] others) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
othersIObservable<IChangeSet<TObject, TKey>>[]The others.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.
AsObservableCache<TObject, TKey>(IObservableCache<TObject, TKey>)
Converts the source to an read only observable cache.
public static IObservableCache<TObject, TKey> AsObservableCache<TObject, TKey>(this IObservableCache<TObject, TKey> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservableCache<TObject, TKey>The source.
Returns
- IObservableCache<TObject, TKey>
An observable cache.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
AsObservableCache<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, bool)
Converts the source to a readonly observable cache.
public static IObservableCache<TObject, TKey> AsObservableCache<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, bool applyLocking = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
applyLockingboolif set to
trueall methods are synchronised. There is no need to apply locking when the consumer can be sure the read / write operations are already synchronised.
Returns
- IObservableCache<TObject, TKey>
An observable cache.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
AsyncDisposeMany<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<IObservable<Unit>>)
Automatically disposes items within the source collection, upon removal of the collection or teardown of the operator.
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. This includes both upstream completion or failure, or downstream un-subscription.
Disposal is supported for both IDisposable and IAsyncDisposable items. Items implementing neither of these interfaces are unaffected by this operator.
public static IObservable<IChangeSet<TObject, TKey>> AsyncDisposeMany<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<IObservable<Unit>> disposalsCompletedAccessor) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>A stream of changes from the source collection.
disposalsCompletedAccessorAction<IObservable<Unit>>An action to be invoked upon each subscription to this operator, allowing the consumer access to the "disposalsCompleted" stream for that subscription.
The "disposalsCompleted" stream allows the consumer to properly observe the asynchronous disposal of any IAsyncDisposable items that are disposed by the operator. This stream will emit a single value, and then complete, upon successfull completion of all DisposeAsync() invocations performed by the operator.
Providing these notifications within a downstream channel separate from the main collection change stream ensures that these notifications can be observed even in the event of a failure within the operator, or within
sourcestream.
Returns
- IObservable<IChangeSet<TObject, TKey>>
A stream containing copies of all changes observed from
source.
Type Parameters
TObjectThe type of items in the source collection.
TKeyThe type of key values used to uniquely identify items in the source collection.
Exceptions
- ArgumentNullException
Throws for
sourceanddisposalsCompletedAccessor.
AutoRefreshOnObservable<TObject, TKey, TAny>(IObservable<IChangeSet<TObject, TKey>>, 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, TKey>> AutoRefreshOnObservable<TObject, TKey, TAny>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TAny>> reevaluator, TimeSpan? changeSetBuffer = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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<IChangeSet<TObject, TKey>>
An observable change set with additional refresh changes.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
TAnyThe type of evaluation.
AutoRefreshOnObservable<TObject, TKey, TAny>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<TAny>>, TimeSpan?, IScheduler?)
Automatically refresh downstream operator. The refresh is triggered when the observable receives a notification.
public static IObservable<IChangeSet<TObject, TKey>> AutoRefreshOnObservable<TObject, TKey, TAny>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<TAny>> reevaluator, TimeSpan? changeSetBuffer = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source observable change set.
reevaluatorFunc<TObject, TKey, 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<IChangeSet<TObject, TKey>>
An observable change set with additional refresh changes.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
TAnyThe type of evaluation.
AutoRefresh<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TimeSpan?, TimeSpan?, IScheduler?)
Automatically refresh downstream operators when any properties change.
public static IObservable<IChangeSet<TObject, TKey>> AutoRefresh<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TimeSpan? changeSetBuffer = null, TimeSpan? propertyChangeThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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<IChangeSet<TObject, TKey>>
An observable change set with additional refresh changes.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
AutoRefresh<TObject, TKey, TProperty>(IObservable<IChangeSet<TObject, TKey>>, Expression<Func<TObject, TProperty>>, TimeSpan?, TimeSpan?, IScheduler?)
Automatically refresh downstream operators when properties change.
public static IObservable<IChangeSet<TObject, TKey>> AutoRefresh<TObject, TKey, TProperty>(this IObservable<IChangeSet<TObject, TKey>> source, Expression<Func<TObject, TProperty>> propertyAccessor, TimeSpan? changeSetBuffer = null, TimeSpan? propertyChangeThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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<IChangeSet<TObject, TKey>>
An observable change set with additional refresh changes.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
TPropertyThe type of the property.
BatchIf<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<bool>, bool, IObservable<Unit>?, 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<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, IObservable<Unit>? timer = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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].timerIObservable<Unit>Specify a time observable. The buffer will be emptied each time the timer produces a value and when it completes. On completion buffering will cease.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
BatchIf<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, 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<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, TimeSpan? timeOut = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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. On completion buffering will cease.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
BatchIf<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, 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<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
BatchIf<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, 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<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, TimeSpan? timeOut = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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. On completion buffering will cease.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
BatchIf<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, 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<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
pauseIfTrueSelectorIObservable<bool>When true, observable begins to buffer and when false, window closes and buffered result if notified.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Batch<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TimeSpan, IScheduler?)
Batches the updates for the specified time period.
public static IObservable<IChangeSet<TObject, TKey>> Batch<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TimeSpan timeSpan, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
timeSpanTimeSpanThe time span.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or scheduler.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>, IList<TObject>)
Bind paged data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> source, IList<TObject> targetList) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>The source.
targetListIList<TObject>The list to bind to.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>, IList<TObject>, SortAndBindOptions)
Bind paged data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> source, IList<TObject> targetList, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>The source.
targetListIList<TObject>The list to bind to.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>, out ReadOnlyObservableCollection<TObject>)
Bind paged data to the specified readonly observable collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>, out ReadOnlyObservableCollection<TObject>, SortAndBindOptions)
Bind paged data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>, IList<TObject>)
Bind virtualized data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> source, IList<TObject> targetList) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>The source.
targetListIList<TObject>The list to bind to.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>, IList<TObject>, SortAndBindOptions)
Bind virtualized data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> source, IList<TObject> targetList, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>The source.
targetListIList<TObject>The list to bind to.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>, out ReadOnlyObservableCollection<TObject>)
Bind virtualized and sorted data to the specified readonly observable collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>, out ReadOnlyObservableCollection<TObject>, SortAndBindOptions)
Bind virtualized data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservableCollection<TObject>, BindingOptions)
Binds the results to the specified observable collection using the default update algorithm.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservableCollection<TObject> destination, BindingOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
destinationIObservableCollection<TObject>The destination.
optionsBindingOptionsThe binding options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservableCollection<TObject>, IObservableCollectionAdaptor<TObject, TKey>)
Binds the results to the specified binding collection using the specified update algorithm.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservableCollection<TObject> destination, IObservableCollectionAdaptor<TObject, TKey> updater) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
destinationIObservableCollection<TObject>The destination.
updaterIObservableCollectionAdaptor<TObject, TKey>The updater.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservableCollection<TObject>, int)
Binds the results to the specified observable collection using the default update algorithm.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservableCollection<TObject> destination, int refreshThreshold = 25) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
destinationIObservableCollection<TObject>The destination.
refreshThresholdintThe number of changes before a reset notification is triggered.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, BindingOptions)
Binds the results to the specified readonly observable collection using the default update algorithm.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, BindingOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
optionsBindingOptionsThe binding options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, int, bool, IObservableCollectionAdaptor<TObject, TKey>?)
Binds the results to the specified readonly observable collection using the default update algorithm.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, int resetThreshold = 25, bool useReplaceForUpdates = true, IObservableCollectionAdaptor<TObject, TKey>? adaptor = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
resetThresholdintThe number of changes before a reset notification is triggered.
useReplaceForUpdatesboolUse replace instead of remove / add for updates. NB: Some platforms to not support replace notifications for binding.
adaptorIObservableCollectionAdaptor<TObject, TKey>Specify an adaptor to change the algorithm to update the target collection.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, BindingList<TObject>, int)
Binds a clone of the observable change set to the target observable collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, BindingList<TObject> bindingList, int resetThreshold = 25) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
bindingListBindingList<TObject>The target binding list.
resetThresholdintThe reset threshold.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe object type.
TKeyThe key type.
Exceptions
- ArgumentNullException
source or targetCollection.
Bind<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, IObservableCollection<TObject>)
Binds the results to the specified observable collection using the default update algorithm.
public static IObservable<ISortedChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, IObservableCollection<TObject> destination) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
destinationIObservableCollection<TObject>The destination.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, IObservableCollection<TObject>, BindingOptions)
Binds the results to the specified observable collection using the default update algorithm.
public static IObservable<ISortedChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, IObservableCollection<TObject> destination, BindingOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
destinationIObservableCollection<TObject>The destination.
optionsBindingOptionsThe binding options.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, IObservableCollection<TObject>, ISortedObservableCollectionAdaptor<TObject, TKey>)
Binds the results to the specified binding collection using the specified update algorithm.
public static IObservable<ISortedChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, IObservableCollection<TObject> destination, ISortedObservableCollectionAdaptor<TObject, TKey> updater) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
destinationIObservableCollection<TObject>The destination.
updaterISortedObservableCollectionAdaptor<TObject, TKey>The updater.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, BindingOptions)
Binds the results to the specified readonly observable collection using the default update algorithm.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, BindingOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
optionsBindingOptionsThe binding options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, int, bool, ISortedObservableCollectionAdaptor<TObject, TKey>?)
Binds the results to the specified readonly observable collection using the default update algorithm.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, int resetThreshold = 25, bool useReplaceForUpdates = true, ISortedObservableCollectionAdaptor<TObject, TKey>? adaptor = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
resetThresholdintThe number of changes before a reset event is called on the observable collection.
useReplaceForUpdatesboolUse replace instead of remove / add for updates. NB: Some platforms to not support replace notifications for binding.
adaptorISortedObservableCollectionAdaptor<TObject, TKey>Specify an adaptor to change the algorithm to update the target collection.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Bind<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, BindingList<TObject>, int)
Binds a clone of the observable change set to the target observable collection.
public static IObservable<IChangeSet<TObject, TKey>> Bind<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, BindingList<TObject> bindingList, int resetThreshold = 25) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
bindingListBindingList<TObject>The target binding list.
resetThresholdintThe reset threshold.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe object type.
TKeyThe key type.
Exceptions
- ArgumentNullException
source or targetCollection.
BufferInitial<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TimeSpan, IScheduler?)
Buffers changes for an initial period only. After the period has elapsed, not further buffering occurs.
public static IObservable<IChangeSet<TObject, TKey>> BufferInitial<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TimeSpan initialBuffer, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source change set.
initialBufferTimeSpanThe period to buffer, measure from the time that the first item arrives.
schedulerISchedulerThe scheduler to buffer on.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe object type.
TKeyThe type of the key.
Cast<TSource, TKey, TDestination>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>)
Cast the object to the specified type. Alas, I had to add the converter due to type inference issues.
public static IObservable<IChangeSet<TDestination, TKey>> Cast<TSource, TKey, TDestination>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> converter) where TSource : notnull where TKey : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
converterFunc<TSource, TDestination>The conversion factory.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
An observable which emits change sets.
Type Parameters
TSourceThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
ChangeKey<TObject, TSourceKey, TDestinationKey>(IObservable<IChangeSet<TObject, TSourceKey>>, Func<TObject, TDestinationKey>)
Changes the primary key.
public static IObservable<IChangeSet<TObject, TDestinationKey>> ChangeKey<TObject, TSourceKey, TDestinationKey>(this IObservable<IChangeSet<TObject, TSourceKey>> source, Func<TObject, TDestinationKey> keySelector) where TObject : notnull where TSourceKey : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TSourceKey>>The source.
keySelectorFunc<TObject, TDestinationKey>The key selector eg. (item) => newKey.
Returns
- IObservable<IChangeSet<TObject, TDestinationKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TSourceKeyThe type of the source key.
TDestinationKeyThe type of the destination key.
ChangeKey<TObject, TSourceKey, TDestinationKey>(IObservable<IChangeSet<TObject, TSourceKey>>, Func<TSourceKey, TObject, TDestinationKey>)
Changes the primary key.
public static IObservable<IChangeSet<TObject, TDestinationKey>> ChangeKey<TObject, TSourceKey, TDestinationKey>(this IObservable<IChangeSet<TObject, TSourceKey>> source, Func<TSourceKey, TObject, TDestinationKey> keySelector) where TObject : notnull where TSourceKey : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TSourceKey>>The source.
keySelectorFunc<TSourceKey, TObject, TDestinationKey>The key selector eg. (key, item) => newKey.
Returns
- IObservable<IChangeSet<TObject, TDestinationKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TSourceKeyThe type of the source key.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
source.
Clear<TObject, TKey>(LockFreeObservableCache<TObject, TKey>)
Clears all data.
public static void Clear<TObject, TKey>(this LockFreeObservableCache<TObject, TKey> source) where TObject : notnull where TKey : notnull
Parameters
sourceLockFreeObservableCache<TObject, TKey>The source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Clear<TObject, TKey>(IIntermediateCache<TObject, TKey>)
Clears all items from the cache.
public static void Clear<TObject, TKey>(this IIntermediateCache<TObject, TKey> source) where TObject : notnull where TKey : notnull
Parameters
sourceIIntermediateCache<TObject, TKey>The source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Clear<TObject, TKey>(ISourceCache<TObject, TKey>)
Clears all data.
public static void Clear<TObject, TKey>(this ISourceCache<TObject, TKey> source) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Clone<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, ICollection<TObject>)
Clones the changes into the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> Clone<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, ICollection<TObject> target) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
targetICollection<TObject>The target.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Convert<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, 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("This was an experiment that did not work. Use Transform instead")]
public static IObservable<IChangeSet<TDestination, TKey>> Convert<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TDestination> conversionFactory) where TObject : notnull where TKey : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
conversionFactoryFunc<TObject, TDestination>The conversion factory.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
DeferUntilLoaded<TObject, TKey>(IObservableCache<TObject, TKey>)
Defer the subscription until the stream has been inflated with data.
public static IObservable<IChangeSet<TObject, TKey>> DeferUntilLoaded<TObject, TKey>(this IObservableCache<TObject, TKey> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservableCache<TObject, TKey>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
DeferUntilLoaded<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Defer the subscription until the stream has been inflated with data.
public static IObservable<IChangeSet<TObject, TKey>> DeferUntilLoaded<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
DisposeMany<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
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<TObject, TKey>> DisposeMany<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
A continuation of the original stream.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
DistinctValues<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TValue>)
Selects distinct values from the source.
public static IObservable<IDistinctChangeSet<TValue>> DistinctValues<TObject, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TValue> valueSelector) where TObject : notnull where TKey : notnull where TValue : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
valueSelectorFunc<TObject, TValue>The value selector.
Returns
- IObservable<IDistinctChangeSet<TValue>>
An observable which will emit distinct change sets.
Type Parameters
TObjectThe type object from which the distinct values are selected.
TKeyThe type of the key.
TValueThe type of the value.
Remarks
Due to it's nature only adds or removes can be returned.
Exceptions
- ArgumentNullException
source.
EditDiff<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>, IEqualityComparer<TObject>)
Loads the cache with the specified items in an optimised manner i.e. calculates the differences between the old and new items in the list and amends only the differences.
public static void EditDiff<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> allItems, IEqualityComparer<TObject> equalityComparer) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
allItemsIEnumerable<TObject>The items to add, update or delete.
equalityComparerIEqualityComparer<TObject>The equality comparer used to determine whether a new item is the same as an existing cached item.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
EditDiff<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>, Func<TObject, TObject, bool>)
Loads the cache with the specified items in an optimised manner i.e. calculates the differences between the old and new items in the list and amends only the differences.
public static void EditDiff<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> allItems, Func<TObject, TObject, bool> areItemsEqual) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
allItemsIEnumerable<TObject>The items to compare and add, update or delete.
areItemsEqualFunc<TObject, TObject, bool>Expression to determine whether an item's value is equal to the old value (current, previous) => current.Version == previous.Version.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
EditDiff<TObject, TKey>(IObservable<Optional<TObject>>, Func<TObject, TKey>, IEqualityComparer<TObject>?)
Converts an Observable Optional to an Observable ChangeSet that adds/removes/updates as the optional changes.
public static IObservable<IChangeSet<TObject, TKey>> EditDiff<TObject, TKey>(this IObservable<Optional<TObject>> source, Func<TObject, TKey> keySelector, IEqualityComparer<TObject>? equalityComparer = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<Optional<TObject>>The source.
keySelectorFunc<TObject, TKey>Key Selection Function for the ChangeSet.
equalityComparerIEqualityComparer<TObject>Optional IEqualityComparer<T> instance to use for comparing values.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable changeset.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
EditDiff<TObject, TKey>(IObservable<IEnumerable<TObject>>, Func<TObject, TKey>, IEqualityComparer<TObject>?)
Converts an Observable of Enumerable to an Observable ChangeSet that updates when the enumerables changes. Counterpart operator to ToCollection<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>).
public static IObservable<IChangeSet<TObject, TKey>> EditDiff<TObject, TKey>(this IObservable<IEnumerable<TObject>> source, Func<TObject, TKey> keySelector, IEqualityComparer<TObject>? equalityComparer = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IEnumerable<TObject>>The source.
keySelectorFunc<TObject, TKey>Key Selection Function for the ChangeSet.
equalityComparerIEqualityComparer<TObject>Optional IEqualityComparer<T> instance to use for comparing values.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable cache.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
EnsureUniqueKeys<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Ensures there are no duplicated keys in the observable changeset.
public static IObservable<IChangeSet<TObject, TKey>> EnsureUniqueKeys<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source change set.
Returns
- IObservable<IChangeSet<TObject, TKey>>
A changeset which guarantees a key is only present at most once in the changeset.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Except<TObject, TKey>(IObservableList<IObservableCache<TObject, TKey>>)
Dynamically apply a logical Except 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<TObject, TKey>> Except<TObject, TKey>(this IObservableList<IObservableCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservableCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Except<TObject, TKey>(IObservableList<ISourceCache<TObject, TKey>>)
Dynamically apply a logical Except 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<TObject, TKey>> Except<TObject, TKey>(this IObservableList<ISourceCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<ISourceCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Except<TObject, TKey>(IObservableList<IObservable<IChangeSet<TObject, TKey>>>)
Dynamically apply a logical Except operator between the collections Items from the first collection in the outer list are included unless contained in any of the other lists.
public static IObservable<IChangeSet<TObject, TKey>> Except<TObject, TKey>(this IObservableList<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Except<TObject, TKey>(ICollection<IObservable<IChangeSet<TObject, TKey>>>)
Dynamically apply a logical Except operator between the collections Items from the first collection in the outer list are included unless contained in any of the other lists.
public static IObservable<IChangeSet<TObject, TKey>> Except<TObject, TKey>(this ICollection<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesICollection<IObservable<IChangeSet<TObject, TKey>>>The sources.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.
Except<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, params IObservable<IChangeSet<TObject, TKey>>[])
Dynamically apply a logical Except operator between the collections Items from the first collection in the outer list are included unless contained in any of the other lists.
public static IObservable<IChangeSet<TObject, TKey>> Except<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, params IObservable<IChangeSet<TObject, TKey>>[] others) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
othersIObservable<IChangeSet<TObject, TKey>>[]The others.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.
ExpireAfter<TObject, TKey>(ISourceCache<TObject, TKey>, Func<TObject, TimeSpan?>, TimeSpan?, IScheduler?)
Automatically removes items from the cache after the time specified by the time selector elapses.
public static IObservable<IEnumerable<KeyValuePair<TKey, TObject>>> ExpireAfter<TObject, TKey>(this ISourceCache<TObject, TKey> source, Func<TObject, TimeSpan?> timeSelector, TimeSpan? pollingInterval = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The cache.
timeSelectorFunc<TObject, TimeSpan?>The time selector. Return null if the item should never be removed.
pollingIntervalTimeSpan?A polling interval. Since multiple timer subscriptions can be expensive, it may be worth setting the interval.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IEnumerable<KeyValuePair<TKey, TObject>>>
An observable of enumerable of the key values which has been removed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or timeSelector.
ExpireAfter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TimeSpan?>)
Automatically removes items from the stream after the time specified by the timeSelector elapses. Return null if the item should never be removed.
public static IObservable<IChangeSet<TObject, TKey>> ExpireAfter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TimeSpan?> timeSelector) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
timeSelectorFunc<TObject, TimeSpan?>The time selector.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or timeSelector.
ExpireAfter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TimeSpan?>, TimeSpan?)
Automatically removes items from the stream on the next poll after the time specified by the time selector elapses.
public static IObservable<IChangeSet<TObject, TKey>> ExpireAfter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TimeSpan?> timeSelector, TimeSpan? pollingInterval) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The cache.
timeSelectorFunc<TObject, TimeSpan?>The time selector. Return null if the item should never be removed.
pollingIntervalTimeSpan?The polling interval. if this value is specified, items are expired on an interval. This will result in a loss of accuracy of the time which the item is expired but is less computationally expensive.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable of enumerable of the key values which has been removed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or timeSelector.
ExpireAfter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TimeSpan?>, TimeSpan?, IScheduler)
Automatically removes items from the stream on the next poll after the time specified by the time selector elapses.
public static IObservable<IChangeSet<TObject, TKey>> ExpireAfter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TimeSpan?> timeSelector, TimeSpan? pollingInterval, IScheduler scheduler) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The cache.
timeSelectorFunc<TObject, TimeSpan?>The time selector. Return null if the item should never be removed.
pollingIntervalTimeSpan?The polling interval. if this value is specified, items are expired on an interval. This will result in a loss of accuracy of the time which the item is expired but is less computationally expensive.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable of enumerable of the key values which has been removed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or timeSelector.
ExpireAfter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TimeSpan?>, IScheduler)
Automatically removes items from the stream after the time specified by the timeSelector elapses. Return null if the item should never be removed.
public static IObservable<IChangeSet<TObject, TKey>> ExpireAfter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TimeSpan?> timeSelector, IScheduler scheduler) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
timeSelectorFunc<TObject, TimeSpan?>The time selector.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or timeSelector.
FilterImmutable<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, bool>, bool)
Creates a filtered stream, optimized for stateless/deterministic filtering of immutable items.
public static IObservable<IChangeSet<TObject, TKey>> FilterImmutable<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, bool> predicate, bool suppressEmptyChangeSets = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source stream of collection items to be filtered.
predicateFunc<TObject, bool>The filtering predicate to be applied to each item.
suppressEmptyChangeSetsboolA flag indicating whether the created stream should emit empty changesets. Empty changesets are suppressed by default, for performance. Set to ensure that a downstream changeset occurs for every upstream changeset.
Returns
- IObservable<IChangeSet<TObject, TKey>>
A stream of collection changesets where upstream collection items are filtered by the given predicate.
Type Parameters
TObjectThe type of collection items to be filtered.
TKeyThe type of the key values of each collection item.
Remarks
The goal of this operator is to optimize a common use-case of reactive programming, where data values flowing through a stream are immutable, and state changes are distributed by publishing new immutable items as replacements, instead of mutating the items directly.
In addition to assuming that all collection items are immutable, this operator also assumes that the given filter predicate is deterministic, such that the result it returns will always be the same each time a specific input is passed to it. In other words, the predicate itself also contains no mutable state.
Under these assumptions, this operator can bypass the need to keep track of every collection item that passes through it, which the normal Filter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, bool>, bool) operator must do, in order to re-evaluate the filtering status of items, during a refresh operation.
Consider using this operator when the following are true:
- Your collection items are immutable, and changes are published by replacing entire items
- Your filtering logic does not change over the lifetime of the stream, only the items do
- Your filtering predicate runs quickly, and does not heavily allocate memory
Note that, because filtering is purely deterministic, Refresh operations are transparently ignored by this operator.
FilterOnObservable<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<bool>>, TimeSpan?, IScheduler?)
Filters the stream of changes according to an Observable bool that is created for each item using the specified factory function.
public static IObservable<IChangeSet<TObject, TKey>> FilterOnObservable<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<bool>> filterFactory, TimeSpan? buffer = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
filterFactoryFunc<TObject, IObservable<bool>>Factory function used to create the observable bool that controls whether that given item passes the filter or not.
bufferTimeSpan?Optional time to buffer changes from the observable bools.
schedulerISchedulerOptional scheduler to use when buffering the changes.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable changeset that only contains items whose corresponding observable bool has emitted true as its most recent value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
One of the given parameters was null.
FilterOnObservable<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<bool>>, TimeSpan?, IScheduler?)
Filters the stream of changes according to an Observable bool that is created for each item using the specified factory function.
public static IObservable<IChangeSet<TObject, TKey>> FilterOnObservable<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<bool>> filterFactory, TimeSpan? buffer = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
filterFactoryFunc<TObject, TKey, IObservable<bool>>Factory function used to create the observable bool that controls whether that given item passes the filter or not.
bufferTimeSpan?Optional time to buffer changes from the observable bools.
schedulerISchedulerOptional scheduler to use when buffering the changes.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable changeset that only contains items whose corresponding observable bool has emitted true as its most recent value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
One of the given parameters was null.
Filter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, bool>, bool)
Filters the specified source.
public static IObservable<IChangeSet<TObject, TKey>> Filter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, bool> filter, bool suppressEmptyChangeSets = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
filterFunc<TObject, bool>The filter.
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<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Filter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<Func<TObject, bool>>, bool)
Creates a filtered stream which can be dynamically filtered.
public static IObservable<IChangeSet<TObject, TKey>> Filter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<Func<TObject, bool>> predicateChanged, bool suppressEmptyChangeSets = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
predicateChangedIObservable<Func<TObject, bool>>Observable to change the underlying predicate.
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<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Filter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<Func<TObject, bool>>, IObservable<Unit>, bool)
Creates a filtered stream which can be dynamically filtered.
public static IObservable<IChangeSet<TObject, TKey>> Filter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<Func<TObject, bool>> predicateChanged, IObservable<Unit> reapplyFilter, bool suppressEmptyChangeSets = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
predicateChangedIObservable<Func<TObject, bool>>Observable to change the underlying predicate.
reapplyFilterIObservable<Unit>Observable to re-evaluate whether the filter still matches items. Use when filtering on mutable values.
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<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Filter<TObject, TKey, TState>(IObservable<IChangeSet<TObject, TKey>>, IObservable<TState>, Func<TState, TObject, bool>, 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<TObject, TKey>> Filter<TObject, TKey, TState>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<TState> predicateState, Func<TState, TObject, bool> predicate, bool suppressEmptyChangeSets = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
predicateStateIObservable<TState>A stream of state values to be passed to
predicate.predicateFunc<TState, TObject, bool>A static predicate to be used to determine which items should be included or excluded by the filter.
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<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
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.
Exceptions
- ArgumentNullException
Throws for
source,predicateState, andpredicate.
FinallySafe<T>(IObservable<T>, Action)
Ensure that finally is always called. Thanks to Lee Campbell for this.
[Obsolete("This can cause unhandled exception issues so do not use")]
public static IObservable<T> FinallySafe<T>(this IObservable<T> source, Action finallyAction)
Parameters
sourceIObservable<T>The source.
finallyActionActionThe finally action.
Returns
- IObservable<T>
An observable which has always a finally action applied.
Type Parameters
TThe type contained within the observables.
Exceptions
- ArgumentNullException
source.
FlattenBufferResult<TObject, TKey>(IObservable<IList<IChangeSet<TObject, TKey>>>)
Convert the result of a buffer operation to a single change set.
public static IObservable<IChangeSet<TObject, TKey>> FlattenBufferResult<TObject, TKey>(this IObservable<IList<IChangeSet<TObject, TKey>>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IList<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Flatten<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Flattens an update collection to it's individual items.
public static IObservable<Change<TObject, TKey>> Flatten<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<Change<TObject, TKey>>
An observable which emits change set values on a flatten result.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
ForEachChange<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<Change<TObject, TKey>>)
Provides a call back for each change.
public static IObservable<IChangeSet<TObject, TKey>> ForEachChange<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<Change<TObject, TKey>> action) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
actionAction<Change<TObject, TKey>>The action.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will perform the action on each item.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
FullJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the resulting group to the left data source, matching these using the specified key selector. Results are included when the left or the right has a value. This is the equivalent of SQL full join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> FullJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
FullJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeftKey, Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the resulting group to the left data source, matching these using the specified key selector. Results are included when the left or the right has a value. This is the equivalent of SQL full join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> FullJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeftKey, Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
FullJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<Optional<TLeft>, Optional<TRight>, TDestination>)
Joins the left and right observable data sources, taking any left or right values and matching them, provided that the left or the right has a value. This is the equivalent of SQL full join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> FullJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<Optional<TLeft>, Optional<TRight>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<Optional<TLeft>, Optional<TRight>, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
FullJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeftKey, Optional<TLeft>, Optional<TRight>, TDestination>)
Joins the left and right observable data sources, taking any left or right values and matching them, provided that the left or the right has a value. This is the equivalent of SQL full join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> FullJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, Optional<TLeft>, Optional<TRight>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeftKey, Optional<TLeft>, Optional<TRight>, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
GroupOnObservable<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<TGroupKey>>)
Groups the source by the latest value from their observable created by the given factory.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> GroupOnObservable<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TGroupKey>> groupObservableSelector) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupObservableSelectorFunc<TObject, IObservable<TGroupKey>>The group selector key.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
GroupOnObservable<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<TGroupKey>>)
Groups the source by the latest value from their observable created by the given factory.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> GroupOnObservable<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<TGroupKey>> groupObservableSelector) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupObservableSelectorFunc<TObject, TKey, IObservable<TGroupKey>>The group selector key.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
GroupOnPropertyWithImmutableState<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Expression<Func<TObject, TGroupKey>>, TimeSpan?, IScheduler?)
Groups the source using the property specified by the property selector. Each update produces immutable grouping. 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<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>> GroupOnPropertyWithImmutableState<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Expression<Func<TObject, TGroupKey>> propertySelector, TimeSpan? propertyChangedThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
propertySelectorExpression<Func<TObject, TGroupKey>>The property selector used to group the items.
propertyChangedThrottleTimeSpan?A time span that indicates the throttle to wait for property change events.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit immutable group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
GroupOnProperty<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Expression<Func<TObject, TGroupKey>>, TimeSpan?, IScheduler?)
Groups the source using the property specified by the property selector. 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<IGroupChangeSet<TObject, TKey, TGroupKey>> GroupOnProperty<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Expression<Func<TObject, TGroupKey>> propertySelector, TimeSpan? propertyChangedThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
propertySelectorExpression<Func<TObject, TGroupKey>>The property selector used to group the items.
propertyChangedThrottleTimeSpan?A time span that indicates the throttle to wait for property change events.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit immutable group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
GroupWithImmutableState<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TGroupKey>, IObservable<Unit>?)
Groups the source on the value returned by group selector factory. Each update produces immutable grouping.
public static IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>> GroupWithImmutableState<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TGroupKey> groupSelectorKey, IObservable<Unit>? regrouper = null) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupSelectorKeyFunc<TObject, TGroupKey>The group selector key.
regrouperIObservable<Unit>Invoke to the for the grouping to be re-evaluated.
Returns
- IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit immutable group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
Exceptions
- ArgumentNullException
source or groupSelectorKey or groupController.
Group<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TGroupKey>)
Groups the source on the value returned by group selector factory.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> Group<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TGroupKey> groupSelectorKey) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupSelectorKeyFunc<TObject, TGroupKey>The group selector key.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
Group<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TGroupKey>, IObservable<IDistinctChangeSet<TGroupKey>>)
Groups the source on the value returned by group selector factory. A group is included for each item in the resulting group source.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> Group<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TGroupKey> groupSelector, IObservable<IDistinctChangeSet<TGroupKey>> resultGroupSource) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupSelectorFunc<TObject, TGroupKey>The group selector factory.
resultGroupSourceIObservable<IDistinctChangeSet<TGroupKey>>A distinct stream used to determine the result.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
Remarks
Useful for parent-child collection when the parent and child are soured from different streams.
Group<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TGroupKey>, IObservable<Unit>)
Groups the source on the value returned by group selector factory.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> Group<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TGroupKey> groupSelectorKey, IObservable<Unit> regrouper) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupSelectorKeyFunc<TObject, TGroupKey>The group selector key.
regrouperIObservable<Unit>Invoke to the for the grouping to be re-evaluated.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
Exceptions
- ArgumentNullException
source or groupSelectorKey or groupController.
Group<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<Func<TObject, TKey, TGroupKey>>, IObservable<Unit>?)
Groups the source on the value returned by the latest value from the group selector factory observable.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> Group<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<Func<TObject, TKey, TGroupKey>> groupSelectorKeyObservable, IObservable<Unit>? regrouper = null) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupSelectorKeyObservableIObservable<Func<TObject, TKey, TGroupKey>>The group selector key observable.
regrouperIObservable<Unit>Fires when the current Grouping Selector needs to re-evaluate all the items in the cache.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
Exceptions
- ArgumentNullException
source or groupSelectorKey or groupController.
Group<TObject, TKey, TGroupKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<Func<TObject, TGroupKey>>, IObservable<Unit>?)
Groups the source on the value returned by the latest value from the group selector factory observable.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> Group<TObject, TKey, TGroupKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<Func<TObject, TGroupKey>> groupSelectorKeyObservable, IObservable<Unit>? regrouper = null) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
groupSelectorKeyObservableIObservable<Func<TObject, TGroupKey>>The group selector key observable.
regrouperIObservable<Unit>Fires when the current Grouping Selector needs to re-evaluate all the items in the cache.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which will emit group change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TGroupKeyThe type of the group key.
Exceptions
- ArgumentNullException
source or groupSelectorKey or groupController.
IgnoreSameReferenceUpdate<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Ignores updates when the update is the same reference.
public static IObservable<IChangeSet<TObject, TKey>> IgnoreSameReferenceUpdate<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source observable which emits change sets.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets and ignores equal value changes.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
IgnoreUpdateWhen<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TObject, bool>)
Ignores the update when the condition is met. The first parameter in the ignore function is the current value and the second parameter is the previous value.
public static IObservable<IChangeSet<TObject, TKey>> IgnoreUpdateWhen<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TObject, bool> ignoreFunction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
ignoreFunctionFunc<TObject, TObject, bool>The ignore function (current,previous)=>{ return true to ignore }.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets and ignores updates equal to the lambda.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
IncludeUpdateWhen<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TObject, bool>)
Only includes the update when the condition is met. The first parameter in the ignore function is the current value and the second parameter is the previous value.
public static IObservable<IChangeSet<TObject, TKey>> IncludeUpdateWhen<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TObject, bool> includeFunction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
includeFunctionFunc<TObject, TObject, bool>The include function (current,previous)=>{ return true to include }.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets and ignores updates equal to the lambda.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the resulting group to the left data source, matching these using the specified key selector. Results are included when the left and right have matching values. This is the equivalent of SQL inner join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the resulting group to the left data source, matching these using the specified key selector. Results are included when the left and right have matching values. This is the equivalent of SQL inner join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
InnerJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<(TLeftKey leftKey, TRightKey rightKey), TLeft, TRight, TDestination>)
Groups the right data source and joins the to the left and the right sources, taking values when both left and right values are present This is the equivalent of SQL inner join.
public static IObservable<IChangeSet<TDestination, (TLeftKey leftKey, TRightKey rightKey)>> InnerJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<(TLeftKey leftKey, TRightKey rightKey), TLeft, TRight, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<(TLeftKey leftKey, TRightKey rightKey), TLeft, TRight, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, (TLeftKey leftKey, TRightKey rightKey)>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
InnerJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeft, TRight, TDestination>)
Joins the left and right observable data sources, taking values when both left and right values are present This is the equivalent of SQL inner join.
public static IObservable<IChangeSet<TDestination, (TLeftKey leftKey, TRightKey rightKey)>> InnerJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeft, TRight, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeft, TRight, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, (TLeftKey leftKey, TRightKey rightKey)>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
InvokeEvaluate<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Invokes Refresh method for an object which implements IEvaluateAware.
public static IObservable<IChangeSet<TObject, TKey>> InvokeEvaluate<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : IEvaluateAware where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
LeftJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the two sources matching them using the specified key selector, taking all left values and combining any matching right values. This is the equivalent of SQL left join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> LeftJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
LeftJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the two sources matching them using the specified key selector, taking all left values and combining any matching right values. This is the equivalent of SQL left join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> LeftJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
LeftJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeft, Optional<TRight>, TDestination>)
Joins the left and right observable data sources, taking all left values and combining any matching right values.
public static IObservable<IChangeSet<TDestination, TLeftKey>> LeftJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeft, Optional<TRight>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeft, Optional<TRight>, TDestination>The result selector.used to transform the combined data into. Example (left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
LeftJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeftKey, TLeft, Optional<TRight>, TDestination>)
Joins the left and right observable data sources, taking all left values and combining any matching right values.
public static IObservable<IChangeSet<TDestination, TLeftKey>> LeftJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, TLeft, Optional<TRight>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeftKey, TLeft, Optional<TRight>, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
LimitSizeTo<TObject, TKey>(ISourceCache<TObject, TKey>, int, IScheduler?)
Limits the number of records in the cache to the size specified. When the size is reached the oldest items are removed from the cache.
public static IObservable<IEnumerable<KeyValuePair<TKey, TObject>>> LimitSizeTo<TObject, TKey>(this ISourceCache<TObject, TKey> source, int sizeLimit, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
sizeLimitintThe size limit.
schedulerISchedulerThe scheduler.
Returns
- IObservable<IEnumerable<KeyValuePair<TKey, TObject>>>
An observable which emits the key value pairs.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
- ArgumentException
Size limit must be greater than zero.
LimitSizeTo<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, int)
Applies a size limiter to the number of records which can be included in the underlying cache. When the size limit is reached the oldest items are removed.
public static IObservable<IChangeSet<TObject, TKey>> LimitSizeTo<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, int size) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
sizeintThe size.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
- ArgumentException
size cannot be zero.
MergeChangeSets<TObject, TKey>(IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IComparer<TObject>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IEnumerable<IObservable<IChangeSet<TObject, TKey>>> source, IComparer<TObject> comparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IComparer<TObject>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IEnumerable<IObservable<IChangeSet<TObject, TKey>>> source, IEqualityComparer<TObject> equalityComparer, IComparer<TObject> comparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IEnumerable<IObservable<IChangeSet<TObject, TKey>>> source, IEqualityComparer<TObject> equalityComparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IEnumerable<IObservable<IChangeSet<TObject, TKey>>> source, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IComparer<TObject>, IScheduler?, bool)
Operator similar 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 that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IEnumerable<IObservable<IChangeSet<TObject, TKey>>> others, IComparer<TObject> comparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
othersIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Other Observable ChangeSets.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IComparer<TObject>, IScheduler?, bool)
Operator similar 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 that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IEnumerable<IObservable<IChangeSet<TObject, TKey>>> others, IEqualityComparer<TObject> equalityComparer, IComparer<TObject> comparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
othersIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Other Observable ChangeSets.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IScheduler?, bool)
Operator similar 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 that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IEnumerable<IObservable<IChangeSet<TObject, TKey>>> others, IEqualityComparer<TObject> equalityComparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
othersIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Other Observable ChangeSets.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IScheduler?, bool)
Operator similar 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 that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IEnumerable<IObservable<IChangeSet<TObject, TKey>>> others, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
othersIEnumerable<IObservable<IChangeSet<TObject, TKey>>>The Other Observable ChangeSets.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. Merges both observable changesets into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IChangeSet<TObject, TKey>> other, IComparer<TObject> comparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
otherIObservable<IChangeSet<TObject, TKey>>The Other Observable ChangeSet.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IChangeSet<TObject, TKey>>, IEqualityComparer<TObject>, IComparer<TObject>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. Merges both observable changesets into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IChangeSet<TObject, TKey>> other, IEqualityComparer<TObject> equalityComparer, IComparer<TObject> comparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
otherIObservable<IChangeSet<TObject, TKey>>The Other Observable ChangeSet.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IChangeSet<TObject, TKey>>, IEqualityComparer<TObject>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. Merges both observable changesets into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IChangeSet<TObject, TKey>> other, IEqualityComparer<TObject> equalityComparer, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
otherIObservable<IChangeSet<TObject, TKey>>The Other Observable ChangeSet.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IChangeSet<TObject, TKey>>, IScheduler?, bool)
Operator similar to Merge except it is ChangeSet aware. Merges both observable changesets into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IChangeSet<TObject, TKey>> other, IScheduler? scheduler = null, bool completable = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
otherIObservable<IChangeSet<TObject, TKey>>The Other Observable ChangeSet.
schedulerIScheduler(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.
completableboolWhether or not the result Observable should complete if all the changesets complete.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IObservable<IChangeSet<TObject, TKey>>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>, IComparer<TObject>)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IObservable<IChangeSet<TObject, TKey>>> source, IComparer<TObject> comparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IObservable<IChangeSet<TObject, TKey>>> source, IEqualityComparer<TObject> equalityComparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IComparer<TObject>)
Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys.
public static IObservable<IChangeSet<TObject, TKey>> MergeChangeSets<TObject, TKey>(this IObservable<IObservable<IChangeSet<TObject, TKey>>> source, IEqualityComparer<TObject> equalityComparer, IComparer<TObject> comparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IObservable<IChangeSet<TObject, TKey>>>The Source Observable ChangeSet.
equalityComparerIEqualityComparer<TObject>IEqualityComparer<T> instance to determine if two elements are the same.
comparerIComparer<TObject>IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.
Returns
- IObservable<IChangeSet<TObject, TKey>>
The result from merging the changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination>>>, IEqualityComparer<TDestination>?)
Merges the List ChangeSets derived from items in a Cache ChangeSet into a single observable list changeset.
public static IObservable<IChangeSet<TDestination>> MergeManyChangeSets<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<IChangeSet<TDestination>>> observableSelector, IEqualityComparer<TDestination>? equalityComparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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<IChangeSet<TDestination>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
MergeManyChangeSets<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination>>>, IEqualityComparer<TDestination>?)
Merges the List ChangeSets derived from items in a Cache ChangeSet into a single observable list changeset.
public static IObservable<IChangeSet<TDestination>> MergeManyChangeSets<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<IChangeSet<TDestination>>> observableSelector, IEqualityComparer<TDestination>? equalityComparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, TKey, 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<IChangeSet<TDestination>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, bool, IComparer<TDestination>)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, bool resortOnSourceRefresh, IComparer<TDestination> childComparer) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
resortOnSourceRefreshboolOptional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, bool, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, bool resortOnSourceRefresh, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? childComparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
resortOnSourceRefreshboolOptional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.
equalityComparerIEqualityComparer<TDestination>Optional IEqualityComparer<T> instance to determine if two elements are the same.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, IComparer<TDestination>)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, IComparer<TDestination> childComparer) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? childComparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
equalityComparerIEqualityComparer<TDestination>Optional IEqualityComparer<T> instance to determine if two elements are the same.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TDestination>)
Operator similar to MergeMany except it is 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, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TDestination> comparer) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Operator similar to MergeMany except it is 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, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, bool, IComparer<TDestination>)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, bool resortOnSourceRefresh, IComparer<TDestination> childComparer) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
resortOnSourceRefreshboolOptional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, bool, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, bool resortOnSourceRefresh, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? childComparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
resortOnSourceRefreshboolOptional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.
equalityComparerIEqualityComparer<TDestination>Optional IEqualityComparer<T> instance to determine if two elements are the same.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, IComparer<TDestination>)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, IComparer<TDestination> childComparer) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TObject>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Overload of MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) that will handle key collisions by using an IComparer<T> instance that operates on the sources, so that the values from the preferred source take precedent over other values with the same.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TObject> sourceComparer, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? childComparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>Factory Function used to create child changesets.
sourceComparerIComparer<TObject>IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.
equalityComparerIEqualityComparer<TDestination>Optional IEqualityComparer<T> instance to determine if two elements are the same.
childComparerIComparer<TDestination>Optional fallback IComparer<T> instance to determine which child element to emit if the sources compare to be the same.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IComparer<TDestination>)
Operator similar to MergeMany except it is 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, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IComparer<TDestination> comparer) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, TKey, 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<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyChangeSets<TObject, TKey, TDestination, TDestinationKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Operator similar to MergeMany except it is 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, TKey, TDestination, TDestinationKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>> observableSelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TObject : notnull where TKey : notnull where TDestination : notnull where TDestinationKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The Source Observable ChangeSet.
observableSelectorFunc<TObject, TKey, 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<IChangeSet<TDestination, TDestinationKey>>
The result from merging the child changesets together.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
Exceptions
- ArgumentNullException
Parameter was null.
MergeManyItems<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, 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<ItemWithValue<TObject, TDestination>> MergeManyItems<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TDestination>> observableSelector) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, IObservable<TDestination>>The observable selector.
Returns
- IObservable<ItemWithValue<TObject, TDestination>>
An observable which emits the item with the value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
Exceptions
- ArgumentNullException
source or observableSelector.
MergeManyItems<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, 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<ItemWithValue<TObject, TDestination>> MergeManyItems<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<TDestination>> observableSelector) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, TKey, IObservable<TDestination>>The observable selector.
Returns
- IObservable<ItemWithValue<TObject, TDestination>>
An observable which emits the item with the value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
Exceptions
- ArgumentNullException
source or observableSelector.
MergeMany<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, 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<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TDestination>> observableSelector) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, IObservable<TDestination>>The observable selector.
Returns
- IObservable<TDestination>
An observable which emits the transformed value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
Exceptions
- ArgumentNullException
source or observableSelector.
MergeMany<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, 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<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IObservable<TDestination>> observableSelector) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, TKey, IObservable<TDestination>>The observable selector.
Returns
- IObservable<TDestination>
An observable which emits the transformed value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
Exceptions
- ArgumentNullException
source or observableSelector.
MonitorStatus<T>(IObservable<T>)
Monitors the status of a stream.
public static IObservable<ConnectionStatus> MonitorStatus<T>(this IObservable<T> source)
Parameters
sourceIObservable<T>The source.
Returns
- IObservable<ConnectionStatus>
An observable which monitors the status of the observable.
Type Parameters
TThe type of the source observable.
Exceptions
- ArgumentNullException
source.
NotEmpty<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Suppresses updates which are empty.
public static IObservable<IChangeSet<TObject, TKey>> NotEmpty<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change set values when not empty.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
OfType<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, bool)
Filters an observable changeset so that it only includes items that are of type TDestination.
public static IObservable<IChangeSet<TDestination, TKey>> OfType<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, bool suppressEmptyChangeSets = true) where TObject : notnull where TKey : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source observable changeset of
TObjectinstances.suppressEmptyChangeSetsboolIndicates whether or not to suppress changesets that end up being empty after the conversion.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
An observable changeset of
TDestinationwhere each item was either converted fromsourceor filtered out.
Type Parameters
TObjectThe type of the objects in the source changeset.
TKeyThe type of the key.
TDestinationThe type of the objects that are allowed to pass the filter.
Remarks
Combines a filter and a transform into a single step that does not use an intermediate cache.
Exceptions
- ArgumentNullException
source.
OnItemAdded<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TKey>)
Callback for each item as and when it is being added to the stream.
public static IObservable<IChangeSet<TObject, TKey>> OnItemAdded<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject, TKey> addAction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
addActionAction<TObject, TKey>The add action that takes the new value and the associated key.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being added.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
OnItemAdded<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject>)
Callback for each item as and when it is being added to the stream.
public static IObservable<IChangeSet<TObject, TKey>> OnItemAdded<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject> addAction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
addActionAction<TObject>The add action that takes the new value.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being added.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Remarks
Overload for OnItemAdded<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TKey>) with a callback that doesn't use a key.
OnItemRefreshed<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TKey>)
Callback for each item as and when it is being refreshed in the stream.
public static IObservable<IChangeSet<TObject, TKey>> OnItemRefreshed<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject, TKey> refreshAction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
refreshActionAction<TObject, TKey>The refresh action that takes the refreshed value and the key.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being added.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
OnItemRefreshed<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject>)
Callback for each item as and when it is being refreshed in the stream.
public static IObservable<IChangeSet<TObject, TKey>> OnItemRefreshed<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject> refreshAction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
refreshActionAction<TObject>The refresh action that takes the refreshed value.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being added.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Remarks
Overload for OnItemRefreshed<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TKey>) with a callback that doesn't use a key.
OnItemRemoved<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TKey>, bool)
Callback for each item/key as and when it is being removed from the stream.
public static IObservable<IChangeSet<TObject, TKey>> OnItemRemoved<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject, TKey> removeAction, bool invokeOnUnsubscribe = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
removeActionAction<TObject, TKey>The remove action that takes the removed value and the key.
invokeOnUnsubscribeboolShould the remove action be invoked when the subscription is disposed.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being removed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or removeAction.
OnItemRemoved<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject>, bool)
Callback for each item as and when it is being removed from the stream.
public static IObservable<IChangeSet<TObject, TKey>> OnItemRemoved<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject> removeAction, bool invokeOnUnsubscribe = true) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
removeActionAction<TObject>The remove action that takes the removed value.
invokeOnUnsubscribeboolShould the remove action be invoked when the subscription is disposed.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being removed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Remarks
Overload for OnItemRemoved<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TKey>, bool) with a callback that doesn't use the key.
Exceptions
- ArgumentNullException
source or removeAction.
OnItemUpdated<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TObject, TKey>)
Callback when an item has been updated eg. (current, previous)=>{}.
public static IObservable<IChangeSet<TObject, TKey>> OnItemUpdated<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject, TObject, TKey> updateAction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
updateActionAction<TObject, TObject, TKey>The update action that takes current value, previous value, and the key.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being updated.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
OnItemUpdated<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TObject>)
Callback when an item has been updated eg. (current, previous)=>{}.
public static IObservable<IChangeSet<TObject, TKey>> OnItemUpdated<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Action<TObject, TObject> updateAction) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
updateActionAction<TObject, TObject>The update action that takes the current value and previous value.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items being updated.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Remarks
Overload for OnItemUpdated<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Action<TObject, TObject, TKey>) with a callback that doesn't use the key.
Or<TObject, TKey>(IObservableList<IObservableCache<TObject, TKey>>)
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<TObject, TKey>> Or<TObject, TKey>(this IObservableList<IObservableCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservableCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Or<TObject, TKey>(IObservableList<ISourceCache<TObject, TKey>>)
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<TObject, TKey>> Or<TObject, TKey>(this IObservableList<ISourceCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<ISourceCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Or<TObject, TKey>(IObservableList<IObservable<IChangeSet<TObject, TKey>>>)
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<TObject, TKey>> Or<TObject, TKey>(this IObservableList<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Or<TObject, TKey>(ICollection<IObservable<IChangeSet<TObject, TKey>>>)
Apply a logical Or operator between the collections i.e items which are in any of the sources are included.
public static IObservable<IChangeSet<TObject, TKey>> Or<TObject, TKey>(this ICollection<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesICollection<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.
Or<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, params IObservable<IChangeSet<TObject, TKey>>[])
Apply a logical Or operator between the collections i.e items which are in any of the sources are included.
public static IObservable<IChangeSet<TObject, TKey>> Or<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, params IObservable<IChangeSet<TObject, TKey>>[] others) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
othersIObservable<IChangeSet<TObject, TKey>>[]The others.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.
Page<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, IObservable<IPageRequest>)
Returns the page as specified by the pageRequests observable.
[Obsolete("Use SortAndPage as it's more efficient")]
public static IObservable<IPagedChangeSet<TObject, TKey>> Page<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, IObservable<IPageRequest> pageRequests) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
pageRequestsIObservable<IPageRequest>The page requests.
Returns
- IObservable<IPagedChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
PopulateFrom<TObject, TKey>(ISourceCache<TObject, TKey>, IObservable<IEnumerable<TObject>>)
Populate a cache from an observable stream.
public static IDisposable PopulateFrom<TObject, TKey>(this ISourceCache<TObject, TKey> source, IObservable<IEnumerable<TObject>> observable) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
observableIObservable<IEnumerable<TObject>>The observable.
Returns
- IDisposable
A disposable which will unsubscribe from the source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or keySelector.
PopulateFrom<TObject, TKey>(ISourceCache<TObject, TKey>, IObservable<TObject>)
Populate a cache from an observable stream.
public static IDisposable PopulateFrom<TObject, TKey>(this ISourceCache<TObject, TKey> source, IObservable<TObject> observable) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
observableIObservable<TObject>The observable.
Returns
- IDisposable
A disposable which will unsubscribe from the source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or keySelector.
PopulateInto<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, LockFreeObservableCache<TObject, TKey>)
Populates a source into the specified cache.
public static IDisposable PopulateInto<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, LockFreeObservableCache<TObject, TKey> destination) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
destinationLockFreeObservableCache<TObject, TKey>The destination.
Returns
- IDisposable
A disposable which will unsubscribe from the source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
PopulateInto<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IIntermediateCache<TObject, TKey>)
Populates a source into the specified cache.
public static IDisposable PopulateInto<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IIntermediateCache<TObject, TKey> destination) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
destinationIIntermediateCache<TObject, TKey>The destination.
Returns
- IDisposable
A disposable which will unsubscribe from the source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or destination.
PopulateInto<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, ISourceCache<TObject, TKey>)
Populates a source into the specified cache.
public static IDisposable PopulateInto<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, ISourceCache<TObject, TKey> destination) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
destinationISourceCache<TObject, TKey>The destination.
Returns
- IDisposable
A disposable which will unsubscribe from the source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or destination.
QueryWhenChanged<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
The latest copy of the cache is exposed for querying i) after each modification to the underlying data ii) upon subscription.
public static IObservable<IQuery<TObject, TKey>> QueryWhenChanged<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IQuery<TObject, TKey>>
An observable which emits the query.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
QueryWhenChanged<TObject, TKey, TDestination>(IObservable<IChangeSet<TObject, TKey>>, Func<IQuery<TObject, TKey>, TDestination>)
The latest copy of the cache is exposed for querying after each modification to the underlying data.
public static IObservable<TDestination> QueryWhenChanged<TObject, TKey, TDestination>(this IObservable<IChangeSet<TObject, TKey>> source, Func<IQuery<TObject, TKey>, TDestination> resultSelector) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
resultSelectorFunc<IQuery<TObject, TKey>, TDestination>The result selector.
Returns
- IObservable<TDestination>
An observable which emits the destination values.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TDestinationThe type of the destination.
Exceptions
- ArgumentNullException
source or resultSelector.
QueryWhenChanged<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<TValue>>)
The latest copy of the cache is exposed for querying i) after each modification to the underlying data ii) on subscription.
public static IObservable<IQuery<TObject, TKey>> QueryWhenChanged<TObject, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TValue>> itemChangedTrigger) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
itemChangedTriggerFunc<TObject, IObservable<TValue>>Should the query be triggered for observables on individual items.
Returns
- IObservable<IQuery<TObject, TKey>>
An observable that emits the query.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TValueThe type of the value.
Exceptions
- ArgumentNullException
source.
RefCount<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Cache equivalent to Publish().RefCount(). The source is cached so long as there is at least 1 subscriber.
public static IObservable<IChangeSet<TObject, TKey>> RefCount<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets that are ref counted.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the destination key.
Refresh<TObject, TKey>(ISourceCache<TObject, TKey>)
Signal observers to re-evaluate the all items.
public static void Refresh<TObject, TKey>(this ISourceCache<TObject, TKey> source) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Refresh<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>)
Signal observers to re-evaluate the specified items.
public static void Refresh<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> items) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemsIEnumerable<TObject>The items.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Refresh<TObject, TKey>(ISourceCache<TObject, TKey>, TObject)
Signal observers to re-evaluate the specified item.
public static void Refresh<TObject, TKey>(this ISourceCache<TObject, TKey> source, TObject item) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemTObjectThe item.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
RemoveKey<TObject, TKey>(ISourceCache<TObject, TKey>, TKey)
Removes the specified key from the cache. If the item is not contained in the cache then the operation does nothing.
public static void RemoveKey<TObject, TKey>(this ISourceCache<TObject, TKey> source, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
keyTKeyThe key.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
RemoveKey<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Removes the key which enables all observable list features of dynamic data.
public static IObservable<IChangeSet<TObject>> RemoveKey<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject>>
An observable which emits change sets.
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.
RemoveKeys<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TKey>)
Removes the specified keys from the cache. Any keys not contained in the cache are ignored.
public static void RemoveKeys<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TKey> keys) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
keysIEnumerable<TKey>The keys.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Remove<TObject, TKey>(IIntermediateCache<TObject, TKey>, IEnumerable<TKey>)
Removes the specified keys from the cache.
Any keys not contained in the cache are ignored.
public static void Remove<TObject, TKey>(this IIntermediateCache<TObject, TKey> source, IEnumerable<TKey> keys) where TObject : notnull where TKey : notnull
Parameters
sourceIIntermediateCache<TObject, TKey>The source.
keysIEnumerable<TKey>The keys.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Remove<TObject, TKey>(IIntermediateCache<TObject, TKey>, TKey)
Removes the specified key from the cache. If the item is not contained in the cache then the operation does nothing.
public static void Remove<TObject, TKey>(this IIntermediateCache<TObject, TKey> source, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceIIntermediateCache<TObject, TKey>The source.
keyTKeyThe key.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Remove<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>)
Removes the specified items from the cache.
Any items not contained in the cache are ignored.
public static void Remove<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> items) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemsIEnumerable<TObject>The items.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Remove<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TKey>)
Removes the specified keys from the cache.
Any keys not contained in the cache are ignored.
public static void Remove<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TKey> keys) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
keysIEnumerable<TKey>The keys.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Remove<TObject, TKey>(ISourceCache<TObject, TKey>, TObject)
Removes the specified item from the cache.
If the item is not contained in the cache then the operation does nothing.
public static void Remove<TObject, TKey>(this ISourceCache<TObject, TKey> source, TObject item) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
itemTObjectThe item.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Remove<TObject, TKey>(ISourceCache<TObject, TKey>, TKey)
Removes the specified key from the cache. If the item is not contained in the cache then the operation does nothing.
public static void Remove<TObject, TKey>(this ISourceCache<TObject, TKey> source, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceISourceCache<TObject, TKey>The source.
keyTKeyThe key.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
RightJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the two sources matching them using the specified key selector, , taking all right values and combining any matching left values. This is the equivalent of SQL left join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> RightJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
RightJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TLeftKey, Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>)
Groups the right data source and joins the two sources matching them using the specified key selector,, taking all right values and combining any matching left values. This is the equivalent of SQL left join.
public static IObservable<IChangeSet<TDestination, TLeftKey>> RightJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TLeftKey, Optional<TLeft>, IGrouping<TRight, TRightKey, TLeftKey>, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TLeftKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
RightJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<Optional<TLeft>, TRight, TDestination>)
Joins the left and right observable data sources, taking all right values and combining any matching left values.
public static IObservable<IChangeSet<TDestination, TRightKey>> RightJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<Optional<TLeft>, TRight, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<Optional<TLeft>, TRight, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TRightKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
RightJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(IObservable<IChangeSet<TLeft, TLeftKey>>, IObservable<IChangeSet<TRight, TRightKey>>, Func<TRight, TLeftKey>, Func<TRightKey, Optional<TLeft>, TRight, TDestination>)
Joins the left and right observable data sources, taking all right values and combining any matching left values.
public static IObservable<IChangeSet<TDestination, TRightKey>> RightJoin<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TRightKey, Optional<TLeft>, TRight, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
Parameters
leftIObservable<IChangeSet<TLeft, TLeftKey>>The left data source.
rightIObservable<IChangeSet<TRight, TRightKey>>The right data source.
rightKeySelectorFunc<TRight, TLeftKey>Specify the foreign key on the right data source.
resultSelectorFunc<TRightKey, Optional<TLeft>, TRight, TDestination>The result selector.used to transform the combined data into. Example (key, left, right) => new CustomObject(key, left, right).
Returns
- IObservable<IChangeSet<TDestination, TRightKey>>
An observable which will emit change sets.
Type Parameters
TLeftThe object type of the left data source.
TLeftKeyThe key type of the left data source.
TRightThe object type of the right data source.
TRightKeyThe key type of the right data source.
TDestinationThe resulting object which.
SkipInitial<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Defer the subscription until loaded and skip initial change set.
public static IObservable<IChangeSet<TObject, TKey>> SkipInitial<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IList<TObject>)
Bind sorted data to the specified collection, for an object which implements IComparableTObject>.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IList<TObject> targetList) where TObject : notnull, IComparable<TObject> where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
targetListIList<TObject>The list to bind to.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IList<TObject>, SortAndBindOptions)
Bind sorted data to the specified collection, for an object which implements IComparableTObject>.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IList<TObject> targetList, SortAndBindOptions options) where TObject : notnull, IComparable<TObject> where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
targetListIList<TObject>The list to bind to.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IList<TObject>, IComparer<TObject>)
Bind sorted data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IList<TObject> targetList, IComparer<TObject> comparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
targetListIList<TObject>The list to bind to.
comparerIComparer<TObject>The comparer to order the resulting dataset.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IList<TObject>, IComparer<TObject>, SortAndBindOptions)
Bind sorted data to the specified collection.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IList<TObject> targetList, IComparer<TObject> comparer, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
targetListIList<TObject>The list to bind to.
comparerIComparer<TObject>The comparer to order the resulting dataset.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IList<TObject>, IObservable<IComparer<TObject>>)
Bind sorted data to the specified collection, using an observable of comparers to switch sort order.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IList<TObject> targetList, IObservable<IComparer<TObject>> comparerChanged) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
targetListIList<TObject>The list to bind to.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IList<TObject>, IObservable<IComparer<TObject>>, SortAndBindOptions)
Bind sorted data to the specified collection, using an observable of comparers to switch sort order.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IList<TObject> targetList, IObservable<IComparer<TObject>> comparerChanged, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
targetListIList<TObject>The list to bind to.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>)
Bind sorted data to the specified readonly observable collection for an object which implements IComparableTObject>.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection) where TObject : notnull, IComparable<TObject> where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, SortAndBindOptions)
Bind sorted data to the specified readonly observable collection for an object which implements IComparableTObject>.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, SortAndBindOptions options) where TObject : notnull, IComparable<TObject> where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, IComparer<TObject>)
Bind sorted data to the specified readonly observable collection.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, IComparer<TObject> comparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
comparerIComparer<TObject>The comparer to order the resulting dataset.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, IComparer<TObject>, SortAndBindOptions)
Bind sorted data to the specified readonly observable collection.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, IComparer<TObject> comparer, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
comparerIComparer<TObject>The comparer to order the resulting dataset.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, IObservable<IComparer<TObject>>)
Bind sorted data to the specified readonly observable collection, using an observable of comparers to switch sort order.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, IObservable<IComparer<TObject>> comparerChanged) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndBind<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, out ReadOnlyObservableCollection<TObject>, IObservable<IComparer<TObject>>, SortAndBindOptions)
Bind sorted data to the specified readonly observable collection, using an observable of comparers to switch sort order.
public static IObservable<IChangeSet<TObject, TKey>> SortAndBind<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, out ReadOnlyObservableCollection<TObject> readOnlyObservableCollection, IObservable<IComparer<TObject>> comparerChanged, SortAndBindOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
readOnlyObservableCollectionReadOnlyObservableCollection<TObject>The resulting read only observable collection.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
optionsSortAndBindOptionsBind and sort default options.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SortAndPage<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, IObservable<IPageRequest>)
Sort and page the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> SortAndPage<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, IObservable<IPageRequest> pageRequests) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The comparer to order the resulting dataset.
pageRequestsIObservable<IPageRequest>The virtualizing requests.
Returns
- IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndPage<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, IObservable<IPageRequest>, SortAndPageOptions)
Sort and page the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> SortAndPage<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, IObservable<IPageRequest> pageRequests, SortAndPageOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The comparer to order the resulting dataset.
pageRequestsIObservable<IPageRequest>The virtualizing requests.
optionsSortAndPageOptionsAddition optimization options for virtualization.
Returns
- IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndPage<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IComparer<TObject>>, IObservable<IPageRequest>)
Sort and page the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> SortAndPage<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IComparer<TObject>> comparerChanged, IObservable<IPageRequest> pageRequests) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
pageRequestsIObservable<IPageRequest>The virtualizing requests.
Returns
- IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndPage<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IComparer<TObject>>, IObservable<IPageRequest>, SortAndPageOptions)
Sort and page the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>> SortAndPage<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IComparer<TObject>> comparerChanged, IObservable<IPageRequest> pageRequests, SortAndPageOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
pageRequestsIObservable<IPageRequest>The virtualizing requests.
optionsSortAndPageOptionsAddition optimization options for virtualization.
Returns
- IObservable<IChangeSet<TObject, TKey, PageContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndVirtualize<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, IObservable<IVirtualRequest>)
Sort and virtualize the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> SortAndVirtualize<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, IObservable<IVirtualRequest> virtualRequests) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The comparer to order the resulting dataset.
virtualRequestsIObservable<IVirtualRequest>The virtualizing requests.
Returns
- IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndVirtualize<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, IObservable<IVirtualRequest>, SortAndVirtualizeOptions)
Sort and virtualize the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> SortAndVirtualize<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, IObservable<IVirtualRequest> virtualRequests, SortAndVirtualizeOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The comparer to order the resulting dataset.
virtualRequestsIObservable<IVirtualRequest>The virtualizing requests.
optionsSortAndVirtualizeOptionsAddition optimization options for virtualization.
Returns
- IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndVirtualize<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IComparer<TObject>>, IObservable<IVirtualRequest>)
Sort and virtualize the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> SortAndVirtualize<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IComparer<TObject>> comparerChanged, IObservable<IVirtualRequest> virtualRequests) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
virtualRequestsIObservable<IVirtualRequest>The virtualizing requests.
Returns
- IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortAndVirtualize<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IComparer<TObject>>, IObservable<IVirtualRequest>, SortAndVirtualizeOptions)
Sort and virtualize the underlying data from the specified source.
public static IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> SortAndVirtualize<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IComparer<TObject>> comparerChanged, IObservable<IVirtualRequest> virtualRequests, SortAndVirtualizeOptions options) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerChangedIObservable<IComparer<TObject>>An observable of comparers which enables the sort order to be changed.
virtualRequestsIObservable<IVirtualRequest>The virtualizing requests.
optionsSortAndVirtualizeOptionsAddition optimization options for virtualization.
Returns
- IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
SortBy<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IComparable>, SortDirection, SortOptimisations, int)
Sorts a sequence by selected property.
public static IObservable<ISortedChangeSet<TObject, TKey>> SortBy<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IComparable> expression, SortDirection sortOrder = SortDirection.Ascending, SortOptimisations sortOptimisations = SortOptimisations.None, int resetThreshold = 100) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
expressionFunc<TObject, IComparable>The expression.
sortOrderSortDirectionThe sort order. Defaults to ascending.
sortOptimisationsSortOptimisationsThe sort optimisations.
resetThresholdintThe reset threshold.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Sort<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, SortOptimisations, int)
Sorts using the specified comparer. Returns the underlying ChangeSet as per the system conventions. The resulting change set also exposes a sorted key value collection of the underlying cached data.
[Obsolete("Use SortAndBind as it's more efficient")]
public static IObservable<ISortedChangeSet<TObject, TKey>> Sort<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, SortOptimisations sortOptimisations = SortOptimisations.None, int resetThreshold = 100) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The comparer.
sortOptimisationsSortOptimisationsSort optimisation flags. Specify one or more sort optimisations.
resetThresholdintThe number of updates before the entire list is resorted (rather than inline sort).
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or comparer.
Sort<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, IObservable<Unit>, SortOptimisations, int)
Sorts a sequence as, using the comparer observable to determine order.
[Obsolete("Use SortAndBind as it's more efficient")]
public static IObservable<ISortedChangeSet<TObject, TKey>> Sort<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, IObservable<Unit> resorter, SortOptimisations sortOptimisations = SortOptimisations.None, int resetThreshold = 100) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The comparer to sort on.
resorterIObservable<Unit>Signal to instruct the algorithm to re-sort the entire data set.
sortOptimisationsSortOptimisationsThe sort optimisations.
resetThresholdintThe reset threshold.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Sort<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IComparer<TObject>>, SortOptimisations, int)
Sorts a sequence as, using the comparer observable to determine order.
[Obsolete("Use SortAndBind as it's more efficient")]
public static IObservable<ISortedChangeSet<TObject, TKey>> Sort<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IComparer<TObject>> comparerObservable, SortOptimisations sortOptimisations = SortOptimisations.None, int resetThreshold = 100) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerObservableIObservable<IComparer<TObject>>The comparer observable.
sortOptimisationsSortOptimisationsThe sort optimisations.
resetThresholdintThe reset threshold.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Sort<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IComparer<TObject>>, IObservable<Unit>, SortOptimisations, int)
Sorts a sequence as, using the comparer observable to determine order.
[Obsolete("Use SortAndBind as it's more efficient")]
public static IObservable<ISortedChangeSet<TObject, TKey>> Sort<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<IComparer<TObject>> comparerObservable, IObservable<Unit> resorter, SortOptimisations sortOptimisations = SortOptimisations.None, int resetThreshold = 100) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerObservableIObservable<IComparer<TObject>>The comparer observable.
resorterIObservable<Unit>Signal to instruct the algorithm to re-sort the entire data set.
sortOptimisationsSortOptimisationsThe sort optimisations.
resetThresholdintThe reset threshold.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
StartWithEmpty<T>(IObservable<IReadOnlyCollection<T>>)
Prepends an empty change set to the source.
public static IObservable<IReadOnlyCollection<T>> StartWithEmpty<T>(this IObservable<IReadOnlyCollection<T>> source)
Parameters
sourceIObservable<IReadOnlyCollection<T>>The source read only collection.
Returns
- IObservable<IReadOnlyCollection<T>>
A read only collection.
Type Parameters
TThe type of the item.
StartWithEmpty<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Prepends an empty change set to the source.
public static IObservable<IChangeSet<TObject, TKey>> StartWithEmpty<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source observable change set.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
StartWithEmpty<TObject, TKey>(IObservable<IPagedChangeSet<TObject, TKey>>)
Prepends an empty change set to the source.
public static IObservable<IPagedChangeSet<TObject, TKey>> StartWithEmpty<TObject, TKey>(this IObservable<IPagedChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IPagedChangeSet<TObject, TKey>>The source observable change set.
Returns
- IObservable<IPagedChangeSet<TObject, TKey>>
An observable which emits paged change sets.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
StartWithEmpty<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>)
Prepends an empty change set to the source.
public static IObservable<ISortedChangeSet<TObject, TKey>> StartWithEmpty<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source observable change set.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which emits sorted change sets.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
StartWithEmpty<TObject, TKey>(IObservable<IVirtualChangeSet<TObject, TKey>>)
Prepends an empty change set to the source.
public static IObservable<IVirtualChangeSet<TObject, TKey>> StartWithEmpty<TObject, TKey>(this IObservable<IVirtualChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IVirtualChangeSet<TObject, TKey>>The source observable change set.
Returns
- IObservable<IVirtualChangeSet<TObject, TKey>>
An observable which emits virtual change sets.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
StartWithEmpty<TObject, TKey, TGroupKey>(IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>)
Prepends an empty change set to the source.
public static IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> StartWithEmpty<TObject, TKey, TGroupKey>(this IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>> source) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>The source observable change set.
Returns
- IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which emits group change sets.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
TGroupKeyThe grouping key type.
StartWithEmpty<TObject, TKey, TGroupKey>(IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>>)
Prepends an empty change set to the source.
public static IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>> StartWithEmpty<TObject, TKey, TGroupKey>(this IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>> source) where TObject : notnull where TKey : notnull where TGroupKey : notnull
Parameters
sourceIObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>>The source observable change set.
Returns
- IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>>
An observable which emits immutable group change sets.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
TGroupKeyThe grouping key type.
StartWithItem<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TObject)
The equivalent of rx StartsWith operator, but wraps the item in a change where reason is ChangeReason.Add.
public static IObservable<IChangeSet<TObject, TKey>> StartWithItem<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TObject item) where TObject : IKey<TKey> where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
itemTObjectThe item.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
StartWithItem<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TObject, TKey)
The equivalent of rx StartWith operator, but wraps the item in a change where reason is ChangeReason.Add.
public static IObservable<IChangeSet<TObject, TKey>> StartWithItem<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TObject item, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
itemTObjectThe item.
keyTKeyThe key.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
SubscribeMany<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IDisposable>)
Subscribes to each item when it is added to the stream and un-subscribes when it is removed. All items will be unsubscribed when the stream is disposed.
public static IObservable<IChangeSet<TObject, TKey>> SubscribeMany<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IDisposable> subscriptionFactory) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
subscriptionFactoryFunc<TObject, IDisposable>The subscription function.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Remarks
Subscribes to each item when it is added or updates and un-subscribes when it is removed.
Exceptions
- ArgumentNullException
source or subscriptionFactory.
SubscribeMany<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, 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<TObject, TKey>> SubscribeMany<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IDisposable> subscriptionFactory) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
subscriptionFactoryFunc<TObject, TKey, IDisposable>The subscription function.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Remarks
Subscribes to each item when it is added or updates and unsubscribes when it is removed.
Exceptions
- ArgumentNullException
source or subscriptionFactory.
SuppressRefresh<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
Suppress refresh notifications.
public static IObservable<IChangeSet<TObject, TKey>> SuppressRefresh<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source observable change set.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits change sets.
Type Parameters
TObjectThe object of the change set.
TKeyThe key of the change set.
Switch<TObject, TKey>(IObservable<IObservableCache<TObject, TKey>>)
Transforms an observable sequence of observable caches 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<TObject, TKey>> Switch<TObject, TKey>(this IObservable<IObservableCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservable<IObservableCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
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
TObjectThe type of the object.
TKeyThe type of the key.
Switch<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>)
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<TObject, TKey>> Switch<TObject, TKey>(this IObservable<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservable<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
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
TObjectThe type of the object.
TKeyThe type of the key.
ToCollection<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>)
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, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
Returns
- IObservable<IReadOnlyCollection<TObject>>
An observable which emits the read only collection.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
ToObservableChangeSet<TObject, TKey>(IObservable<IEnumerable<TObject>>, Func<TObject, TKey>, Func<TObject, TimeSpan?>?, int, IScheduler?)
Converts the observable to an observable change set. Change set observes observable change events.
public static IObservable<IChangeSet<TObject, TKey>> ToObservableChangeSet<TObject, TKey>(this IObservable<IEnumerable<TObject>> source, Func<TObject, TKey> keySelector, Func<TObject, TimeSpan?>? expireAfter = null, int limitSizeTo = -1, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IEnumerable<TObject>>The source.
keySelectorFunc<TObject, TKey>The key selector.
expireAfterFunc<TObject, 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<IChangeSet<TObject, TKey>>
An observable change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or keySelector.
ToObservableChangeSet<TObject, TKey>(IObservable<TObject>, Func<TObject, TKey>, Func<TObject, TimeSpan?>?, int, IScheduler?)
Converts the observable to an observable change set. Change set observes observable change events.
public static IObservable<IChangeSet<TObject, TKey>> ToObservableChangeSet<TObject, TKey>(this IObservable<TObject> source, Func<TObject, TKey> keySelector, Func<TObject, TimeSpan?>? expireAfter = null, int limitSizeTo = -1, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<TObject>The source.
keySelectorFunc<TObject, TKey>The key selector.
expireAfterFunc<TObject, 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<IChangeSet<TObject, TKey>>
An observable which will emit changes.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or keySelector.
ToObservableOptional<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TKey, bool, IEqualityComparer<TObject>?)
Converts an observable cache into an observable optional that emits the value for the given key.
public static IObservable<Optional<TObject>> ToObservableOptional<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TKey key, bool initialOptionalWhenMissing, IEqualityComparer<TObject>? equalityComparer = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
keyTKeyThe key value.
initialOptionalWhenMissingboolIndicates if an initial Optional None should be emitted if the value doesn't exist.
equalityComparerIEqualityComparer<TObject>Optional IEqualityComparer<T> instance used to determine if an object value has changed.
Returns
- IObservable<Optional<TObject>>
An observable optional.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source is null.
ToObservableOptional<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TKey, IEqualityComparer<TObject>?)
Converts an observable change set into an observable optional that emits the value for the given key.
public static IObservable<Optional<TObject>> ToObservableOptional<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TKey key, IEqualityComparer<TObject>? equalityComparer = null) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
keyTKeyThe key value.
equalityComparerIEqualityComparer<TObject>Optional IEqualityComparer<T> instance used to determine if an object value has changed.
Returns
- IObservable<Optional<TObject>>
An observable optional.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source is null.
ToSortedCollection<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, 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, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The sort comparer.
Returns
- IObservable<IReadOnlyCollection<TObject>>
An observable which emits the read only collection.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
ToSortedCollection<TObject, TKey, TSortKey>(IObservable<IChangeSet<TObject, TKey>>, 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, TKey, TSortKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TSortKey> sort, SortDirection sortOrder = SortDirection.Ascending) where TObject : notnull where TKey : notnull where TSortKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
sortFunc<TObject, TSortKey>The sort function.
sortOrderSortDirectionThe sort order. Defaults to ascending.
Returns
- IObservable<IReadOnlyCollection<TObject>>
An observable which emits the read only collection.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TSortKeyThe sort key.
Top<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IComparer<TObject>, int)
Limits the size of the result set to the specified number, ordering by the comparer.
public static IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>> Top<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, int size) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
comparerIComparer<TObject>The comparer.
sizeintThe size.
Returns
- IObservable<IChangeSet<TObject, TKey, VirtualContext<TObject>>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
- ArgumentOutOfRangeException
size;Size should be greater than zero.
Top<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, int)
Limits the size of the result set to the specified number.
[Obsolete("Use Overload with comparer as it's more efficient")]
public static IObservable<IVirtualChangeSet<TObject, TKey>> Top<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, int size) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
sizeintThe size.
Returns
- IObservable<IVirtualChangeSet<TObject, TKey>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
- ArgumentOutOfRangeException
size;Size should be greater than zero.
TransformAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, Task<TDestination>>, TransformAsyncOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, Task<TDestination>> transformFactory, TransformAsyncOptions options) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, Task<TDestination>>The transform factory.
optionsTransformAsyncOptionsThe transform options.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, Task<TDestination>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, Task<TDestination>> transformFactory, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, Task<TDestination>>The transform factory.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Task<TDestination>>, TransformAsyncOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Task<TDestination>> transformFactory, TransformAsyncOptions options) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Task<TDestination>>The transform factory.
optionsTransformAsyncOptionsThe transform options.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Task<TDestination>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Task<TDestination>> transformFactory, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Task<TDestination>>The transform factory.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, Task<TDestination>>, TransformAsyncOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, Task<TDestination>> transformFactory, TransformAsyncOptions options) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, Task<TDestination>>The transform factory.
optionsTransformAsyncOptionsThe transform options.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, Task<TDestination>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, Task<TDestination>> transformFactory, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, Task<TDestination>>The transform factory.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformImmutable<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>)
Projects each update item to a new form using the specified transform function, with optimizations for stateless/deterministic transformation of immutable items.
public static IObservable<IChangeSet<TDestination, TKey>> TransformImmutable<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source stream of collection items to be transformed.
transformFactoryFunc<TSource, TDestination>The transformation to be applied to each item.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A stream of collection changesets where upstream collection items are transformed by the given factory function.
Type Parameters
TDestinationThe type of collection items produced by the transformation.
TSourceThe type of collection items to be transformed.
TKeyThe type of the key values of each collection item.
Remarks
The goal of this operator is to optimize a common use-case of reactive programming, where data values flowing through a stream are immutable, and state changes are distributed by publishing new immutable items as replacements, instead of mutating the items directly.
In addition to assuming that all collection items are immutable, this operator also assumes that the given transformation function is deterministic, such that the result it returns will always be equivalent each time a specific input is passed to it. In other words, the transformation itself also contains no mutable state.
Under these assumptions, this operator can bypass the need to keep track of every collection item that passes through it, which the normal Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, TDestination>, bool) operator must do, in order to re-evaluate transformations during a refresh operation.
Consider using this operator when the following are true:
- Your collection items are immutable, and changes are published by replacing entire items
- Your transformation logic does not change over the lifetime of the stream, only the items do
- Your transformation function runs quickly, and does not heavily allocate memory
Note that, because transformation is purely deterministic, Refresh operations are transparently ignored by this operator.
TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, Task<IObservableCache<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, IObservableCache<TDestination, TDestinationKey>>, Func<TDestination, TDestinationKey>) except that it allows the tranformation function to be an async method. Also supports comparison and sorting to prioritize values the same destination key returned from multiple sources.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, Task<IObservableCache<TDestination, TDestinationKey>>> manySelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, Task<IObservableCache<TDestination, TDestinationKey>>>Async function to transform a
TSourceandTSourceKeyinto an IObservableCache<TObject, TKey> ofTDestination.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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, Task<IEnumerable<TDestination>>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, IEnumerable<TDestination>>, Func<TDestination, TDestinationKey>) except that it allows the tranformation function to be an async method. Also supports comparison and sorting to prioritize values the same destination key returned from multiple sources.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, Task<IEnumerable<TDestination>>> manySelector, Func<TDestination, TDestinationKey> keySelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, Task<IEnumerable<TDestination>>>Async function to transform a
TSourceinto an IEnumerable<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
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<IChangeSet<TDestination, TDestinationKey>>
An observable changeset with the transformed values.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, IObservableCache<TDestination, TDestinationKey>>, Func<TDestination, TDestinationKey>) except that it allows the tranformation function to be an async method. Also supports comparison and sorting to prioritize values the same destination key returned from multiple sources.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>> manySelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>Async function to transform a
TSourceandTSourceKeyinto an IObservableCache<TObject, TKey> ofTDestination.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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, IEnumerable<TDestination>>, Func<TDestination, TDestinationKey>) except that it allows the tranformation function to be an async method. Also supports comparison and sorting to prioritize values the same destination key returned from multiple sources.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>> manySelector, Func<TDestination, TDestinationKey> keySelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, TSourceKey, Task<IEnumerable<TDestination>>>Async function to transform a
TSourceandTSourceKeyinto an IEnumerable<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
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<IChangeSet<TDestination, TDestinationKey>>
An observable changeset with the transformed values.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, Task<TCollection>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, ObservableCollection<TDestination>>, Func<TDestination, TDestinationKey>) except that it allows the tranformation function to be an async method. Also supports comparison and sorting to prioritize values the same destination key returned from multiple sources.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, Task<TCollection>> manySelector, Func<TDestination, TDestinationKey> keySelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull where TCollection : INotifyCollectionChanged, IEnumerable<TDestination>
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, Task<TCollection>>Async function to transform a
TSourceinto an ObservableCollection<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TCollectionThe type of an observable collection of
TDestination.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<TCollection>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, ObservableCollection<TDestination>>, Func<TDestination, TDestinationKey>) except that it allows the tranformation function to be an async method. Also supports comparison and sorting to prioritize values the same destination key returned from multiple sources.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, TSourceKey, Task<TCollection>> manySelector, Func<TDestination, TDestinationKey> keySelector, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull where TCollection : INotifyCollectionChanged, IEnumerable<TDestination>
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, TSourceKey, Task<TCollection>>Async function to transform a
TSourceandTSourceKeyinto an ObservableCollection<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TCollectionThe type of an observable collection of
TDestination.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, Task<IObservableCache<TDestination, TDestinationKey>>>, Action<Error<TSource, TSourceKey>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) except it accepts an error handler so that failed transformations are not fatal errors.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, Task<IObservableCache<TDestination, TDestinationKey>>> manySelector, Action<Error<TSource, TSourceKey>> errorHandler, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, Task<IObservableCache<TDestination, TDestinationKey>>>Async function to transform a
TSourceinto an IObservableCache<TObject, TKey> ofTDestination.errorHandlerAction<Error<TSource, TSourceKey>>Callback function for handling an errors.
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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, Task<IEnumerable<TDestination>>>, Func<TDestination, TDestinationKey>, Action<Error<TSource, TSourceKey>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) except it accepts an error handler so that failed transformations are not fatal errors.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, Task<IEnumerable<TDestination>>> manySelector, Func<TDestination, TDestinationKey> keySelector, Action<Error<TSource, TSourceKey>> errorHandler, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, Task<IEnumerable<TDestination>>>Async function to transform a
TSourceinto an IEnumerable<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
errorHandlerAction<Error<TSource, TSourceKey>>Callback function for handling an errors.
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<IChangeSet<TDestination, TDestinationKey>>
An observable changeset with the transformed values.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>, Action<Error<TSource, TSourceKey>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) except it accepts an error handler so that failed transformations are not fatal errors.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>> manySelector, Action<Error<TSource, TSourceKey>> errorHandler, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>Async function to transform a
TSourceandTSourceKeyinto an IObservableCache<TObject, TKey> ofTDestination.errorHandlerAction<Error<TSource, TSourceKey>>Callback function for handling an errors.
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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>>, Func<TDestination, TDestinationKey>, Action<Error<TSource, TSourceKey>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) except it accepts an error handler so that failed transformations are not fatal errors.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>> manySelector, Func<TDestination, TDestinationKey> keySelector, Action<Error<TSource, TSourceKey>> errorHandler, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, TSourceKey, Task<IEnumerable<TDestination>>>Async function to transform a
TSourceandTSourceKeyinto an IEnumerable<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
errorHandlerAction<Error<TSource, TSourceKey>>Callback function for handling an errors.
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<IChangeSet<TDestination, TDestinationKey>>
An observable changeset with the transformed values.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, Task<TCollection>>, Func<TDestination, TDestinationKey>, Action<Error<TSource, TSourceKey>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, Task<TCollection>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) except it accepts an error handler so that failed transformations are not fatal errors.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, Task<TCollection>> manySelector, Func<TDestination, TDestinationKey> keySelector, Action<Error<TSource, TSourceKey>> errorHandler, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull where TCollection : INotifyCollectionChanged, IEnumerable<TDestination>
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, Task<TCollection>>Async function to transform a
TSourceinto an ObservableCollection<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
errorHandlerAction<Error<TSource, TSourceKey>>Callback function for handling an errors.
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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TCollectionThe type of an observable collection of
TDestination.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<TCollection>>, Func<TDestination, TDestinationKey>, Action<Error<TSource, TSourceKey>>, IEqualityComparer<TDestination>?, IComparer<TDestination>?)
Extension method similar to TransformManyAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, TSourceKey, Task<TCollection>>, Func<TDestination, TDestinationKey>, IEqualityComparer<TDestination>?, IComparer<TDestination>?) except it accepts an error handler so that failed transformations are not fatal errors.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformManySafeAsync<TDestination, TDestinationKey, TSource, TSourceKey, TCollection>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, TSourceKey, Task<TCollection>> manySelector, Func<TDestination, TDestinationKey> keySelector, Action<Error<TSource, TSourceKey>> errorHandler, IEqualityComparer<TDestination>? equalityComparer = null, IComparer<TDestination>? comparer = null) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull where TCollection : INotifyCollectionChanged, IEnumerable<TDestination>
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, TSourceKey, Task<TCollection>>Async function to transform a
TSourceandTSourceKeyinto an ObservableCollection<T> ofTDestination.keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
errorHandlerAction<Error<TSource, TSourceKey>>Callback function for handling an errors.
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<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TCollectionThe type of an observable collection of
TDestination.
Remarks
Because the transformations are asynchronous, unlike TransformMany, each sub-collection could be emitted via a separate changeset.
TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, IObservableCache<TDestination, TDestinationKey>>, Func<TDestination, TDestinationKey>)
Flatten the nested observable cache, and subsequently observe observable cache changes.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, IObservableCache<TDestination, TDestinationKey>> manySelector, Func<TDestination, TDestinationKey> keySelector) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, IObservableCache<TDestination, TDestinationKey>>Will select an observable cache of values.
keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, IEnumerable<TDestination>>, Func<TDestination, TDestinationKey>)
Equivalent to a select many transform. To work, the key must individually identify each child.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, IEnumerable<TDestination>> manySelector, Func<TDestination, TDestinationKey> keySelector) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, IEnumerable<TDestination>>Will select a enumerable of values.
keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, ObservableCollection<TDestination>>, Func<TDestination, TDestinationKey>)
Flatten the nested observable collection, and subsequently observe observable collection changes.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, ObservableCollection<TDestination>> manySelector, Func<TDestination, TDestinationKey> keySelector) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, ObservableCollection<TDestination>>Will select a enumerable of values.
keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(IObservable<IChangeSet<TSource, TSourceKey>>, Func<TSource, ReadOnlyObservableCollection<TDestination>>, Func<TDestination, TDestinationKey>)
Flatten the nested observable collection, and subsequently observe observable collection changes.
public static IObservable<IChangeSet<TDestination, TDestinationKey>> TransformMany<TDestination, TDestinationKey, TSource, TSourceKey>(this IObservable<IChangeSet<TSource, TSourceKey>> source, Func<TSource, ReadOnlyObservableCollection<TDestination>> manySelector, Func<TDestination, TDestinationKey> keySelector) where TDestination : notnull where TDestinationKey : notnull where TSource : notnull where TSourceKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TSourceKey>>The source.
manySelectorFunc<TSource, ReadOnlyObservableCollection<TDestination>>Will select a enumerable of values.
keySelectorFunc<TDestination, TDestinationKey>The key selector which must be unique across all.
Returns
- IObservable<IChangeSet<TDestination, TDestinationKey>>
An observable with the transformed change set.
Type Parameters
TDestinationThe type of the destination.
TDestinationKeyThe type of the destination key.
TSourceThe type of the source.
TSourceKeyThe type of the source key.
TransformOnObservable<TSource, TKey, TDestination>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, IObservable<TDestination>>)
Transforms each item in the ChangeSet into an Observable that provides the value for the Resulting ChangeSet.
public static IObservable<IChangeSet<TDestination, TKey>> TransformOnObservable<TSource, TKey, TDestination>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, IObservable<TDestination>> transformFactory) where TSource : notnull where TKey : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source changeset observable.
transformFactoryFunc<TSource, IObservable<TDestination>>Factory function to create the Observable that will provide the values in the result changeset from the given object in the source changeset.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A changeset whose value for a given key is the latest value emitted from the transformed Observable and will update to future values from that observable.
Type Parameters
TSourceThe type of the source changeset.
TKeyThe type of the key.
TDestinationThe type of the destination changeset.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformOnObservable<TSource, TKey, TDestination>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, IObservable<TDestination>>)
Transforms each item in the ChangeSet into an Observable that provides the value for the Resulting ChangeSet.
public static IObservable<IChangeSet<TDestination, TKey>> TransformOnObservable<TSource, TKey, TDestination>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, IObservable<TDestination>> transformFactory) where TSource : notnull where TKey : notnull where TDestination : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source changeset observable.
transformFactoryFunc<TSource, TKey, IObservable<TDestination>>Factory function to create the Observable that will provide the values in the result changeset from the given object in the source changeset.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A changeset whose value for a given key is the latest value emitted from the transformed Observable and will update to future values from that observable.
Type Parameters
TSourceThe type of the source changeset.
TKeyThe type of the key.
TDestinationThe type of the destination changeset.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafeAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, Task<TDestination>>, Action<Error<TSource, TKey>>, TransformAsyncOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafeAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, Task<TDestination>> transformFactory, Action<Error<TSource, TKey>> errorHandler, TransformAsyncOptions options) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, Task<TDestination>>The transform factory.
errorHandlerAction<Error<TSource, TKey>>The error handler.
optionsTransformAsyncOptionsAdditional transform options.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafeAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, Task<TDestination>>, Action<Error<TSource, TKey>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafeAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, Task<TDestination>> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, Task<TDestination>>The transform factory.
errorHandlerAction<Error<TSource, TKey>>The error handler.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafeAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Task<TDestination>>, Action<Error<TSource, TKey>>, TransformAsyncOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafeAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Task<TDestination>> transformFactory, Action<Error<TSource, TKey>> errorHandler, TransformAsyncOptions options) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Task<TDestination>>The transform factory.
errorHandlerAction<Error<TSource, TKey>>The error handler.
optionsTransformAsyncOptionsAdditional transform options.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafeAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Task<TDestination>>, Action<Error<TSource, TKey>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafeAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Task<TDestination>> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Task<TDestination>>The transform factory.
errorHandlerAction<Error<TSource, TKey>>The error handler.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafeAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, Task<TDestination>>, Action<Error<TSource, TKey>>, TransformAsyncOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafeAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, Task<TDestination>> transformFactory, Action<Error<TSource, TKey>> errorHandler, TransformAsyncOptions options) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, Task<TDestination>>The transform factory.
errorHandlerAction<Error<TSource, TKey>>The error handler.
optionsTransformAsyncOptionsAdditional transform options.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafeAsync<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, Task<TDestination>>, Action<Error<TSource, TKey>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafeAsync<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, Task<TDestination>> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, Task<TDestination>>The transform factory.
errorHandlerAction<Error<TSource, TKey>>The error handler.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, TDestination>, Action<Error<TSource, TKey>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, TDestination>The transform factory.
errorHandlerAction<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, TDestination>, Action<Error<TSource, TKey>>, IObservable<Unit>)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Unit> forceTransform) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, TDestination>The transform factory.
errorHandlerAction<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream.
forceTransformIObservable<Unit>Invoke to force a new transform for all items.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, Action<Error<TSource, TKey>>, IObservable<Func<TSource, bool>>?)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Func<TSource, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
errorHandlerAction<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream.
forceTransformIObservable<Func<TSource, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, Action<Error<TSource, TKey>>, IObservable<Unit>)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Unit> forceTransform) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
errorHandlerAction<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream.
forceTransformIObservable<Unit>Invoke to force a new transform for all items.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, Action<Error<TSource, TKey>>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, TDestination>The transform factory.
errorHandlerAction<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, Action<Error<TSource, TKey>>, IObservable<Unit>)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, IObservable<Unit> forceTransform) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, TDestination>The transform factory.
errorHandlerAction<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream.
forceTransformIObservable<Unit>Invoke to force a new transform for all items.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformToTree<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey>, IObservable<Func<Node<TObject, TKey>, bool>>?)
Transforms the object to a fully recursive tree, create a hierarchy based on the pivot function.
public static IObservable<IChangeSet<Node<TObject, TKey>, TKey>> TransformToTree<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey> pivotOn, IObservable<Func<Node<TObject, TKey>, bool>>? predicateChanged = null) where TObject : class where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
pivotOnFunc<TObject, TKey>The pivot on.
predicateChangedIObservable<Func<Node<TObject, TKey>, bool>>Observable to change the underlying predicate.
Returns
- IObservable<IChangeSet<Node<TObject, TKey>, TKey>>
An observable which will emit change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TransformWithInlineUpdate<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, Action<TDestination, TSource>)
Projects each update item to a new form using the specified transform function and when an update is received, allows the preservation of the previous instance.
public static IObservable<IChangeSet<TDestination, TKey>> TransformWithInlineUpdate<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, Action<TDestination, TSource> updateAction) where TDestination : class where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
updateActionAction<TDestination, TSource>Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformWithInlineUpdate<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, Action<TDestination, TSource>, Action<Error<TSource, TKey>>)
Projects each update item to a new form using the specified transform function and when an update is received, allows the preservation of the previous instance.
public static IObservable<IChangeSet<TDestination, TKey>> TransformWithInlineUpdate<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, Action<TDestination, TSource> updateAction, Action<Error<TSource, TKey>> errorHandler) where TDestination : class where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
updateActionAction<TDestination, TSource>Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.
errorHandlerAction<Error<TSource, TKey>>The error handler.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformWithInlineUpdate<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, Action<TDestination, TSource>, Action<Error<TSource, TKey>>, bool)
Projects each update item to a new form using the specified transform function and when an update is received, allows the preservation of the previous instance.
public static IObservable<IChangeSet<TDestination, TKey>> TransformWithInlineUpdate<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, Action<TDestination, TSource> updateAction, Action<Error<TSource, TKey>> errorHandler, bool transformOnRefresh) where TDestination : class where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
updateActionAction<TDestination, TSource>Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.
errorHandlerAction<Error<TSource, TKey>>The error handler.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TransformWithInlineUpdate<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, Action<TDestination, TSource>, bool)
Projects each update item to a new form using the specified transform function and when an update is received, allows the preservation of the previous instance.
public static IObservable<IChangeSet<TDestination, TKey>> TransformWithInlineUpdate<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, Action<TDestination, TSource> updateAction, bool transformOnRefresh) where TDestination : class where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
updateActionAction<TDestination, TSource>Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, TDestination>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, TDestination> transformFactory, bool transformOnRefresh) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, TDestination>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, TDestination>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, TDestination> transformFactory, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, TDestination>The transform factory.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, Optional<TSource>, TKey, TDestination>, IObservable<Unit>)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, Optional<TSource>, TKey, TDestination> transformFactory, IObservable<Unit> forceTransform) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, Optional<TSource>, TKey, TDestination>The transform factory.
forceTransformIObservable<Unit>Invoke to force a new transform for all items.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, bool transformOnRefresh) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, IObservable<Func<TSource, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, IObservable<Func<TSource, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
forceTransformIObservable<Func<TSource, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, IObservable<Unit>)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, IObservable<Unit> forceTransform) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TDestination>The transform factory.
forceTransformIObservable<Unit>Invoke to force a new transform for all items.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, bool)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, TDestination> transformFactory, bool transformOnRefresh) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, TDestination>The transform factory.
transformOnRefreshboolShould a new transform be applied when a refresh event is received.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, IObservable<Func<TSource, TKey, bool>>?)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, TDestination> transformFactory, IObservable<Func<TSource, TKey, bool>>? forceTransform = null) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, TDestination>The transform factory.
forceTransformIObservable<Func<TSource, TKey, bool>>Invoke to force a new transform for items matching the selected objects.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, IObservable<Unit>)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, TDestination> transformFactory, IObservable<Unit> forceTransform) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TSource, TKey>>The source.
transformFactoryFunc<TSource, TKey, TDestination>The transform factory.
forceTransformIObservable<Unit>Invoke to force a new transform for all items.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
A transformed update collection.
Type Parameters
TDestinationThe type of the destination.
TSourceThe type of the source.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or transformFactory.
TreatMovesAsRemoveAdd<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>)
Converts moves changes to remove + add.
public static IObservable<ISortedChangeSet<TObject, TKey>> TreatMovesAsRemoveAdd<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
the same SortedChangeSets, except all moves are replaced with remove + add.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TrueForAll<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<TValue>>, Func<TObject, TValue, bool>)
Produces a boolean observable indicating whether the latest resulting value from all of the specified observables matches the equality condition. The observable is re-evaluated whenever.
i) The cache changes or ii) The inner observable changes.
public static IObservable<bool> TrueForAll<TObject, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TValue>> observableSelector, Func<TObject, TValue, bool> equalityCondition) where TObject : notnull where TKey : notnull where TValue : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, IObservable<TValue>>Selector which returns the target observable.
equalityConditionFunc<TObject, TValue, bool>The equality condition.
Returns
- IObservable<bool>
An observable which boolean values indicating if true.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TValueThe type of the value.
Exceptions
- ArgumentNullException
source.
TrueForAll<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<TValue>>, Func<TValue, bool>)
Produces a boolean observable indicating whether the latest resulting value from all of the specified observables matches the equality condition. The observable is re-evaluated whenever.
i) The cache changes or ii) The inner observable changes.
public static IObservable<bool> TrueForAll<TObject, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TValue>> observableSelector, Func<TValue, bool> equalityCondition) where TObject : notnull where TKey : notnull where TValue : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, IObservable<TValue>>Selector which returns the target observable.
equalityConditionFunc<TValue, bool>The equality condition.
Returns
- IObservable<bool>
An observable which boolean values indicating if true.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TValueThe type of the value.
Exceptions
- ArgumentNullException
source.
TrueForAny<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<TValue>>, Func<TObject, TValue, bool>)
Produces a boolean observable indicating whether the resulting value of whether any of the specified observables matches the equality condition. The observable is re-evaluated whenever i) The cache changes. or ii) The inner observable changes.
public static IObservable<bool> TrueForAny<TObject, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TValue>> observableSelector, Func<TObject, TValue, bool> equalityCondition) where TObject : notnull where TKey : notnull where TValue : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, IObservable<TValue>>The observable selector.
equalityConditionFunc<TObject, TValue, bool>The equality condition.
Returns
- IObservable<bool>
An observable which boolean values indicating if true.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TValueThe type of the value.
Exceptions
- ArgumentNullException
source or observableSelector or equalityCondition.
TrueForAny<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IObservable<TValue>>, Func<TValue, bool>)
Produces a boolean observable indicating whether the resulting value of whether any of the specified observables matches the equality condition. The observable is re-evaluated whenever i) The cache changes. or ii) The inner observable changes.
public static IObservable<bool> TrueForAny<TObject, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IObservable<TValue>> observableSelector, Func<TValue, bool> equalityCondition) where TObject : notnull where TKey : notnull where TValue : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
observableSelectorFunc<TObject, IObservable<TValue>>The observable selector.
equalityConditionFunc<TValue, bool>The equality condition.
Returns
- IObservable<bool>
An observable which boolean values indicating if true.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TValueThe type of the value.
Exceptions
- ArgumentNullException
source or observableSelector or equalityCondition.
UpdateIndex<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>)
Updates the index for an object which implements IIndexAware.
public static IObservable<ISortedChangeSet<TObject, TKey>> UpdateIndex<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source) where TObject : IIndexAware where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
Returns
- IObservable<ISortedChangeSet<TObject, TKey>>
An observable which emits the sorted change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Virtualise<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, IObservable<IVirtualRequest>)
Virtualises the underlying data from the specified source.
[Obsolete("Use SortAndVirtualize as it's more efficient")]
public static IObservable<IVirtualChangeSet<TObject, TKey>> Virtualise<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, IObservable<IVirtualRequest> virtualRequests) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<ISortedChangeSet<TObject, TKey>>The source.
virtualRequestsIObservable<IVirtualRequest>The virtualising requests.
Returns
- IObservable<IVirtualChangeSet<TObject, TKey>>
An observable which will emit virtual change sets.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
WatchValue<TObject, TKey>(IObservableCache<TObject, TKey>, TKey)
Watches updates for a single value matching the specified key.
public static IObservable<TObject> WatchValue<TObject, TKey>(this IObservableCache<TObject, TKey> source, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceIObservableCache<TObject, TKey>The source.
keyTKeyThe key.
Returns
- IObservable<TObject>
An observable which emits the object value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
WatchValue<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TKey)
Watches updates for a single value matching the specified key.
public static IObservable<TObject> WatchValue<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
keyTKeyThe key.
Returns
- IObservable<TObject>
An observable which emits the object value.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source.
Watch<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, TKey)
Returns an observable of any updates which match the specified key, proceeded with the initial cache state.
public static IObservable<Change<TObject, TKey>> Watch<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, TKey key) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
keyTKeyThe key.
Returns
- IObservable<Change<TObject, TKey>>
An observable which emits the change.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
WhenAnyPropertyChanged<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, params string[])
Watches each item in the collection and notifies when any of them has changed.
public static IObservable<TObject?> WhenAnyPropertyChanged<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, params string[] propertiesToMonitor) where TObject : INotifyPropertyChanged where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
propertiesToMonitorstring[]specify properties to Monitor, or omit to monitor all property changes.
Returns
- IObservable<TObject>
An observable which emits the object which has had a property changed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
WhenPropertyChanged<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, 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, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Expression<Func<TObject, TValue>> propertyAccessor, bool notifyOnInitialValue = true) where TObject : INotifyPropertyChanged where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
propertyAccessorExpression<Func<TObject, TValue>>The property accessor.
notifyOnInitialValueboolIf true the resulting observable includes the initial value.
Returns
- IObservable<PropertyValue<TObject, TValue>>
An observable which emits a property when it has changed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TValueThe type of the value.
WhenValueChanged<TObject, TKey, TValue>(IObservable<IChangeSet<TObject, TKey>>, 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, TKey, TValue>(this IObservable<IChangeSet<TObject, TKey>> source, Expression<Func<TObject, TValue>> propertyAccessor, bool notifyOnInitialValue = true) where TObject : INotifyPropertyChanged where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>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 a value when it has changed.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
TValueThe type of the value.
WhereReasonsAreNot<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, params ChangeReason[])
Excludes updates for the specified reasons.
public static IObservable<IChangeSet<TObject, TKey>> WhereReasonsAreNot<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, params ChangeReason[] reasons) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
reasonsChangeReason[]The reasons.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items not matching the reasons.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
reasons.
- ArgumentException
Must select at least on reason.
WhereReasonsAre<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, params ChangeReason[])
Includes changes for the specified reasons only.
public static IObservable<IChangeSet<TObject, TKey>> WhereReasonsAre<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, params ChangeReason[] reasons) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
reasonsChangeReason[]The reasons.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set with items matching the reasons.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
reasons.
- ArgumentException
Must select at least on reason.
Xor<TObject, TKey>(IObservableList<IObservableCache<TObject, TKey>>)
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<TObject, TKey>> Xor<TObject, TKey>(this IObservableList<IObservableCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservableCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Xor<TObject, TKey>(IObservableList<ISourceCache<TObject, TKey>>)
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<TObject, TKey>> Xor<TObject, TKey>(this IObservableList<ISourceCache<TObject, TKey>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<ISourceCache<TObject, TKey>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Xor<TObject, TKey>(IObservableList<IObservable<IChangeSet<TObject, TKey>>>)
Dynamically apply a logical Xor operator between the items in the outer observable list. Items which are only in one of the sources are included in the result.
public static IObservable<IChangeSet<TObject, TKey>> Xor<TObject, TKey>(this IObservableList<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesIObservableList<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Xor<TObject, TKey>(ICollection<IObservable<IChangeSet<TObject, TKey>>>)
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<TObject, TKey>> Xor<TObject, TKey>(this ICollection<IObservable<IChangeSet<TObject, TKey>>> sources) where TObject : notnull where TKey : notnull
Parameters
sourcesICollection<IObservable<IChangeSet<TObject, TKey>>>The source.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.
Xor<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, params IObservable<IChangeSet<TObject, TKey>>[])
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<TObject, TKey>> Xor<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, params IObservable<IChangeSet<TObject, TKey>>[] others) where TObject : notnull where TKey : notnull
Parameters
sourceIObservable<IChangeSet<TObject, TKey>>The source.
othersIObservable<IChangeSet<TObject, TKey>>[]The others.
Returns
- IObservable<IChangeSet<TObject, TKey>>
An observable which emits a change set.
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
Exceptions
- ArgumentNullException
source or others.