Qbservable

Qbservable.Using<TSource, TResource> Method

Constructs a queryable observable sequence that depends on a resource object.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Using(Of TSource, TResource) ( _
    provider As IQbservableProvider, _
    resourceFactory As Expression(Of Func(Of TResource)), _
    observableFactory As Expression(Of Func(Of TResource, IObservable(Of TSource))) _
) As IQbservable(Of TSource)
'Usage
Dim provider As IQbservableProvider
Dim resourceFactory As Expression(Of Func(Of TResource))
Dim observableFactory As Expression(Of Func(Of TResource, IObservable(Of TSource)))
Dim returnValue As IQbservable(Of TSource)

returnValue = provider.Using(resourceFactory, _
    observableFactory)
public static IQbservable<TSource> Using<TSource, TResource>(
    this IQbservableProvider provider,
    Expression<Func<TResource>> resourceFactory,
    Expression<Func<TResource, IObservable<TSource>>> observableFactory
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TResource>
static IQbservable<TSource>^ Using(
    IQbservableProvider^ provider, 
    Expression<Func<TResource>^>^ resourceFactory, 
    Expression<Func<TResource, IObservable<TSource>^>^>^ observableFactory
)
static member Using : 
        provider:IQbservableProvider * 
        resourceFactory:Expression<Func<'TResource>> * 
        observableFactory:Expression<Func<'TResource, IObservable<'TSource>>> -> IQbservable<'TSource> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    The type of source.

  • TResource
    The type of resource.

Parameters

Return Value

Type: System.Reactive.Linq.IQbservable<TSource>
The queryable observable sequence whose lifetime controls the lifetime of the dependent resource object.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQbservableProvider. 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