The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

Qbservable.FromEvent<TEventArgs>(IQbservableProvider, Expression<Action<Action<TEventArgs>>>, Expression<Action<Action<TEventArgs>>>)

Qbservable.FromEvent<TEventArgs> Method (IQbservableProvider, Expression<Action<Action<TEventArgs>>>, Expression<Action<Action<TEventArgs>>>)

Converts a .NET event to a queryable observable sequence.

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


<ExtensionAttribute> _
Public Shared Function FromEvent(Of TEventArgs) ( _
    provider As IQbservableProvider, _
    addHandler As Expression(Of Action(Of Action(Of TEventArgs))), _
    removeHandler As Expression(Of Action(Of Action(Of TEventArgs))) _
) As IQbservable(Of TEventArgs)
Dim provider As IQbservableProvider
Dim addHandler As Expression(Of Action(Of Action(Of TEventArgs)))
Dim removeHandler As Expression(Of Action(Of Action(Of TEventArgs)))
Dim returnValue As IQbservable(Of TEventArgs)

returnValue = provider.FromEvent(addHandler, _
public static IQbservable<TEventArgs> FromEvent<TEventArgs>(
    this IQbservableProvider provider,
    Expression<Action<Action<TEventArgs>>> addHandler,
    Expression<Action<Action<TEventArgs>>> removeHandler
generic<typename TEventArgs>
static IQbservable<TEventArgs>^ FromEvent(
    IQbservableProvider^ provider, 
    Expression<Action<Action<TEventArgs>^>^>^ addHandler, 
    Expression<Action<Action<TEventArgs>^>^>^ removeHandler
static member FromEvent : 
        provider:IQbservableProvider * 
        addHandler:Expression<Action<Action<'TEventArgs>>> * 
        removeHandler:Expression<Action<Action<'TEventArgs>>> -> IQbservable<'TEventArgs> 
JScript does not support generic types and methods.

Type Parameters

  • TEventArgs
    The type of event.


Return Value

Type: System.Reactive.Linq.IQbservable<TEventArgs>
Observable sequence that contains data representations of invocations of the underlying .NET event.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQbservableProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also


Qbservable Class

FromEvent Overload

System.Reactive.Linq Namespace