Compartir a través de


Observable.FromEvent<TDelegate, TEventArgs> (Método) (Func<EventHandler<TEventArgs>, TDelegate>, Action<TDelegate>, Action<TDelegate>)

Espacio de nombres:  Microsoft.Phone.Reactive
Ensamblado:  Microsoft.Phone.Reactive (en Microsoft.Phone.Reactive.dll)

Sintaxis

'Declaración
Public Shared Function FromEvent(Of TDelegate, TEventArgs As EventArgs) ( _
    conversion As Func(Of EventHandler(Of TEventArgs), TDelegate), _
    addHandler As Action(Of TDelegate), _
    removeHandler As Action(Of TDelegate) _
) As IObservable(Of IEvent(Of TEventArgs))
public static IObservable<IEvent<TEventArgs>> FromEvent<TDelegate, TEventArgs>(
    Func<EventHandler<TEventArgs>, TDelegate> conversion,
    Action<TDelegate> addHandler,
    Action<TDelegate> removeHandler
)
where TEventArgs : EventArgs
public:
generic<typename TDelegate, typename TEventArgs>
where TEventArgs : EventArgs
static IObservable<IEvent<TEventArgs>^>^ FromEvent(
    Func<EventHandler<TEventArgs>^, TDelegate>^ conversion, 
    Action<TDelegate>^ addHandler, 
    Action<TDelegate>^ removeHandler
)
static member FromEvent : 
        conversion:Func<EventHandler<'TEventArgs>, 'TDelegate> * 
        addHandler:Action<'TDelegate> * 
        removeHandler:Action<'TDelegate> -> IObservable<IEvent<'TEventArgs>>  when 'TEventArgs : EventArgs

Parámetros de tipo

  • TDelegate
  • TEventArgs

Parámetros

Valor devuelto

Tipo: System.IObservable<IEvent<TEventArgs>>

Información de versión

.NET para aplicaciones de Windows Phone

Compatible con: Windows Phone 8, Silverlight 8.1

Seguridad de .NET Framework

Vea también

Referencia

Observable Clase

FromEvent (Sobrecarga)

Microsoft.Phone.Reactive (Espacio de nombres)