Observable.Using<TSource, TResource> 方法

命名空间:  Microsoft.Phone.Reactive
程序集:  Microsoft.Phone.Reactive(在 Microsoft.Phone.Reactive.dll 中)

语法

声明
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

类型参数

  • TSource
  • TResource

参数

返回值

类型:System.IObservable<TSource>

版本信息

适用于 Windows Phone 应用的 .NET

受以下版本支持:Windows Phone 8、Silverlight 8.1

.NET Framework 安全性

请参阅

参考

Observable 类

Microsoft.Phone.Reactive 命名空间