共用方式為


Qbservable.FromAsyncPattern 方法 (IQbservableProvider, Expression Func AsyncCallback, Object, IAsyncResult, Expression << Action < IAsyncResult >>>>) <

將 Begin/End invoke 函式配對轉換成非同步函式。

Namespace:System.Reactive.Linq
裝配: System.Reactive.Providers.dll) 中的 System.Reactive.Providers (

語法

'Declaration
<ExtensionAttribute> _
Public Shared Function FromAsyncPattern ( _
    provider As IQbservableProvider, _
    begin As Expression(Of Func(Of AsyncCallback, Object, IAsyncResult)), _
    end As Expression(Of Action(Of IAsyncResult)) _
) As Func(Of IQbservable(Of Unit))
'Usage
Dim provider As IQbservableProvider
Dim begin As Expression(Of Func(Of AsyncCallback, Object, IAsyncResult))
Dim end As Expression(Of Action(Of IAsyncResult))
Dim returnValue As Func(Of IQbservable(Of Unit))

returnValue = provider.FromAsyncPattern(begin, _
    end)
public static Func<IQbservable<Unit>> FromAsyncPattern(
    this IQbservableProvider provider,
    Expression<Func<AsyncCallback, Object, IAsyncResult>> begin,
    Expression<Action<IAsyncResult>> end
)
[ExtensionAttribute]
public:
static Func<IQbservable<Unit>^>^ FromAsyncPattern(
    IQbservableProvider^ provider, 
    Expression<Func<AsyncCallback^, Object^, IAsyncResult^>^>^ begin, 
    Expression<Action<IAsyncResult^>^>^ end
)
static member FromAsyncPattern : 
        provider:IQbservableProvider * 
        begin:Expression<Func<AsyncCallback, Object, IAsyncResult>> * 
        end:Expression<Action<IAsyncResult>> -> Func<IQbservable<Unit>> 
public static function FromAsyncPattern(
    provider : IQbservableProvider, 
    begin : Expression<Func<AsyncCallback, Object, IAsyncResult>>, 
    end : Expression<Action<IAsyncResult>>
) : Func<IQbservable<Unit>>

參數

傳回值

類型:System.Func<IQbservable<單位>>
Begin/End invoke 函式組。

使用注意事項

在 Visual Basic 和 C# 中,您可以在 IQbservableProvider類型的任何物件上呼叫這個方法作為實例方法。 使用執行個體方法語法呼叫這個方法時,請省略第一個參數。 如需詳細資訊,請參閱

另請參閱

參考

Qbservable 類別

FromAsyncPattern 多載

System.Reactive.Linq 命名空間