Skip to content

,System.Windows.Threading.Dispatcher)} ,System.Windows.Threading.Dispatcher,System.Windows.Threading.DispatcherPriority)} ,System.Reactive.Concurrency.DispatcherScheduler)} ,System.Windows.Threading.DispatcherObject)} ,System.Windows.Threading.DispatcherObject,System.Windows.Threading.DispatcherPriority)}

DispatcherObservable.ObserveOn(IObservable, Dispatcher) method

Defined in

Type: DispatcherObservable Namespace: System.Reactive.Linq Assembly: ReactiveUI.Wpf.dll

Applies to

net462

Overloads

  • 1. public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher)
  • 2. public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher, DispatcherPriority priority)
  • 3. public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherScheduler scheduler)
  • 4. public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject)
  • 5. public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject, DispatcherPriority priority)

1. Overload

public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher)

View source

Summary: Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence.
dispatcherDispatcherDispatcher whose associated message loop is used to notify observers on.

Returns: IObservable -- The source sequence whose observations happen on the specified dispatcher.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or dispatcher is null.

2. Overload

public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher, DispatcherPriority priority)

View source

Summary: Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence.
dispatcherDispatcherDispatcher whose associated message loop is used to notify observers on.
priorityDispatcherPriorityPriority to schedule work items at.

Returns: IObservable -- The source sequence whose observations happen on the specified dispatcher.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or dispatcher is null.

3. Overload

public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherScheduler scheduler)

View source

Summary: Wraps the source sequence in order to run its observer callbacks on the specified dispatcher scheduler.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence.
scheduler[DispatcherScheduler](#Dispatcher scheduler to notify observers on.

Returns: IObservable -- The source sequence whose observations happen on the specified dispatcher scheduler.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or scheduler is null.

4. Overload

public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject)

View source

Summary: Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence.
dispatcherObjectDispatcherObjectObject to get the dispatcher from.

Returns: IObservable -- The source sequence whose observations happen on the specified object's dispatcher.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or dispatcherObject is null.

5. Overload

public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject, DispatcherPriority priority)

View source

Summary: Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence.
dispatcherObjectDispatcherObjectObject to get the dispatcher from.
priorityDispatcherPriorityPriority to schedule work items at.

Returns: IObservable -- The source sequence whose observations happen on the specified object's dispatcher.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or dispatcherObject is null.