Método Observable.FromAsyncPattern (Func<AsyncCallback, Object, IAsyncResult>, Action<IAsyncResult>)
Converte um par de funções de invocação Begin/End em uma função assíncrona.
Namespace:System.Reactive.Linq
Assembly: System.Reactive (em System.Reactive.dll)
Sintaxe
'Declaration
Public Shared Function FromAsyncPattern ( _
begin As Func(Of AsyncCallback, Object, IAsyncResult), _
end As Action(Of IAsyncResult) _
) As Func(Of IObservable(Of Unit))
'Usage
Dim begin As Func(Of AsyncCallback, Object, IAsyncResult)
Dim end As Action(Of IAsyncResult)
Dim returnValue As Func(Of IObservable(Of Unit))
returnValue = Observable.FromAsyncPattern(begin, _
end)
public static Func<IObservable<Unit>> FromAsyncPattern(
Func<AsyncCallback, Object, IAsyncResult> begin,
Action<IAsyncResult> end
)
public:
static Func<IObservable<Unit>^>^ FromAsyncPattern(
Func<AsyncCallback^, Object^, IAsyncResult^>^ begin,
Action<IAsyncResult^>^ end
)
static member FromAsyncPattern :
begin:Func<AsyncCallback, Object, IAsyncResult> *
end:Action<IAsyncResult> -> Func<IObservable<Unit>>
public static function FromAsyncPattern(
begin : Func<AsyncCallback, Object, IAsyncResult>,
end : Action<IAsyncResult>
) : Func<IObservable<Unit>>
Parâmetros
- começar
Tipo: System.Func<AsyncCallback, Object, IAsyncResult>
A função begin invoke.
- end
Tipo: System.Action<IAsyncResult>
A função de invocação final.
Valor Retornado
Tipo:UnidadeIObservável<System.Func<>>
Um par de funções begin/end invoke.