,System.Linq.Expressions.Expression,System.IObservable{--1}}})}
Qbservable.RepeatWhen(IQbservable, Expression, IObservable>>) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static IQbservable<TSource> RepeatWhen<TSource, TSignal>(this IQbservable<TSource> source, Expression<Func<IObservable<object>, IObservable<TSignal>>> handler)
Summary: Repeatedly resubscribes to the source observable after a normal completion and when the observable returned by a handler produces an arbitrary item.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
TSignal | The arbitrary element type signaled by the handler observable. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Observable sequence to keep repeating when it successfully terminates. |
handler | Expression | The function that is called for each observer and takes an observable sequence of objects. It should return an observable of arbitrary items that should signal that arbitrary item in response to receiving the completion signal from the source observable. If this observable signals a terminal event, the sequence is terminated with that signal instead. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
| System.ArgumentNullException | handler is null. |