Export (0) Print
Expand All

Observable.FromEvent(TEventArgs) Method (Action(Action(TEventArgs)), Action(Action(TEventArgs)))

Converts a .NET event to an observable sequence.

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

static member FromEvent : 
        addHandler:Action<Action<'TEventArgs>> * 
        removeHandler:Action<Action<'TEventArgs>> -> IObservable<'TEventArgs> 

Type Parameters

TEventArgs

The type of event.

Parameters

addHandler
Type: System.Action(Action(TEventArgs))
Action that attaches the given event handler to the underlying .NET event.
removeHandler
Type: System.Action(Action(TEventArgs))
Action that detaches the given event handler from the underlying .NET event.

Return Value

Type: System.IObservable(TEventArgs)
Observable sequence that contains data representations of invocations of the underlying .NET event.
Show:
© 2014 Microsoft