,System.Func{--0,ReactiveUI.Extensions.Async.IObservableAsync{--1}})} ,System.Func{--0,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask{ReactiveUI.Extensions.Async.IObservableAsync{--1}}})} ,System.Func{--0,ReactiveUI.Extensions.Async.IObservableAsync{--1}},System.Func{--0,--1,--2})}
ObservableAsync.SelectMany(IObservableAsync, Func>) method¶
Defined in
Type: ObservableAsync
Namespace: ReactiveUI.Extensions.Async
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
Overloads¶
- 1.
public static IObservableAsync<TResult> SelectMany<T, TResult>(this IObservableAsync<T> @this, Func<T, IObservableAsync<TResult>> selector) - 2.
public static IObservableAsync<TResult> SelectMany<T, TResult>(this IObservableAsync<T> @this, Func<T, CancellationToken, ValueTask<IObservableAsync<TResult>>> selector) - 3.
public static IObservableAsync<TResult> SelectMany<T, TCollection, TResult>(this IObservableAsync<T> @this, Func<T, IObservableAsync<TCollection>> collectionSelector, Func<T, TCollection, TResult> resultSelector)
1. Overload¶
public static IObservableAsync<TResult> SelectMany<T, TResult>(this IObservableAsync<T> @this, Func<T, IObservableAsync<TResult>> selector)
Summary: Projects each element of the observable sequence to an asynchronous observable sequence and merges the resulting sequences into one observable sequence.
Type parameters
| Name | Description |
|---|---|
T | The type of the elements in the source sequence. |
TResult | The type of the elements in the projected inner sequences. |
Parameters
| Name | Type | Description |
|---|---|---|
this | [IObservableAsync | The source observable sequence. |
selector | Func | A transform function to apply to each element; it returns an observable sequence for each element. |
Returns: IObservableAsync
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if selector is null. |
2. Overload¶
public static IObservableAsync<TResult> SelectMany<T, TResult>(this IObservableAsync<T> @this, Func<T, CancellationToken, ValueTask<IObservableAsync<TResult>>> selector)
Summary: Projects each element of the observable sequence to an asynchronous observable sequence using an asynchronous selector and merges the resulting sequences into one observable sequence.
Type parameters
| Name | Description |
|---|---|
T | The type of the elements in the source sequence. |
TResult | The type of the elements in the projected inner sequences. |
Parameters
| Name | Type | Description |
|---|---|---|
this | [IObservableAsync | The source observable sequence. |
selector | Func | An asynchronous transform function to apply to each element; it returns an observable sequence for each element. |
Returns: IObservableAsync
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if selector is null. |
3. Overload¶
public static IObservableAsync<TResult> SelectMany<T, TCollection, TResult>(this IObservableAsync<T> @this, Func<T, IObservableAsync<TCollection>> collectionSelector, Func<T, TCollection, TResult> resultSelector)
Summary: Projects each element of the observable sequence to an asynchronous observable sequence, merges the resulting sequences, and applies a result selector to each pair of source and inner element.
Type parameters
| Name | Description |
|---|---|
T | The type of the elements in the source sequence. |
TCollection | The type of the elements in the intermediate inner sequences. |
TResult | The type of the elements in the result sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
this | [IObservableAsync | The source observable sequence. |
collectionSelector | Func | A transform function to apply to each element to produce an intermediate observable sequence. |
resultSelector | Func | A transform function to apply to each pair of source element and collection element. |
Returns: IObservableAsync
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if collectionSelector or resultSelector is null. |