Skip to content

,System.Linq.Expressions.Expression{System.Func{--0,System.IObservable{--0}}})} ,System.Linq.Expressions.Expression{System.Func{--0,System.IObservable{--0}}},System.Reactive.Concurrency.IScheduler)}

QbservableEx.Expand(IQbservable, Expression>>) method

Defined in

Type: QbservableEx Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IQbservable<TSource> Expand<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, IObservable<TSource>>> selector)
  • 2. public static IQbservable<TSource> Expand<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, IObservable<TSource>>> selector, IScheduler scheduler)

1. Overload

Attributes: [Experimental]

public static IQbservable<TSource> Expand<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, IObservable<TSource>>> selector)

Summary: Expands an observable sequence by recursively invoking selector.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence and each of the recursively expanded sources obtained by running the selector function.

Parameters

NameTypeDescription
source[IQbservable](#Source sequence with the initial elements.
selectorExpression>>Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again.

Returns: IQbservable -- An observable sequence containing all the elements produced by the recursive expansion.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or selector is null.

2. Overload

Attributes: [Experimental]

public static IQbservable<TSource> Expand<TSource>(this IQbservable<TSource> source, Expression<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

NameDescription
TSourceThe type of the elements in the source sequence and each of the recursively expanded sources obtained by running the selector function.

Parameters

NameTypeDescription
source[IQbservable](#Source sequence with the initial elements.
selectorExpression>>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: IQbservable -- An observable sequence containing all the elements produced by the recursive expansion.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or selector or scheduler is null.