Table of Contents

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

adaptor IChangeSetAdaptor<TObject, TKey>

The adaptor.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

adaptor ISortedChangeSetAdaptor<TObject, TKey>

The adaptor.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IIntermediateCache<TObject, TKey>

The source cache.

item TObject

The item to add or update.

key TKey

The key to add or update.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source.

AddOrUpdate<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>)

Adds or updates the cache with the specified items.
public static void AddOrUpdate<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> items) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The source.

items IEnumerable<TObject>

The items.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source.

AddOrUpdate<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>, IEqualityComparer<TObject>)

Adds or updates the cache with the specified items.
public static void AddOrUpdate<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> items, IEqualityComparer<TObject> equalityComparer) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The source.

items IEnumerable<TObject>

The items.

equalityComparer IEqualityComparer<TObject>

The equality comparer used to determine whether a new item is the same as an existing cached item.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

item TObject

The item.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

item TObject

The item.

equalityComparer IEqualityComparer<TObject>

The equality comparer used to determine whether a new item is the same as an existing cached item.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<IObservableCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<ISourceCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<IObservable<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources ICollection<IObservable<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

others IObservable<IChangeSet<TObject, TKey>>[]

The others.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservableCache<TObject, TKey>

The source.

Returns

IObservableCache<TObject, TKey>

An observable cache.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

applyLocking bool

if set to true all 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source.

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

source IObservable<IChangeSet<TObject, TKey>>

The source observable change set.

reevaluator Func<TObject, IObservable<TAny>>

An observable which acts on items within the collection and produces a value when the item should be refreshed.

changeSetBuffer TimeSpan?

Batch up changes by specifying the buffer. This greatly increases performance when many elements require a refresh.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable change set with additional refresh changes.

Type Parameters

TObject

The object of the change set.

TKey

The key of the change set.

TAny

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source observable change set.

reevaluator Func<TObject, TKey, IObservable<TAny>>

An observable which acts on items within the collection and produces a value when the item should be refreshed.

changeSetBuffer TimeSpan?

Batch up changes by specifying the buffer. This greatly increases performance when many elements require a refresh.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable change set with additional refresh changes.

Type Parameters

TObject

The object of the change set.

TKey

The key of the change set.

TAny

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

changeSetBuffer TimeSpan?

Batch up changes by specifying the buffer. This greatly increases performance when many elements have successive property changes.

propertyChangeThrottle TimeSpan?

When observing on multiple property changes, apply a throttle to prevent excessive refresh invocations.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable change set with additional refresh changes.

Type Parameters

TObject

The object of the change set.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

propertyAccessor Expression<Func<TObject, TProperty>>

Specify a property to observe changes. When it changes a Refresh is invoked.

changeSetBuffer TimeSpan?

Batch up changes by specifying the buffer. This greatly increases performance when many elements have successive property changes.

propertyChangeThrottle TimeSpan?

When observing on multiple property changes, apply a throttle to prevent excessive refresh invocations.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable change set with additional refresh changes.

Type Parameters

TObject

The object of the change set.

TKey

The key of the change set.

TProperty

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

pauseIfTrueSelector IObservable<bool>

When true, observable begins to buffer and when false, window closes and buffered result if notified.

initialPauseState bool

if set to true [initial pause state].

timer IObservable<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.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

pauseIfTrueSelector IObservable<bool>

When true, observable begins to buffer and when false, window closes and buffered result if notified.

initialPauseState bool

if set to true [initial pause state].

timeOut TimeSpan?

Specify a time to ensure the buffer window does not stay open for too long. On completion buffering will cease.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

pauseIfTrueSelector IObservable<bool>

When true, observable begins to buffer and when false, window closes and buffered result if notified.

initialPauseState bool

if set to true [initial pause state].

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

pauseIfTrueSelector IObservable<bool>

When true, observable begins to buffer and when false, window closes and buffered result if notified.

timeOut TimeSpan?

Specify a time to ensure the buffer window does not stay open for too long. On completion buffering will cease.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

pauseIfTrueSelector IObservable<bool>

When true, observable begins to buffer and when false, window closes and buffered result if notified.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

timeSpan TimeSpan

The time span.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source or scheduler.

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

destination IObservableCollection<TObject>

The destination.

options BindingOptions

The binding options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

destination IObservableCollection<TObject>

The destination.

updater IObservableCollectionAdaptor<TObject, TKey>

The updater.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

destination IObservableCollection<TObject>

The destination.

refreshThreshold int

The number of changes before a reset notification is triggered.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

options BindingOptions

The binding options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

resetThreshold int

The number of changes before a reset notification is triggered.

useReplaceForUpdates bool

Use replace instead of remove / add for updates. NB: Some platforms to not support replace notifications for binding.

adaptor IObservableCollectionAdaptor<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

bindingList BindingList<TObject>

The target binding list.

resetThreshold int

The reset threshold.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The object type.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

destination IObservableCollection<TObject>

The destination.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

destination IObservableCollection<TObject>

The destination.

options BindingOptions

The binding options.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

destination IObservableCollection<TObject>

The destination.

updater ISortedObservableCollectionAdaptor<TObject, TKey>

The updater.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

options BindingOptions

The binding options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

resetThreshold int

The number of changes before a reset event is called on the observable collection.

useReplaceForUpdates bool

Use replace instead of remove / add for updates. NB: Some platforms to not support replace notifications for binding.

adaptor ISortedObservableCollectionAdaptor<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

TObject

The type of the object.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

bindingList BindingList<TObject>

The target binding list.

resetThreshold int

The reset threshold.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The object type.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source change set.

initialBuffer TimeSpan

The period to buffer, measure from the time that the first item arrives.

scheduler IScheduler

The scheduler to buffer on.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The object type.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

converter Func<TSource, TDestination>

The conversion factory.

Returns

IObservable<IChangeSet<TDestination, TKey>>

An observable which emits change sets.

Type Parameters

TSource

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TSourceKey>>

The source.

keySelector Func<TObject, TDestinationKey>

The key selector eg. (item) => newKey.

Returns

IObservable<IChangeSet<TObject, TDestinationKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TSourceKey

The type of the source key.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TSourceKey>>

The source.

keySelector Func<TSourceKey, TObject, TDestinationKey>

The key selector eg. (key, item) => newKey.

Returns

IObservable<IChangeSet<TObject, TDestinationKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TSourceKey

The type of the source key.

TDestinationKey

The 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

source LockFreeObservableCache<TObject, TKey>

The source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IIntermediateCache<TObject, TKey>

The source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

target ICollection<TObject>

The target.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

conversionFactory Func<TObject, TDestination>

The conversion factory.

Returns

IObservable<IChangeSet<TDestination, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservableCache<TObject, TKey>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

A continuation of the original stream.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

valueSelector Func<TObject, TValue>

The value selector.

Returns

IObservable<IDistinctChangeSet<TValue>>

An observable which will emit distinct change sets.

Type Parameters

TObject

The type object from which the distinct values are selected.

TKey

The type of the key.

TValue

The 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

source ISourceCache<TObject, TKey>

The source.

allItems IEnumerable<TObject>

The items to add, update or delete.

equalityComparer IEqualityComparer<TObject>

The equality comparer used to determine whether a new item is the same as an existing cached item.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

allItems IEnumerable<TObject>

The items to compare and add, update or delete.

areItemsEqual Func<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

TObject

The type of the object.

TKey

The 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

source IObservable<Optional<TObject>>

The source.

keySelector Func<TObject, TKey>

Key Selection Function for the ChangeSet.

equalityComparer IEqualityComparer<TObject>

Optional IEqualityComparer<T> instance to use for comparing values.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable changeset.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IEnumerable<TObject>>

The source.

keySelector Func<TObject, TKey>

Key Selection Function for the ChangeSet.

equalityComparer IEqualityComparer<TObject>

Optional IEqualityComparer<T> instance to use for comparing values.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable cache.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<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

TObject

The type of the object.

TKey

The type of the key.

Evaluate<TObject, TKey>(ISourceCache<TObject, TKey>)

Signal observers to re-evaluate the all items.

[Obsolete("Use Refresh: Same thing but better semantics")]
public static void Evaluate<TObject, TKey>(this ISourceCache<TObject, TKey> source) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The source.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source.

Evaluate<TObject, TKey>(ISourceCache<TObject, TKey>, IEnumerable<TObject>)

Signal observers to re-evaluate the specified items.

[Obsolete("Use Refresh: Same thing but better semantics")]
public static void Evaluate<TObject, TKey>(this ISourceCache<TObject, TKey> source, IEnumerable<TObject> items) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The source.

items IEnumerable<TObject>

The items.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source.

Evaluate<TObject, TKey>(ISourceCache<TObject, TKey>, TObject)

Signal observers to re-evaluate the specified item.

[Obsolete("Use Refresh: Same thing but better semantics")]
public static void Evaluate<TObject, TKey>(this ISourceCache<TObject, TKey> source, TObject item) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The source.

item TObject

The item.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source.

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

sources IObservableList<IObservableCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<ISourceCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<IObservable<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources ICollection<IObservable<IChangeSet<TObject, TKey>>>

The sources.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

others IObservable<IChangeSet<TObject, TKey>>[]

The others.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source or others.

ExpireAfter<TObject, TKey>(ISourceCache<TObject, TKey>, Func<TObject, TimeSpan?>, TimeSpan?)

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? interval = null) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The cache.

timeSelector Func<TObject, TimeSpan?>

The time selector. Return null if the item should never be removed.

interval TimeSpan?

A polling interval. Since multiple timer subscriptions can be expensive, it may be worth setting the interval .

Returns

IObservable<IEnumerable<KeyValuePair<TKey, TObject>>>

An observable of enumerable of the key values which has been removed.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source or timeSelector.

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, IScheduler? scheduler) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The cache.

timeSelector Func<TObject, TimeSpan?>

The time selector. Return null if the item should never be removed.

pollingInterval TimeSpan?

A polling interval. Since multiple timer subscriptions can be expensive, it may be worth setting the interval.

scheduler IScheduler

The scheduler.

Returns

IObservable<IEnumerable<KeyValuePair<TKey, TObject>>>

An observable of enumerable of the key values which has been removed.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source or timeSelector.

ExpireAfter<TObject, TKey>(ISourceCache<TObject, TKey>, Func<TObject, 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, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull

Parameters

source ISourceCache<TObject, TKey>

The cache.

timeSelector Func<TObject, TimeSpan?>

The time selector. Return null if the item should never be removed.

scheduler IScheduler

The scheduler to perform the work on.

Returns

IObservable<IEnumerable<KeyValuePair<TKey, TObject>>>

An observable of enumerable of the key values which has been removed.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

timeSelector Func<TObject, TimeSpan?>

The time selector.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The cache.

timeSelector Func<TObject, TimeSpan?>

The time selector. Return null if the item should never be removed.

pollingInterval TimeSpan?

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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The cache.

timeSelector Func<TObject, TimeSpan?>

The time selector. Return null if the item should never be removed.

pollingInterval TimeSpan?

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.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable of enumerable of the key values which has been removed.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

timeSelector Func<TObject, TimeSpan?>

The time selector.

scheduler IScheduler

The scheduler.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source stream of collection items to be filtered.

predicate Func<TObject, bool>

The filtering predicate to be applied to each item.

suppressEmptyChangeSets bool

A 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

TObject

The type of collection items to be filtered.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

filterFactory Func<TObject, IObservable<bool>>

Factory function used to create the observable bool that controls whether that given item passes the filter or not.

buffer TimeSpan?

Optional time to buffer changes from the observable bools.

scheduler IScheduler

Optional 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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

filterFactory Func<TObject, TKey, IObservable<bool>>

Factory function used to create the observable bool that controls whether that given item passes the filter or not.

buffer TimeSpan?

Optional time to buffer changes from the observable bools.

scheduler IScheduler

Optional 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

One of the given parameters was null.

FilterOnProperty<TObject, TKey, TProperty>(IObservable<IChangeSet<TObject, TKey>>, Expression<Func<TObject, TProperty>>, Func<TObject, bool>, TimeSpan?, IScheduler?)

Filters source on the specified property using the specified predicate. The filter will automatically reapply when a property changes. When there are likely to be a large number of property changes specify a throttle to improve performance.

[Obsolete("Use AutoRefresh(), followed by Filter() instead")]
public static IObservable<IChangeSet<TObject, TKey>> FilterOnProperty<TObject, TKey, TProperty>(this IObservable<IChangeSet<TObject, TKey>> source, Expression<Func<TObject, TProperty>> propertySelector, Func<TObject, bool> predicate, TimeSpan? propertyChangedThrottle = null, IScheduler? scheduler = null) where TObject : INotifyPropertyChanged where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source.

propertySelector Expression<Func<TObject, TProperty>>

The property selector. When the property changes a the filter specified will be re-evaluated.

predicate Func<TObject, bool>

A predicate based on the object which contains the changed property.

propertyChangedThrottle TimeSpan?

The property changed throttle.

scheduler IScheduler

The scheduler used when throttling.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TProperty

The type of the property.

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

filter Func<TObject, bool>

The filter.

suppressEmptyChangeSets bool

By 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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

predicateChanged IObservable<Func<TObject, bool>>

Observable to change the underlying predicate.

suppressEmptyChangeSets bool

By 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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

predicateChanged IObservable<Func<TObject, bool>>

Observable to change the underlying predicate.

reapplyFilter IObservable<Unit>

Observable to re-evaluate whether the filter still matches items. Use when filtering on mutable values.

suppressEmptyChangeSets bool

By 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

TObject

The type of the object.

TKey

The type of the key.

Filter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, 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<Unit> reapplyFilter, bool suppressEmptyChangeSets = true) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source.

reapplyFilter IObservable<Unit>

Observable to re-evaluate whether the filter still matches items. Use when filtering on mutable values.

suppressEmptyChangeSets bool

By 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

TObject

The type of the object.

TKey

The type of the key.

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

source IObservable<T>

The source.

finallyAction Action

The finally action.

Returns

IObservable<T>

An observable which has always a finally action applied.

Type Parameters

T

The 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

source IObservable<IList<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<Change<TObject, TKey>>

An observable which emits change set values on a flatten result.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

action Action<Change<TObject, TKey>>

The action.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will perform the action on each item.

Type Parameters

TObject

The type of the object.

TKey

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupObservableSelector Func<TObject, IObservable<TGroupKey>>

The group selector key.

Returns

IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>

An observable which will emit group change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupObservableSelector Func<TObject, TKey, IObservable<TGroupKey>>

The group selector key.

Returns

IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>

An observable which will emit group change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

propertySelector Expression<Func<TObject, TGroupKey>>

The property selector used to group the items.

propertyChangedThrottle TimeSpan?

A time span that indicates the throttle to wait for property change events.

scheduler IScheduler

The scheduler.

Returns

IObservable<IImmutableGroupChangeSet<TObject, TKey, TGroupKey>>

An observable which will emit immutable group change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

propertySelector Expression<Func<TObject, TGroupKey>>

The property selector used to group the items.

propertyChangedThrottle TimeSpan?

A time span that indicates the throttle to wait for property change events.

scheduler IScheduler

The scheduler.

Returns

IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>

An observable which will emit immutable group change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupSelectorKey Func<TObject, TGroupKey>

The group selector key.

regrouper IObservable<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

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupSelectorKey Func<TObject, TGroupKey>

The group selector key.

Returns

IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>

An observable which will emit group change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupSelector Func<TObject, TGroupKey>

The group selector factory.

resultGroupSource IObservable<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

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupSelectorKey Func<TObject, TGroupKey>

The group selector key.

regrouper IObservable<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

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupSelectorKeyObservable IObservable<Func<TObject, TKey, TGroupKey>>

The group selector key observable.

regrouper IObservable<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

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

groupSelectorKeyObservable IObservable<Func<TObject, TGroupKey>>

The group selector key observable.

regrouper IObservable<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

TObject

The type of the object.

TKey

The type of the key.

TGroupKey

The 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

source IObservable<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

TObject

The object of the change set.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

ignoreFunction Func<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

includeFunction Func<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

TObject

The type of the object.

TKey

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<(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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

source ISourceCache<TObject, TKey>

The source.

sizeLimit int

The size limit.

scheduler IScheduler

The scheduler.

Returns

IObservable<IEnumerable<KeyValuePair<TKey, TObject>>>

An observable which emits the key value pairs.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

size int

The size.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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 similiar 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

source IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

comparer IComparer<TObject>

IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IComparer<TObject>, IScheduler?, bool)

Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events 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

source IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

equalityComparer IEqualityComparer<TObject>

IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<TObject>

IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IScheduler?, bool)

Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events 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

source IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

equalityComparer IEqualityComparer<TObject>

IEqualityComparer<T> instance to determine if two elements are the same.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IScheduler?, bool)

Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events 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

source IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The 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 similiar to Merge except it is ChangeSet aware. Merges the source changeset and the collection of other changesets together into a single stream of ChangeSet events 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

others IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Other Observable ChangeSets.

comparer IComparer<TObject>

IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The 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 similiar to Merge except it is ChangeSet aware. Merges the source changeset and the collection of other changesets together into a single stream of ChangeSet events 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

others IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Other Observable ChangeSets.

equalityComparer IEqualityComparer<TObject>

IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<TObject>

IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The 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 similiar to Merge except it is ChangeSet aware. Merges the source changeset and the collection of other changesets together into a single stream of ChangeSet events 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

others IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Other Observable ChangeSets.

equalityComparer IEqualityComparer<TObject>

IEqualityComparer<T> instance to determine if two elements are the same.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IEnumerable<IObservable<IChangeSet<TObject, TKey>>>, IScheduler?, bool)

Operator similiar to Merge except it is ChangeSet aware. Merges the source changeset and the collection of other changesets together into a single stream of ChangeSet events 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

others IEnumerable<IObservable<IChangeSet<TObject, TKey>>>

The Other Observable ChangeSets.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The 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 similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

other IObservable<IChangeSet<TObject, TKey>>

The Other Observable ChangeSet.

comparer IComparer<TObject>

IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The 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 similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

other IObservable<IChangeSet<TObject, TKey>>

The Other Observable ChangeSet.

equalityComparer IEqualityComparer<TObject>

IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<TObject>

IComparer<T> instance to determine which element to emit if the same key is emitted from multiple changesets.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The 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 similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

other IObservable<IChangeSet<TObject, TKey>>

The Other Observable ChangeSet.

equalityComparer IEqualityComparer<TObject>

IEqualityComparer<T> instance to determine if two elements are the same.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, IObservable<IChangeSet<TObject, TKey>>, IScheduler?, bool)

Operator similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

other IObservable<IChangeSet<TObject, TKey>>

The Other Observable ChangeSet.

scheduler IScheduler

(Optional) System.Reactive.Concurrency.IScheduler instance to use when enumerating the collection.

completable bool

Whether 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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>)

Operator similiar 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

source IObservable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

Returns

IObservable<IChangeSet<TObject, TKey>>

The result from merging the changesets together.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>, IComparer<TObject>)

Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events 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

source IObservable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

comparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>)

Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events 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

source IObservable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

equalityComparer IEqualityComparer<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

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

Parameter was null.

MergeChangeSets<TObject, TKey>(IObservable<IObservable<IChangeSet<TObject, TKey>>>, IEqualityComparer<TObject>, IComparer<TObject>)

Operator similiar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events 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

source IObservable<IObservable<IChangeSet<TObject, TKey>>>

The Source Observable ChangeSet.

equalityComparer IEqualityComparer<TObject>

IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, IObservable<IChangeSet<TDestination>>>

Factory Function used to create child changesets.

equalityComparer IEqualityComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, TKey, IObservable<IChangeSet<TDestination>>>

Factory Function used to create child changesets.

equalityComparer IEqualityComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

resortOnSourceRefresh bool

Optional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

resortOnSourceRefresh bool

Optional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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 similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

comparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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 similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

resortOnSourceRefresh bool

Optional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

resortOnSourceRefresh bool

Optional boolean to indicate whether or not a refresh event in the parent stream should re-evaluate item priorities.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

sourceComparer IComparer<TObject>

IComparer<T> instance to determine which source elements child to use when two sources provide a child element with the same key.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

childComparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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 similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

comparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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 similiar 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

source IObservable<IChangeSet<TObject, TKey>>

The Source Observable ChangeSet.

observableSelector Func<TObject, TKey, IObservable<IChangeSet<TDestination, TDestinationKey>>>

Factory Function used to create child changesets.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TObject

The type of the object.

TKey

The type of the key.

TDestination

The type of the destination.

TDestinationKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, IObservable<TDestination>>

The observable selector.

Returns

IObservable<ItemWithValue<TObject, TDestination>>

An observable which emits the item with the value.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, TKey, IObservable<TDestination>>

The observable selector.

Returns

IObservable<ItemWithValue<TObject, TDestination>>

An observable which emits the item with the value.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, IObservable<TDestination>>

The observable selector.

Returns

IObservable<TDestination>

An observable which emits the transformed value.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, TKey, IObservable<TDestination>>

The observable selector.

Returns

IObservable<TDestination>

An observable which emits the transformed value.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<T>

The source.

Returns

IObservable<ConnectionStatus>

An observable which monitors the status of the observable.

Type Parameters

T

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change set values when not empty.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source observable changeset of TObject instances.

suppressEmptyChangeSets bool

Indicates whether or not to suppress changesets that end up being empty after the conversion.

Returns

IObservable<IChangeSet<TDestination, TKey>>

An observable changeset of TDestination where each item was either converted from source or filtered out.

Type Parameters

TObject

The type of the objects in the source changeset.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

addAction Action<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

addAction Action<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

TObject

The type of the object.

TKey

The type of the key.

Remarks

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

refreshAction Action<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

refreshAction Action<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

TObject

The type of the object.

TKey

The type of the key.

Remarks

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

removeAction Action<TObject, TKey>

The remove action that takes the removed value and the key.

invokeOnUnsubscribe bool

Should 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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

removeAction Action<TObject>

The remove action that takes the removed value.

invokeOnUnsubscribe bool

Should 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

TObject

The type of the object.

TKey

The type of the key.

Remarks

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

updateAction Action<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

updateAction Action<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

TObject

The type of the object.

TKey

The type of the key.

Remarks

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

sources IObservableList<IObservableCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<ISourceCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<IObservable<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources ICollection<IObservable<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

others IObservable<IChangeSet<TObject, TKey>>[]

The others.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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.

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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

pageRequests IObservable<IPageRequest>

The page requests.

Returns

IObservable<IPagedChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

observable IObservable<IEnumerable<TObject>>

The observable.

Returns

IDisposable

A disposable which will unsubscribe from the source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

observable IObservable<TObject>

The observable.

Returns

IDisposable

A disposable which will unsubscribe from the source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

destination LockFreeObservableCache<TObject, TKey>

The destination.

Returns

IDisposable

A disposable which will unsubscribe from the source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

destination IIntermediateCache<TObject, TKey>

The destination.

Returns

IDisposable

A disposable which will unsubscribe from the source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

destination ISourceCache<TObject, TKey>

The destination.

Returns

IDisposable

A disposable which will unsubscribe from the source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IQuery<TObject, TKey>>

An observable which emits the query.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

resultSelector Func<IQuery<TObject, TKey>, TDestination>

The result selector.

Returns

IObservable<TDestination>

An observable which emits the destination values.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

itemChangedTrigger Func<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

TObject

The type of the object.

TKey

The type of the key.

TValue

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets that are ref counted.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

items IEnumerable<TObject>

The items.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

item TObject

The item.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

key TKey

The key.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject>>

An observable which emits change sets.

Type Parameters

TObject

The type of object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

keys IEnumerable<TKey>

The keys.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IIntermediateCache<TObject, TKey>

The source.

keys IEnumerable<TKey>

The keys.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IIntermediateCache<TObject, TKey>

The source.

key TKey

The key.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

items IEnumerable<TObject>

The items.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

keys IEnumerable<TKey>

The keys.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

item TObject

The item.

Type Parameters

TObject

The type of the object.

TKey

The 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

source ISourceCache<TObject, TKey>

The source.

key TKey

The key.

Type Parameters

TObject

The type of the object.

TKey

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

left IObservable<IChangeSet<TLeft, TLeftKey>>

The left data source.

right IObservable<IChangeSet<TRight, TRightKey>>

The right data source.

rightKeySelector Func<TRight, TLeftKey>

Specify the foreign key on the right data source.

resultSelector Func<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

TLeft

The object type of the left data source.

TLeftKey

The key type of the left data source.

TRight

The object type of the right data source.

TRightKey

The key type of the right data source.

TDestination

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

targetList IList<TObject>

The list to bind to.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

targetList IList<TObject>

The list to bind to.

options SortAndBindOptions

Bind and sort default options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

targetList IList<TObject>

The list to bind to.

comparer IComparer<TObject>

The comparer to order the resulting dataset.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

targetList IList<TObject>

The list to bind to.

comparer IComparer<TObject>

The comparer to order the resulting dataset.

options SortAndBindOptions

Bind and sort default options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

targetList IList<TObject>

The list to bind to.

comparerChanged IObservable<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

targetList IList<TObject>

The list to bind to.

comparerChanged IObservable<IComparer<TObject>>

An observable of comparers which enables the sort order to be changed.

options SortAndBindOptions

Bind and sort default options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

options SortAndBindOptions

Bind and sort default options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

comparer IComparer<TObject>

The comparer to order the resulting dataset.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

comparer IComparer<TObject>

The comparer to order the resulting dataset.

options SortAndBindOptions

Bind and sort default options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

comparerChanged IObservable<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

readOnlyObservableCollection ReadOnlyObservableCollection<TObject>

The resulting read only observable collection.

comparerChanged IObservable<IComparer<TObject>>

An observable of comparers which enables the sort order to be changed.

options SortAndBindOptions

Bind and sort default options.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit change sets.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

expression Func<TObject, IComparable>

The expression.

sortOrder SortDirection

The sort order. Defaults to ascending.

sortOptimisations SortOptimisations

The sort optimisations.

resetThreshold int

The reset threshold.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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.

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

comparer IComparer<TObject>

The comparer.

sortOptimisations SortOptimisations

Sort optimisation flags. Specify one or more sort optimisations.

resetThreshold int

The 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

TObject

The type of the object.

TKey

The 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.

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

comparer IComparer<TObject>

The comparer to sort on.

resorter IObservable<Unit>

Signal to instruct the algorithm to re-sort the entire data set.

sortOptimisations SortOptimisations

The sort optimisations.

resetThreshold int

The reset threshold.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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.

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

comparerObservable IObservable<IComparer<TObject>>

The comparer observable.

sortOptimisations SortOptimisations

The sort optimisations.

resetThreshold int

The reset threshold.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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.

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

source IObservable<IChangeSet<TObject, TKey>>

The source.

comparerObservable IObservable<IComparer<TObject>>

The comparer observable.

resorter IObservable<Unit>

Signal to instruct the algorithm to re-sort the entire data set.

sortOptimisations SortOptimisations

The sort optimisations.

resetThreshold int

The reset threshold.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IReadOnlyCollection<T>>

The source read only collection.

Returns

IObservable<IReadOnlyCollection<T>>

A read only collection.

Type Parameters

T

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source observable change set.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The object of the change set.

TKey

The 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

source IObservable<IPagedChangeSet<TObject, TKey>>

The source observable change set.

Returns

IObservable<IPagedChangeSet<TObject, TKey>>

An observable which emits paged change sets.

Type Parameters

TObject

The object of the change set.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source observable change set.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which emits sorted change sets.

Type Parameters

TObject

The object of the change set.

TKey

The 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

source IObservable<IVirtualChangeSet<TObject, TKey>>

The source observable change set.

Returns

IObservable<IVirtualChangeSet<TObject, TKey>>

An observable which emits virtual change sets.

Type Parameters

TObject

The object of the change set.

TKey

The 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

source IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>

The source observable change set.

Returns

IObservable<IGroupChangeSet<TObject, TKey, TGroupKey>>

An observable which emits group change sets.

Type Parameters

TObject

The object of the change set.

TKey

The key of the change set.

TGroupKey

The 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

source IObservable<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

TObject

The object of the change set.

TKey

The key of the change set.

TGroupKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

item TObject

The item.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

item TObject

The item.

key TKey

The key.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

subscriptionFactory Func<TObject, IDisposable>

The subscription function.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

subscriptionFactory Func<TObject, TKey, IDisposable>

The subscription function.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source observable change set.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits change sets.

Type Parameters

TObject

The object of the change set.

TKey

The 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

sources IObservable<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

TObject

The type of the object.

TKey

The 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

sources IObservable<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

Returns

IObservable<IReadOnlyCollection<TObject>>

An observable which emits the read only collection.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IEnumerable<TObject>>

The source.

keySelector Func<TObject, TKey>

The key selector.

expireAfter Func<TObject, TimeSpan?>

Specify on a per object level the maximum time before an object expires from a cache.

limitSizeTo int

Remove the oldest items when the size has reached this limit.

scheduler IScheduler

The scheduler (only used for time expiry).

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable change set.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<TObject>

The source.

keySelector Func<TObject, TKey>

The key selector.

expireAfter Func<TObject, TimeSpan?>

Specify on a per object level the maximum time before an object expires from a cache.

limitSizeTo int

Remove the oldest items when the size has reached this limit.

scheduler IScheduler

The scheduler (only used for time expiry).

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which will emit changes.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

key TKey

The key value.

initialOptionalWhenMissing bool

Indicates if an initial Optional None should be emitted if the value doesn't exist.

equalityComparer IEqualityComparer<TObject>

Optional IEqualityComparer<T> instance used to determine if an object value has changed.

Returns

IObservable<Optional<TObject>>

An observable optional.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

key TKey

The key value.

equalityComparer IEqualityComparer<TObject>

Optional IEqualityComparer<T> instance used to determine if an object value has changed.

Returns

IObservable<Optional<TObject>>

An observable optional.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

comparer IComparer<TObject>

The sort comparer.

Returns

IObservable<IReadOnlyCollection<TObject>>

An observable which emits the read only collection.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

sort Func<TObject, TSortKey>

The sort function.

sortOrder SortDirection

The sort order. Defaults to ascending.

Returns

IObservable<IReadOnlyCollection<TObject>>

An observable which emits the read only collection.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TSortKey

The 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<IVirtualChangeSet<TObject, TKey>> Top<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IComparer<TObject> comparer, int size) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source.

comparer IComparer<TObject>

The comparer.

size int

The size.

Returns

IObservable<IVirtualChangeSet<TObject, TKey>>

An observable which will emit virtual change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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.

public static IObservable<IVirtualChangeSet<TObject, TKey>> Top<TObject, TKey>(this IObservable<ISortedChangeSet<TObject, TKey>> source, int size) where TObject : notnull where TKey : notnull

Parameters

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

size int

The size.

Returns

IObservable<IVirtualChangeSet<TObject, TKey>>

An observable which will emit virtual change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, Task<TDestination>>

The transform factory.

options TransformAsyncOptions

The transform options.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, Task<TDestination>>

The transform factory.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Task<TDestination>>

The transform factory.

options TransformAsyncOptions

The transform options.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Task<TDestination>>

The transform factory.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, Task<TDestination>>

The transform factory.

options TransformAsyncOptions

The transform options.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, Task<TDestination>>

The transform factory.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source stream of collection items to be transformed.

transformFactory Func<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

TDestination

The type of collection items produced by the transformation.

TSource

The type of collection items to be transformed.

TKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, Task<IObservableCache<TDestination, TDestinationKey>>>

Async function to transform a TSource and TSourceKey into an IObservableCache<TObject, TKey> of TDestination.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, Task<IEnumerable<TDestination>>>

Async function to transform a TSource into an IEnumerable<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>

Async function to transform a TSource and TSourceKey into an IObservableCache<TObject, TKey> of TDestination.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>>

Async function to transform a TSource and TSourceKey into an IEnumerable<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, Task<TCollection>>

Async function to transform a TSource into an ObservableCollection<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The type of the source key.

TCollection

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, TSourceKey, Task<TCollection>>

Async function to transform a TSource and TSourceKey into an ObservableCollection<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The type of the source key.

TCollection

The 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>?)

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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, Task<IObservableCache<TDestination, TDestinationKey>>>

Async function to transform a TSource into an IObservableCache<TObject, TKey> of TDestination.

errorHandler Action<Error<TSource, TSourceKey>>

Callback function for handling an errors.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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>?)

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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, Task<IEnumerable<TDestination>>>

Async function to transform a TSource into an IEnumerable<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

errorHandler Action<Error<TSource, TSourceKey>>

Callback function for handling an errors.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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>?)

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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, TSourceKey, Task<IObservableCache<TDestination, TDestinationKey>>>

Async function to transform a TSource and TSourceKey into an IObservableCache<TObject, TKey> of TDestination.

errorHandler Action<Error<TSource, TSourceKey>>

Callback function for handling an errors.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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>?)

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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, TSourceKey, Task<IEnumerable<TDestination>>>

Async function to transform a TSource and TSourceKey into an IEnumerable<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

errorHandler Action<Error<TSource, TSourceKey>>

Callback function for handling an errors.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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>?)

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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, Task<TCollection>>

Async function to transform a TSource into an ObservableCollection<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

errorHandler Action<Error<TSource, TSourceKey>>

Callback function for handling an errors.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The type of the source key.

TCollection

The 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>?)

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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, TSourceKey, Task<TCollection>>

Async function to transform a TSource and TSourceKey into an ObservableCollection<T> of TDestination.

keySelector Func<TDestination, TDestinationKey>

The key selector which must be unique across all.

errorHandler Action<Error<TSource, TSourceKey>>

Callback function for handling an errors.

equalityComparer IEqualityComparer<TDestination>

Optional IEqualityComparer<T> instance to determine if two elements are the same.

comparer IComparer<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The type of the source key.

TCollection

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, IObservableCache<TDestination, TDestinationKey>>

Will select an observable cache of values.

keySelector Func<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, IEnumerable<TDestination>>

Will select a enumerable of values.

keySelector Func<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, ObservableCollection<TDestination>>

Will select a enumerable of values.

keySelector Func<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TSourceKey>>

The source.

manySelector Func<TSource, ReadOnlyObservableCollection<TDestination>>

Will select a enumerable of values.

keySelector Func<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

TDestination

The type of the destination.

TDestinationKey

The type of the destination key.

TSource

The type of the source.

TSourceKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source changeset observable.

transformFactory Func<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

TSource

The type of the source changeset.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source changeset observable.

transformFactory Func<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

TSource

The type of the source changeset.

TKey

The type of the key.

TDestination

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, Task<TDestination>>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

The error handler.

options TransformAsyncOptions

Additional transform options.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, Task<TDestination>>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

The error handler.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Task<TDestination>>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

The error handler.

options TransformAsyncOptions

Additional transform options.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Task<TDestination>>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

The error handler.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, Task<TDestination>>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

The error handler.

options TransformAsyncOptions

Additional transform options.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, Task<TDestination>>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

The error handler.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, TDestination>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

Provides the option to safely handle errors without killing the stream.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, TDestination>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

Provides the option to safely handle errors without killing the stream.

forceTransform IObservable<Unit>

Invoke to force a new transform for all items.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

Provides the option to safely handle errors without killing the stream.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

Provides the option to safely handle errors without killing the stream.

forceTransform IObservable<Unit>

Invoke to force a new transform for all items.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, TDestination>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

Provides the option to safely handle errors without killing the stream.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, TDestination>

The transform factory.

errorHandler Action<Error<TSource, TKey>>

Provides the option to safely handle errors without killing the stream.

forceTransform IObservable<Unit>

Invoke to force a new transform for all items.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

pivotOn Func<TObject, TKey>

The pivot on.

predicateChanged IObservable<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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

updateAction Action<TDestination, TSource>

Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

updateAction Action<TDestination, TSource>

Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.

errorHandler Action<Error<TSource, TKey>>

The error handler.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

updateAction Action<TDestination, TSource>

Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.

errorHandler Action<Error<TSource, TKey>>

The error handler.

transformOnRefresh bool

Should a new transform be applied when a refresh event is received.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

updateAction Action<TDestination, TSource>

Apply changes to the original. Example (previousTransformedItem, newOriginalItem) => previousTransformedItem.Value = newOriginalItem.

transformOnRefresh bool

Should a new transform be applied when a refresh event is received.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, TDestination>

The transform factory.

transformOnRefresh bool

Should a new transform be applied when a refresh event is received.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, TDestination>

The transform factory.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, Optional<TSource>, TKey, TDestination>

The transform factory.

forceTransform IObservable<Unit>

Invoke to force a new transform for all items.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

transformOnRefresh bool

Should a new transform be applied when a refresh event is received.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TDestination>

The transform factory.

forceTransform IObservable<Unit>

Invoke to force a new transform for all items.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, TDestination>

The transform factory.

transformOnRefresh bool

Should a new transform be applied when a refresh event is received.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, TDestination>

The transform factory.

forceTransform IObservable<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

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<IChangeSet<TSource, TKey>>

The source.

transformFactory Func<TSource, TKey, TDestination>

The transform factory.

forceTransform IObservable<Unit>

Invoke to force a new transform for all items.

Returns

IObservable<IChangeSet<TDestination, TKey>>

A transformed update collection.

Type Parameters

TDestination

The type of the destination.

TSource

The type of the source.

TKey

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

the same SortedChangeSets, except all moves are replaced with remove + add.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, IObservable<TValue>>

Selector which returns the target observable.

equalityCondition Func<TObject, TValue, bool>

The equality condition.

Returns

IObservable<bool>

An observable which boolean values indicating if true.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TValue

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, IObservable<TValue>>

Selector which returns the target observable.

equalityCondition Func<TValue, bool>

The equality condition.

Returns

IObservable<bool>

An observable which boolean values indicating if true.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TValue

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, IObservable<TValue>>

The observable selector.

equalityCondition Func<TObject, TValue, bool>

The equality condition.

Returns

IObservable<bool>

An observable which boolean values indicating if true.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TValue

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

observableSelector Func<TObject, IObservable<TValue>>

The observable selector.

equalityCondition Func<TValue, bool>

The equality condition.

Returns

IObservable<bool>

An observable which boolean values indicating if true.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TValue

The 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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

Returns

IObservable<ISortedChangeSet<TObject, TKey>>

An observable which emits the sorted change set.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Virtualise<TObject, TKey>(IObservable<ISortedChangeSet<TObject, TKey>>, IObservable<IVirtualRequest>)

Virtualises the underlying data from the specified source.

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

source IObservable<ISortedChangeSet<TObject, TKey>>

The source.

virtualRequests IObservable<IVirtualRequest>

The virirtualising requests.

Returns

IObservable<IVirtualChangeSet<TObject, TKey>>

An observable which will emit virtual change sets.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservableCache<TObject, TKey>

The source.

key TKey

The key.

Returns

IObservable<TObject>

An observable which emits the object value.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

key TKey

The key.

Returns

IObservable<TObject>

An observable which emits the object value.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

key TKey

The key.

Returns

IObservable<Change<TObject, TKey>>

An observable which emits the change.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

propertiesToMonitor string[]

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

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

propertyAccessor Expression<Func<TObject, TValue>>

The property accessor.

notifyOnInitialValue bool

If 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

TObject

The type of the object.

TKey

The type of the key.

TValue

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

propertyAccessor Expression<Func<TObject, TValue>>

The property accessor.

notifyOnInitialValue bool

If true the resulting observable includes the initial value.

Returns

IObservable<TValue>

An observable which emits a value when it has changed.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

TValue

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

reasons ChangeReason[]

The reasons.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set with items not matching the reasons.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

reasons ChangeReason[]

The reasons.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set with items matching the reasons.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<IObservableCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<ISourceCache<TObject, TKey>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources IObservableList<IObservable<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set.

Type Parameters

TObject

The type of the object.

TKey

The 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

sources ICollection<IObservable<IChangeSet<TObject, TKey>>>

The source.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set.

Type Parameters

TObject

The type of the object.

TKey

The 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

source IObservable<IChangeSet<TObject, TKey>>

The source.

others IObservable<IChangeSet<TObject, TKey>>[]

The others.

Returns

IObservable<IChangeSet<TObject, TKey>>

An observable which emits a change set.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Exceptions

ArgumentNullException

source or others.