Observable.ToEvent<TSource> Method (IObservable<TSource>)

Exposes an observable sequence as an object with a .NET event with a specified source.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function ToEvent(Of TSource) ( _
    source As IObservable(Of TSource) _
) As IEventSource(Of TSource)
'Usage
Dim source As IObservable(Of TSource)
Dim returnValue As IEventSource(Of TSource)

returnValue = source.ToEvent()
public static IEventSource<TSource> ToEvent<TSource>(
    this IObservable<TSource> source
)
[ExtensionAttribute]
public:
generic<typename TSource>
static IEventSource<TSource>^ ToEvent(
    IObservable<TSource>^ source
)
static member ToEvent : 
        source:IObservable<'TSource> -> IEventSource<'TSource> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    The type of source

Parameters

Return Value

Type: System.Reactive.IEventSource<TSource>
The event source object.

Usage Note

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

See Also

Reference

Observable Class

ToEvent Overload

System.Reactive.Linq Namespace