Observable.SelectMany<TSource, TCollection, TResult> Method (IObservable<TSource>, Func<TSource, IObservable<TCollection>>, Func<TSource, TCollection, TResult>)

March 22, 2012

Projects each value of an observable sequence to an observable sequence, flattens the resulting observable sequences into one observable sequence, and invokes a result selector function on each value therein.

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

public static IObservable<TResult> SelectMany<TSource, TCollection, TResult>(
	this IObservable<TSource> source,
	Func<TSource, IObservable<TCollection>> collectionSelector,
	Func<TSource, TCollection, TResult> resultSelector
)

Type Parameters

TSource
TCollection
TResult

Parameters

source
Type: System.IObservable<TSource>
collectionSelector
Type: System.Func<TSource, IObservable<TCollection>>
resultSelector
Type: System.Func<TSource, TCollection, TResult>

Return Value

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

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IObservable<TSource>. When you use instance method syntax to call this method, omit the first parameter.

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone

Show: