},DynamicData.IChangeSetAdaptor{--0,--1})} },DynamicData.ISortedChangeSetAdaptor{--0,--1})}
ObservableCacheEx.Adapt(IObservable>, IChangeSetAdaptor) method¶
Defined in
Type: ObservableCacheEx
Namespace: DynamicData
Assembly: DynamicData.dll
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, net471
Overloads¶
- 1.
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 - 2.
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
1. Overload¶
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
Summary:
Injects a side effect into the changeset stream by calling adaptor.Adapt
for every changeset, then forwarding it downstream unchanged.
Type parameters
| Name | Description |
|---|---|
TObject | The type of items in the cache. |
TKey | The type of the key. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source IObservable<IChangeSet<TObject, TKey>> to observe and adapt. |
adaptor | [IChangeSetAdaptor | The [IChangeSetAdaptor](# whose Adapt method is called for each changeset. |
Returns: IObservablesource, after the adaptor has processed each one.
Remarks
This is a thin wrapper around Rx's Do operator. The adaptor receives each changeset
as a side effect; the changeset itself is forwarded downstream unmodified.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or adaptor is null. |
See also
- DynamicData.ObservableCacheEx.Adapt
2(System.IObservable{DynamicData.ISortedChangeSet{0,1}},DynamicData.ISortedChangeSetAdaptor{0,``1}) - DynamicData.ObservableCacheEx.Bind
2(System.IObservable{DynamicData.IChangeSet{0,1}},DynamicData.Binding.IObservableCollection{0},DynamicData.Binding.IObservableCollectionAdaptor{0,1})
2. Overload¶
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
:material-source-branch: View source
Inherited documentation
These docs were inherited from ObservableCacheEx. The member doesn't override them on this type.
Summary:
Injects a side effect into the changeset stream by calling adaptor.Adapt
for every changeset, then forwarding it downstream unchanged.
Type parameters
| Name | Description |
|---|---|
TObject | The type of items in the cache. |
TKey | The type of the key. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source IObservable<ISortedChangeSet<TObject, TKey>> to observe and adapt. |
adaptor | [ISortedChangeSetAdaptor | The [ISortedChangeSetAdaptor](# whose Adapt method is called for each changeset. |
Returns: IObservablesource, after the adaptor has processed each one.
Remarks
This overload operates on ISortedChangeSet. Delegates to Rx's Do operator.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or adaptor is null. |
See also
- DynamicData.ObservableCacheEx.Adapt
2(System.IObservable{DynamicData.ISortedChangeSet{0,1}},DynamicData.ISortedChangeSetAdaptor{0,``1}) - DynamicData.ObservableCacheEx.Bind
2(System.IObservable{DynamicData.IChangeSet{0,1}},DynamicData.Binding.IObservableCollection{0},DynamicData.Binding.IObservableCollectionAdaptor{0,1})