Bagikan melalui


Observable.FromAsyncPattern<TResult> Method (Func<AsyncCallback, Object, IAsyncResult>, Func<IAsyncResult, TResult>)

Converts a Begin/End invoke function pair into an asynchronous function.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public Shared Function FromAsyncPattern(Of TResult) ( _
    begin As Func(Of AsyncCallback, Object, IAsyncResult), _
    end As Func(Of IAsyncResult, TResult) _
) As Func(Of IObservable(Of TResult))
'Usage
Dim begin As Func(Of AsyncCallback, Object, IAsyncResult)
Dim end As Func(Of IAsyncResult, TResult)
Dim returnValue As Func(Of IObservable(Of TResult))

returnValue = Observable.FromAsyncPattern(begin, _
    end)
public static Func<IObservable<TResult>> FromAsyncPattern<TResult>(
    Func<AsyncCallback, Object, IAsyncResult> begin,
    Func<IAsyncResult, TResult> end
)
public:
generic<typename TResult>
static Func<IObservable<TResult>^>^ FromAsyncPattern(
    Func<AsyncCallback^, Object^, IAsyncResult^>^ begin, 
    Func<IAsyncResult^, TResult>^ end
)
static member FromAsyncPattern : 
        begin:Func<AsyncCallback, Object, IAsyncResult> * 
        end:Func<IAsyncResult, 'TResult> -> Func<IObservable<'TResult>> 
JScript does not support generic types and methods.

Type Parameters

  • TResult
    The type of result.

Parameters

Return Value

Type: System.Func<IObservable<TResult>>
A Begin/End invoke function pair.

See Also

Reference

Observable Class

FromAsyncPattern Overload

System.Reactive.Linq Namespace