Skip to content

)} ,System.Int32)}

Observable.Retry(IObservable) method

Defined in

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

Applies to

netstandard2.0

Overloads

  • 1. public static IObservable<TSource> Retry<TSource>(this IObservable<TSource> source)
  • 2. public static IObservable<TSource> Retry<TSource>(this IObservable<TSource> source, int retryCount)

1. Overload

public static IObservable<TSource> Retry<TSource>(this IObservable<TSource> source)

Summary: Repeats the source observable sequence until it successfully terminates.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableObservable sequence to repeat until it successfully terminates.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

2. Overload

public static IObservable<TSource> Retry<TSource>(this IObservable<TSource> source, int retryCount)

Summary: Repeats the source observable sequence the specified number of times or until it successfully terminates.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableObservable sequence to repeat until it successfully terminates.
retryCountintNumber of times to repeat the sequence.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.
System.ArgumentOutOfRangeExceptionretryCount is less than zero.