The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

ObservableCacheAlias.

SelectSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, Action<Error<TSource, TKey>>, IObservable<Func<TSource, TKey, bool>>) Method

Summary

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.
Namespace
DynamicData.Alias
Containing Type
ObservableCacheAlias

Syntax

public static IObservable<IChangeSet<TDestination, TKey>> SelectSafe<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)

Type Parameters

Name Description
TDestination The type of the destination.
TSource The type of the source.
TKey The type of the key.

Parameters

Name Type Description
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. If not specified the stream will terminate as per rx convention.
forceTransform IObservable<Func<TSource, TKey, bool>> Invoke to force a new transform for items matching the selected objects

Return Value

Type Description
IObservable<IChangeSet<TDestination, TKey>> A transformed update collection