,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)
Summary: Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence. |
dispatcher | Dispatcher | Dispatcher whose associated message loop is used to notify observers on. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or dispatcher is null. |
2. Overload¶
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Dispatcher dispatcher, DispatcherPriority priority)
Summary: Wraps the source sequence in order to run its observer callbacks on the specified dispatcher.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence. |
dispatcher | Dispatcher | Dispatcher whose associated message loop is used to notify observers on. |
priority | DispatcherPriority | Priority to schedule work items at. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or dispatcher is null. |
3. Overload¶
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherScheduler scheduler)
Summary: Wraps the source sequence in order to run its observer callbacks on the specified dispatcher scheduler.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence. |
scheduler | [DispatcherScheduler](# | Dispatcher scheduler to notify observers on. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or scheduler is null. |
4. Overload¶
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject)
Summary: Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence. |
dispatcherObject | DispatcherObject | Object to get the dispatcher from. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or dispatcherObject is null. |
5. Overload¶
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DispatcherObject dispatcherObject, DispatcherPriority priority)
Summary: Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | Source sequence. |
dispatcherObject | DispatcherObject | Object to get the dispatcher from. |
priority | DispatcherPriority | Priority to schedule work items at. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or dispatcherObject is null. |