Partilhar via


Método TResult Observable.FromAsyncPattern<(Func<AsyncCallback, Object, IAsyncResult>, Func<IAsyncResult, TResult>)>

Converte um par de funções de invocação De início/fim em uma função assíncrona.

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

Sintaxe

'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.

Parâmetros de tipo

  • TResult
    O tipo de resultado.

Parâmetros

Valor Retornado

Tipo: System.Func<IObservable<TResult>>
Um par de funções begin/end invoke.

Consulte Também

Referência

Classe Observável

Sobrecarga de FromAsyncPattern

System.Reactive.Linq Namespace