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)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Switch(Of TSource) ( _
    sources As IQbservable(Of IObservable(Of TSource)) _
) As IQbservable(Of TSource)
'Usage
Dim sources As IQbservable(Of IObservable(Of TSource))
Dim returnValue As IQbservable(Of TSource)

returnValue = sources.Switch()
public static IQbservable<TSource> Switch<TSource>(
    this IQbservable<IObservable<TSource>> sources
)
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Switch(
    IQbservable<IObservable<TSource>^>^ sources
)
static member Switch : 
        sources:IQbservable<IObservable<'TSource>> -> IQbservable<'TSource> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    The type of source.

Parameters

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 or .

See Also

Reference

Qbservable Class

System.Reactive.Linq Namespace