Observable.FromEvent<TEventArgs> Method (Action<EventHandler<TEventArgs>>, Action<EventHandler<TEventArgs>>)
Namespace: Microsoft.Phone.Reactive
Assembly: Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)
Syntax
'Declaration
Public Shared Function FromEvent(Of TEventArgs As EventArgs) ( _
addHandler As Action(Of EventHandler(Of TEventArgs)), _
removeHandler As Action(Of EventHandler(Of TEventArgs)) _
) As IObservable(Of IEvent(Of TEventArgs))
public static IObservable<IEvent<TEventArgs>> FromEvent<TEventArgs>(
Action<EventHandler<TEventArgs>> addHandler,
Action<EventHandler<TEventArgs>> removeHandler
)
where TEventArgs : EventArgs
public:
generic<typename TEventArgs>
where TEventArgs : EventArgs
static IObservable<IEvent<TEventArgs>^>^ FromEvent(
Action<EventHandler<TEventArgs>^>^ addHandler,
Action<EventHandler<TEventArgs>^>^ removeHandler
)
static member FromEvent :
addHandler:Action<EventHandler<'TEventArgs>> *
removeHandler:Action<EventHandler<'TEventArgs>> -> IObservable<IEvent<'TEventArgs>> when 'TEventArgs : EventArgs
Type Parameters
- TEventArgs
Parameters
- addHandler
Type: System.Action<EventHandler<TEventArgs>>
- removeHandler
Type: System.Action<EventHandler<TEventArgs>>
Return Value
Type: System.IObservable<IEvent<TEventArgs>>
Version Information
.NET for Windows Phone apps
Supported in: Windows Phone 8, Silverlight 8.1
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.