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

TSource

The type of source.

TResource

The type of resource.

Parameters

provider
Type: System.Reactive.Linq.IQbservableProvider
The local Qbservable provider.
resourceFactory
Type: System.Linq.Expressions.Expression<Func<TResource>>
The factory functions to obtain a resource object.
observableFactory
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.
Show:
© 2014 Microsoft