Partager via


Observable.FromAsyncPattern, méthode (Func<AsyncCallback, Object, IAsyncResult>, Action<IAsyncResult>)

Convertit une paire de fonctions d’appel Begin/End en fonction asynchrone.

Namespace:System.Reactive.Linq
Assemblée: System.Reactive (en System.Reactive.dll)

Syntaxe

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

Paramètres

Valeur de retour

Type : System.Func<IObservable<Unit>>
Une paire de fonctions d’appel Begin/End.

Voir aussi

Référence

Observable, classe

FromAsyncPattern Overload

Espace de noms System.Reactive.Linq