Export (0) Print
Expand All

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

Parameters

addHandler
Type: System.Action(EventHandler)
The action that attaches the given event handler to the underlying .NET event.
removeHandler
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.
Show:
© 2014 Microsoft