Qbservable.SelectMany(Of TSource, TCollection, TResult) Method (IQbservable(Of TSource), Expression(Of Func(Of TSource, IObservable(Of TCollection))), Expression(Of Func(Of TSource, TCollection, TResult)))

Projects each element of a queryable observable sequence to a queryable observable sequence and flattens the resulting queryable observable sequences into one queryable observable sequence.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive.Providers (in System.Reactive.Providers.dll)

'Declaration
<ExtensionAttribute> _
Public Shared Function SelectMany(Of TSource, TCollection, TResult) ( _
	source As IQbservable(Of TSource), _
	collectionSelector As Expression(Of Func(Of TSource, IObservable(Of TCollection))), _
	resultSelector As Expression(Of Func(Of TSource, TCollection, TResult)) _
) As IQbservable(Of TResult)
'Usage
Dim source As IQbservable(Of TSource)
Dim collectionSelector As Expression(Of Func(Of TSource, IObservable(Of TCollection)))
Dim resultSelector As Expression(Of Func(Of TSource, TCollection, TResult))
Dim returnValue As IQbservable(Of TResult)

returnValue = source.SelectMany(collectionSelector, _
	resultSelector)

Type Parameters

TSource

The type of source.

TCollection

The type of collection.

TResult

The type of result.

Parameters

source
Type: System.Reactive.Linq.IQbservable(Of TSource)
A queryable observable sequence of elements to project.
collectionSelector
Type: System.Linq.Expressions.Expression(Of Func(Of TSource, IObservable(Of TCollection)))
A transform function to apply to each element.
resultSelector
Type: System.Linq.Expressions.Expression(Of Func(Of TSource, TCollection, TResult))
A transform function to apply to each element of the intermediate sequence.

Return Value

Type: System.Reactive.Linq.IQbservable(Of TResult)
A queryable observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQbservable(Of TSource). When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103).aspx or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.
Show: