Observable.FromEventPattern Method (Action(EventHandler), Action(EventHandler))

Converts a .NET event, conforming to the standard .NET event pattern, to an observable sequence with a specified add handler and remove handler.

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

public static function FromEventPattern(
	addHandler : Action<EventHandler>, 
	removeHandler : Action<EventHandler>
) : IObservable<EventPattern<EventArgs>>


Type: System.Action(EventHandler)
The action that attaches the given event handler to the underlying .NET event.
Type: System.Action(EventHandler)
The action that detaches the given event handler from the underlying .NET event.

Return Value

Type: System.IObservable(EventPattern(EventArgs))
The observable sequence that contains data representations of invocations of the underlying .NET event.