Skip to content

,System.Object)} ,System.Object,ReactiveUI.Binding.Reactive.IViewThreadInvoker)}

BindingSchedulers.ObserveOnViewThread(IObservable, object?) method

Defined in

Type: BindingSchedulers Namespace: ReactiveUI.Binding.Reactive Assembly: ReactiveUI.Binding.Reactive.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-tvos18.0, net9.0-maccatalyst18.0, net9.0-ios18.0, net9.0-macos15.0, net9.0-desktop1.0, net8.0, net8.0-macos14.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, netstandard2.1, net481, net462, net471

Overloads

  • 1. public static IObservable<T> ObserveOnViewThread<T>(IObservable<T> source, object? target)
  • 2. public static IObservable<T> ObserveOnViewThread<T>(IObservable<T> source, object? target, IViewThreadInvoker fallback)

1. Overload

Attributes: [EditorBrowsable(EditorBrowsableState.1)]

public static IObservable<T> ObserveOnViewThread<T>(IObservable<T> source, object? target)

View source

Summary: Routes an observable onto the thread that owns the object being written to.

Type parameters

NameDescription
TThe type of the observed values.

Parameters

NameTypeDescription
sourceIObservableThe observable feeding a write.
targetobject?The object the write lands on.

Returns: IObservable -- The source itself when no invoker claims the object; otherwise the source routed onto its thread.

2. Overload

Attributes: [EditorBrowsable(EditorBrowsableState.1)]

public static IObservable<T> ObserveOnViewThread<T>(IObservable<T> source, object? target, IViewThreadInvoker fallback)

View source

Summary: Routes an observable onto the thread that owns the object being written to, falling back to a known invoker.

Type parameters

NameDescription
TThe type of the observed values.

Parameters

NameTypeDescription
sourceIObservableThe observable feeding a write.
targetobject?The object the write lands on.
fallback[IViewThreadInvoker](#The invoker for the object's platform, used when no registered invoker claims it.

Returns: IObservable -- The source itself when there is no object to write to; otherwise the source routed onto its thread.