Skip to content

,System.Func{--0,System.IObservable{--1}},System.Func{--1,System.IObservable{--2}})}

ReactiveExtensions.SelectManyThen(IObservable, Func>, Func>) method

Defined in

Type: ReactiveExtensions Namespace: ReactiveUI.Extensions Assembly: ReactiveUI.Extensions.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

public static IObservable<TResult> SelectManyThen<TSource, TMid, TResult>(this IObservable<TSource> source, Func<TSource, IObservable<TMid>> first, Func<TMid, IObservable<TResult>> second)

View source

Summary: Chains two one-shot SelectMany projections into a single operator. Replaces .SelectMany(a).SelectMany(b) (2 operator allocations) with 1.

Type parameters

NameDescription
TSourceThe source element type.
TMidThe intermediate element type.
TResultThe final result type.

Parameters

NameTypeDescription
sourceIObservableThe source observable.
firstFunc>First projection: source → intermediate observable.
secondFunc>Second projection: intermediate → result observable.

Returns: IObservable -- A fused two-stage SelectMany observable.