Skip to content

,System.Linq.Expressions.Expression,System.IObservable{--1}}})}

Qbservable.RetryWhen(IQbservable, Expression, IObservable>>) method

Defined in

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

Applies to

netstandard2.0

public static IQbservable<TSource> RetryWhen<TSource, TSignal>(this IQbservable<TSource> source, Expression<Func<IObservable<Exception>, IObservable<TSignal>>> handler)

Summary: Retries (resubscribes to) the source observable after a failure and when the observable returned by a handler produces an arbitrary item.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.
TSignalThe arbitrary element type signaled by the handler observable.

Parameters

NameTypeDescription
source[IQbservable](#Observable sequence to repeat until it successfully terminates.
handlerExpression, IObservable>>The function that is called for each observer and takes an observable sequence of errors. It should return an observable of arbitrary items that should signal that arbitrary item in response to receiving the failure Exception from the source observable. If this observable signals a terminal event, the sequence is terminated with that signal instead.

Returns: IQbservable -- An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.
System.ArgumentNullExceptionhandler is null.