Observable.Wait(IObservable) method¶
Defined in
Type: Observable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static TSource Wait<TSource>(this IObservable<TSource> source)
Summary: Waits for the observable sequence to complete and returns the last element of the sequence. If the sequence terminates with an OnError notification, the exception is thrown.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source observable sequence. |
Returns: TSource -- The last element in the observable sequence.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
| System.InvalidOperationException | The source sequence is empty. |