Observable.Case<TValue, TResult> Method (Func<TValue>, IDictionary<TValue, IObservable<TResult>>, IObservable<TResult>)

March 22, 2012

Uses selector to determine which source in sources to use; uses the specified default source if no match is found.

Namespace:  Microsoft.Phone.Reactive
Assembly:  Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)

public static IObservable<TResult> Case<TValue, TResult>(
	Func<TValue> selector,
	IDictionary<TValue, IObservable<TResult>> sources,
	IObservable<TResult> defaultSource
)

Type Parameters

TValue
TResult

Parameters

selector
Type: System.Func<TValue>
sources
Type: System.Collections.Generic.IDictionary<TValue, IObservable<TResult>>
defaultSource
Type: System.IObservable<TResult>

Return Value

Type: System.IObservable<TResult>
Returns IObservable<T>.

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone

Show: