Qbservable.Switch<TSource> Method

Transforms a queryable observable sequence of queryable observable sequences into a queryable observable sequence producing values only from the most recent queryable observable sequence.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive.Providers (in System.Reactive.Providers.dll)

public static IQbservable<TSource> Switch<TSource>(
	this IQbservable<IObservable<TSource>> sources
)

Type Parameters

TSource

The type of source.

Parameters

sources
Type: System.Reactive.Linq.IQbservable<IObservable<TSource>>
The queryable observable sequence of inner observable sequences.

Return Value

Type: System.Reactive.Linq.IQbservable<TSource>
The queryable observable sequence that at any point in time produces the elements of the most recent inner queryable observable sequence that has been received.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQbservable<IObservable<TSource>>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103).aspx or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.
Show: