Qbservable.SelectMany<TSource, TCollection, TResult> Method (IQbservable<TSource>, Expression<Func<TSource, IObservable<TCollection>>>, Expression<Func<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)

Syntax

'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)
public static IQbservable<TResult> SelectMany<TSource, TCollection, TResult>(
    this IQbservable<TSource> source,
    Expression<Func<TSource, IObservable<TCollection>>> collectionSelector,
    Expression<Func<TSource, TCollection, TResult>> resultSelector
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TCollection, typename TResult>
static IQbservable<TResult>^ SelectMany(
    IQbservable<TSource>^ source, 
    Expression<Func<TSource, IObservable<TCollection>^>^>^ collectionSelector, 
    Expression<Func<TSource, TCollection, TResult>^>^ resultSelector
)
static member SelectMany : 
        source:IQbservable<'TSource> * 
        collectionSelector:Expression<Func<'TSource, IObservable<'TCollection>>> * 
        resultSelector:Expression<Func<'TSource, 'TCollection, 'TResult>> -> IQbservable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    The type of source.
  • TCollection
    The type of collection.
  • TResult
    The type of result.

Parameters

Return Value

Type: System.Reactive.Linq.IQbservable<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<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also

Reference

Qbservable Class

SelectMany Overload

System.Reactive.Linq Namespace