Observable.Using<TSource, TResource> Method
Namespace: Microsoft.Phone.Reactive
Assembly: Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)
Syntax
'Declaration
Public Shared Function Using(Of TSource, TResource As IDisposable) ( _
resourceSelector As Func(Of TResource), _
resourceUsage As Func(Of TResource, IObservable(Of TSource)) _
) As IObservable(Of TSource)
public static IObservable<TSource> Using<TSource, TResource>(
Func<TResource> resourceSelector,
Func<TResource, IObservable<TSource>> resourceUsage
)
where TResource : IDisposable
public:
generic<typename TSource, typename TResource>
where TResource : IDisposable
static IObservable<TSource>^ Using(
Func<TResource>^ resourceSelector,
Func<TResource, IObservable<TSource>^>^ resourceUsage
)
static member Using :
resourceSelector:Func<'TResource> *
resourceUsage:Func<'TResource, IObservable<'TSource>> -> IObservable<'TSource> when 'TResource : IDisposable
Type Parameters
- TSource
- TResource
Parameters
- resourceSelector
Type: System.Func<TResource>
- resourceUsage
Type: System.Func<TResource, IObservable<TSource>>
Return Value
Type: System.IObservable<TSource>
Version Information
.NET for Windows Phone apps
Supported in: Windows Phone 8, Silverlight 8.1
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.