Class SourceCacheEx
- Namespace
- DynamicData
- Assembly
- DynamicData.dll
Source cache convenience extensions.
public static class SourceCacheEx
- Inheritance
-
SourceCacheEx
Methods
Cast<TSource, TKey, TDestination>(IObservableCache<TSource, TKey>, Func<TSource, TDestination>)
Connects to the cache, and casts 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 IObservableCache<TSource, TKey> source, Func<TSource, TDestination> converter) where TSource : notnull where TKey : notnull where TDestination : notnull
Parameters
source
IObservableCache<TSource, TKey>The source.
converter
Func<TSource, TDestination>The conversion factory.
Returns
- IObservable<IChangeSet<TDestination, TKey>>
An observable which emits the change set.
Type Parameters
TSource
The type of the object.
TKey
The type of the key.
TDestination
The type of the destination.