Observable.FromAsyncPattern<, méthode TResult> (Func<AsyncCallback, Object, IAsyncResult>, Func<IAsyncResult, TResult>)
Convertit une paire de fonctions d’appel Begin/End en fonction asynchrone.
Espace de noms :System.Reactive.Linq
Assemblée: System.Reactive (en System.Reactive.dll)
Syntaxe
'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.
Paramètres de type
- TResult
Type de résultat.
Paramètres
- begin
Type : System.Func<AsyncCallback, Object, IAsyncResult>
Fonction begin invoke.
- end
Type : System.Func<IAsyncResult, TResult>
Fonction d’appel de fin.
Valeur de retour
Type : System.Func<IObservable<TResult>>
Une paire de fonctions d’appel Début/Fin.