Skip to content

)}

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

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource observable sequence.

Returns: TSource -- The last element in the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.
System.InvalidOperationExceptionThe source sequence is empty.