Export (0) Print
Expand All
Expand Minimize

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)

public static IQbservable<TSource> Using<TSource, TResource>(
	this IQbservableProvider provider,
	Expression<Func<TResource>> resourceFactory,
	Expression<Func<TResource, IObservable<TSource>>> observableFactory

Type Parameters


The type of source.


The type of resource.


Type: System.Reactive.Linq.IQbservableProvider
The local Qbservable provider.
Type: System.Linq.Expressions.Expression<Func<TResource>>
The factory functions to obtain a resource object.
Type: System.Linq.Expressions.Expression<Func<TResource, IObservable<TSource>>>
The factory function to obtain a queryable observable sequence that depends on the obtained resource.

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 http://msdn.microsoft.com/en-us/library/bb384936(v=vs.103).aspx or http://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.
© 2014 Microsoft