Skip to content

)} )}

Observable.ToEvent(IObservable) method

Defined in

Type: Observable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IEventSource<Unit> ToEvent(this IObservable<Unit> source)
  • 2. public static IEventSource<TSource> ToEvent<TSource>(this IObservable<TSource> source)

1. Overload

public static IEventSource<Unit> ToEvent(this IObservable<Unit> source)

Summary: Exposes an observable sequence as an object with an Action-based .NET event.

Parameters

NameTypeDescription
sourceIObservableObservable source sequence.

Returns: IEventSource -- The event source object.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

2. Overload

public static IEventSource<TSource> ToEvent<TSource>(this IObservable<TSource> source)

Summary: Exposes an observable sequence as an object with an Action-based .NET event.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableObservable source sequence.

Returns: IEventSource -- The event source object.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.