ObservableCacheEx class¶
Defined in
Namespace: DynamicData
Assembly: DynamicData.dll
Full name: DynamicData.ObservableCacheEx
Modifiers: public static
Summary¶
ObservableCache extensions for the virtualised group of operators.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, netstandard2.0, net462
Methods¶
| Name | Summary |
|---|---|
| static Adapt | Inject side effects into the stream using the specified adaptor. |
| static AddOrUpdate | Adds or updates the cache with the specified item. |
| static And | Applied a logical And operator between the collections i.e items which are in all of the sources are included. |
| static AsObservableCache | Converts the source to an read only observable cache. |
| static AsyncDisposeMany | Automatically disposes items within the source collection, upon removal of the collection or teardown of the operator. |
| static AutoRefresh | Automatically refresh downstream operators when any properties change. |
| static AutoRefreshOnObservable | Automatically refresh downstream operator. The refresh is triggered when the observable receives a notification. |
| static Batch | Batches the updates for the specified time period. |
| static BatchIf | Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired. |
| static Bind | Binds the results to the specified observable collection using the default update algorithm. |
| static BufferInitial | Buffers changes for an initial period only. After the period has elapsed, not further buffering occurs. |
| static Cast | Cast the object to the specified type. Alas, I had to add the converter due to type inference issues. |
| static ChangeKey | Changes the primary key. |
| static Clear | Clears all data. |
| static Clone | Clones the changes into the specified collection. |
| static Convert | Convert the object using the specified conversion function. This is a lighter equivalent of Transform and is designed to be used with non-disposable objects. |
| static DeferUntilLoaded | Defer the subscription until the stream has been inflated with data. |
| static DisposeMany | Disposes each item when no longer required. |
| static DistinctValues | Selects distinct values from the source. |
| static EditDiff | 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. |
| static EnsureUniqueKeys | Ensures there are no duplicated keys in the observable changeset. |
| static Except | 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. |
| static ExpireAfter | Automatically removes items from the stream after the time specified by the timeSelector elapses. Return null if the item should never be removed. |
| static Filter | Filters the specified source. |
| static FilterImmutable | Creates a filtered stream, optimized for stateless/deterministic filtering of immutable items. |
| static FilterOnObservable | Filters the stream of changes according to an Observable bool that is created for each item using the specified factory function. |
| static FinallySafe | Ensure that finally is always called. Thanks to Lee Campbell for this. |
| static Flatten | Flattens an update collection to it's individual items. |
| static FlattenBufferResult | Convert the result of a buffer operation to a single change set. |
| static ForEachChange | Provides a call back for each change. |
| static FullJoin | 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... |
| static FullJoinMany | 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. ... |
| static Group | Groups the source on the value returned by group selector factory. A group is included for each item in the resulting group source. |
| static GroupOnObservable | Groups the source by the latest value from their observable created by the given factory. |
| static GroupOnProperty | Groups the source using the property specified by the property selector. Groups are re-applied when the property value changed. |
| static GroupOnPropertyWithImmutableState | 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. |
| static GroupWithImmutableState | Groups the source on the value returned by group selector factory. Each update produces immutable grouping. |
| static IgnoreSameReferenceUpdate | Ignores updates when the update is the same reference. |
| static IgnoreUpdateWhen | 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. |
| static IncludeUpdateWhen | 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. |
| static InnerJoin | 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. |
| static InnerJoinMany | 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.... |
| static InvokeEvaluate | Invokes Refresh method for an object which implements IEvaluateAware. |
| static LeftJoin | Joins the left and right observable data sources, taking all left values and combining any matching right values. |
| static LeftJoinMany | 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... |
| static LimitSizeTo | 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. |
| static MergeMany | Dynamically merges the observable which is selected from each item in the stream, and un-merges the item when it is no longer part of the stream. |
| static MergeChangeSets | Operator similar to Merge except it is ChangeSet aware. All of the observable changesets are merged together into a single stream of ChangeSet events that correctly handles multiple Keys. |
| static MergeManyChangeSets | Operator similar to MergeMany except it is ChangeSet aware. It uses observableSelector to transform each item in the source into a child [IChangeSet](# and merges the... |
| static MergeManyItems | Dynamically merges the observable which is selected from each item in the stream, and un-merges the item when it is no longer part of the stream. |
| static MonitorStatus | Monitors the status of a stream. |
| static NotEmpty | Suppresses updates which are empty. |
| static OfType | Filters an observable changeset so that it only includes items that are of type TDestination. |
| static OnItemAdded | Callback for each item as and when it is being added to the stream. |
| static OnItemRefreshed | Callback for each item as and when it is being refreshed in the stream. |
| static OnItemRemoved | Callback for each item/key as and when it is being removed from the stream. |
| static OnItemUpdated | Callback when an item has been updated eg. (current, previous)=>{}. |
| static Or | Apply a logical Or operator between the collections i.e items which are in any of the sources are included. |
| static PopulateFrom | Populate a cache from an observable stream. |
| static PopulateInto | Populates a source into the specified cache. |
| static QueryWhenChanged | The latest copy of the cache is exposed for querying after each modification to the underlying data. |
| static RefCount | Cache equivalent to Publish().RefCount(). The source is cached so long as there is at least 1 subscriber. |
| static Refresh | Signal observers to re-evaluate the specified item. |
| static Remove | Removes the specified item from the cache. |
| static RemoveKey | Removes the key which enables all observable list features of dynamic data. |
| static RemoveKeys | Removes the specified keys from the cache. Any keys not contained in the cache are ignored. |
| static RightJoin | Joins the left and right observable data sources, taking all right values and combining any matching left values. |
| static RightJoinMany | 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... |
| static SkipInitial | Defer the subscription until loaded and skip initial change set. |
| static Sort | 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... |
| static SortBy | Sorts a sequence by selected property. |
| static StartWithEmpty | Prepends an empty change set to the source. |
| static StartWithItem | The equivalent of rx StartsWith operator, but wraps the item in a change where reason is ChangeReason.Add. |
| static SubscribeMany | 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. |
| static SuppressRefresh | Suppress refresh notifications. |
| static Switch | 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... |
| static ToCollection | Converts the change set into a fully formed collection. Each change in the source results in a new collection. |
| static ToObservableChangeSet | Converts the observable to an observable change set. Change set observes observable change events. |
| static ToObservableOptional | Converts an observable change set into an observable optional that emits the value for the given key. |
| static ToSortedCollection | Converts the change set into a fully formed sorted collection. Each change in the source results in a new sorted collection. |
| static Transform | Projects each update item to a new form using the specified transform function. |
| static TransformAsync | Projects each update item to a new form using the specified transform function. |
| static TransformImmutable | Projects each update item to a new form using the specified transform function, with optimizations for stateless/deterministic transformation of immutable items. |
| static TransformMany | Equivalent to a select many transform. To work, the key must individually identify each child. |
| static TransformManyAsync | Extension method similar to [TransformMany][M:DynamicData.ObservableCacheEx.TransformMany--4(System.IObservable},System.Func{--2,System.Collections.Generic.IEnumerable{... |
| static TransformManySafeAsync | Extension method similar to [TransformManyAsync][M:DynamicData.ObservableCacheEx.TransformManyAsync--4(System.IObservable},System.Func{--2,--3,System.Threading.Tasks.Ta... |
| static TransformOnObservable | Transforms each item in the ChangeSet into an Observable that provides the value for the Resulting ChangeSet. |
| static TransformSafe | 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. |
| static TransformSafeAsync | Projects each update item to a new form using the specified transform function. |
| static TransformToTree | Transforms the object to a fully recursive tree, create a hierarchy based on the pivot function. |
| static TransformWithInlineUpdate | 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. |
| static TreatMovesAsRemoveAdd | Converts moves changes to remove + add. |
| static TrueForAll | 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. |
| static TrueForAny | 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 ... |
| static UpdateIndex | Updates the index for an object which implements IIndexAware. |
| static Watch | Returns an observable of any updates which match the specified key, proceeded with the initial cache state. |
| static WatchValue | Watches updates for a single value matching the specified key. |
| static WhenAnyPropertyChanged | Watches each item in the collection and notifies when any of them has changed. |
| static WhenPropertyChanged | Watches each item in the collection and notifies when any of them has changed. |
| static WhenValueChanged | Watches each item in the collection and notifies when any of them has changed. |
| static WhereReasonsAre | Includes changes for the specified reasons only. |
| static WhereReasonsAreNot | Excludes updates for the specified reasons. |
| static Xor | Apply a logical Xor operator between the collections. Items which are only in one of the sources are included in the result. |
| static SortAndBind | Bind sorted data to the specified collection, for an object which implements IComparableTObject>. |
| static SortAndVirtualize | Sort and virtualize the underlying data from the specified source. |
| static Virtualise | Virtualises the underlying data from the specified source. |
| static Top | Limits the size of the result set to the specified number, ordering by the comparer. |
| static SortAndPage | Sort and page the underlying data from the specified source. |
| static Page | Returns the page as specified by the pageRequests observable. |