,System.Func{--0,System.IObservable{--0}},System.Reactive.Concurrency.IScheduler)} ,System.Func{--0,System.IObservable{--0}})}
ObservableEx.Expand(IObservable, Func>, IScheduler) method¶
Defined in
Type: ObservableEx
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IObservable<TSource> Expand<TSource>(this IObservable<TSource> source, Func<TSource, IObservable<TSource>> selector, IScheduler scheduler) - 2.
public static IObservable<TSource> Expand<TSource>(this IObservable<TSource> source, Func<TSource, IObservable<TSource>> selector)
1. Overload¶
Attributes: [Experimental]
public static IObservable<TSource> Expand<TSource>(this IObservable<TSource> source, Func<TSource, IObservable<TSource>> selector, IScheduler scheduler)
Summary: Expands an observable sequence by recursively invoking selector, using the specified scheduler to enumerate the queue of obtained sequences.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence and each of the recursively expanded sources obtained by running the selector function. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence with the initial elements. |
selector | Func | Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again. |
scheduler | [IScheduler](# | Scheduler on which to perform the expansion by enumerating the internal queue of obtained sequences. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or selector or scheduler is null. |
2. Overload¶
Attributes: [Experimental]
public static IObservable<TSource> Expand<TSource>(this IObservable<TSource> source, Func<TSource, IObservable<TSource>> selector)
Summary: Expands an observable sequence by recursively invoking selector.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence and each of the recursively expanded sources obtained by running the selector function. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence with the initial elements. |
selector | Func | Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or selector is null. |