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

Converts a .NET event to a queryable observable sequence.

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

Syntax

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

returnValue = provider.FromEvent(addHandler, _
    removeHandler)
public static IQbservable<Unit> FromEvent(
    this IQbservableProvider provider,
    Expression<Action<Action>> addHandler,
    Expression<Action<Action>> removeHandler
)
[ExtensionAttribute]
public:
static IQbservable<Unit>^ FromEvent(
    IQbservableProvider^ provider, 
    Expression<Action<Action^>^>^ addHandler, 
    Expression<Action<Action^>^>^ removeHandler
)
static member FromEvent : 
        provider:IQbservableProvider * 
        addHandler:Expression<Action<Action>> * 
        removeHandler:Expression<Action<Action>> -> IQbservable<Unit> 
public static function FromEvent(
    provider : IQbservableProvider, 
    addHandler : Expression<Action<Action>>, 
    removeHandler : Expression<Action<Action>>
) : IQbservable<Unit>

Parameters

Return Value

Type: System.Reactive.Linq.IQbservable<Unit>
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

Reference

Qbservable Class

FromEvent Overload

System.Reactive.Linq Namespace