Observable.FromEvent<TEventArgs-Methode> (Action<Action<TEventArgs>>, Action<<TEventArgs>>)
Konvertiert ein .NET-Ereignis in eine beobachtbare Sequenz.
Namespace:System.Reactive.Linq
Versammlung: System.Reactive (in System.Reactive.dll)
Syntax
'Declaration
Public Shared Function FromEvent(Of TEventArgs) ( _
addHandler As Action(Of Action(Of TEventArgs)), _
removeHandler As Action(Of Action(Of TEventArgs)) _
) As IObservable(Of TEventArgs)
'Usage
Dim addHandler As Action(Of Action(Of TEventArgs))
Dim removeHandler As Action(Of Action(Of TEventArgs))
Dim returnValue As IObservable(Of TEventArgs)
returnValue = Observable.FromEvent(addHandler, _
removeHandler)
public static IObservable<TEventArgs> FromEvent<TEventArgs>(
Action<Action<TEventArgs>> addHandler,
Action<Action<TEventArgs>> removeHandler
)
public:
generic<typename TEventArgs>
static IObservable<TEventArgs>^ FromEvent(
Action<Action<TEventArgs>^>^ addHandler,
Action<Action<TEventArgs>^>^ removeHandler
)
static member FromEvent :
addHandler:Action<Action<'TEventArgs>> *
removeHandler:Action<Action<'TEventArgs>> -> IObservable<'TEventArgs>
JScript does not support generic types and methods.
Typparameter
- TEventArgs
Art des Ereignisses.
Parameter
- Addhandler
Typ: System.Action<Action TEventArgs<>>
Aktion, die den angegebenen Ereignishandler an das zugrunde liegende .NET-Ereignis anfügt.
- Removehandler
Typ: System.Action<Action TEventArgs<>>
Aktion, die den angegebenen Ereignishandler vom zugrunde liegenden .NET-Ereignis trennt.
Rückgabewert
Typ: System.IObservable<TEventArgs>
Beobachtbare Sequenz, die Datendarstellungen von Aufrufen des zugrunde liegenden .NET-Ereignisses enthält.