Observable.DoWhile(IObservable, Func) method¶
Defined in
Type: Observable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static IObservable<TSource> DoWhile<TSource>(this IObservable<TSource> source, Func<bool> condition)
Summary:
Repeats the given source as long as the specified condition holds, where the condition is evaluated after each repeated source completed.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source to repeat as long as the condition function evaluates to true. |
condition | Func | Condition that will be evaluated upon the completion of an iteration through the source, to determine whether repetition of the source is required. |
Returns: IObservablesource sequence as long as the condition holds.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or condition is null. |