Table of Contents

Class ImmediateBindingScheduler

Namespace
SodaFlow.Bindable.ObjectModel
Assembly
SodaFlow.Core.Bindable.ObjectModel.dll

Runs all work on the calling thread. Use this in a unit test, where a notification must be visible immediately and there is no UI thread.

[PublicAPI]
public sealed class ImmediateBindingScheduler : IBindingScheduler
Inheritance
ImmediateBindingScheduler
Implements
Inherited Members
Extension Methods

Remarks

This scheduler runs work on the calling thread, but not in each condition. A run on the calling thread while a transaction is open is what Post(Action) prevents, and the risk exists. SodaFlow calls the source-changed handlers from a listener callback. Thus, a scheduler that always runs on the calling thread raises PropertyChanged in the transaction and lets a handler come back into the graph. A scheduler on a dispatcher cannot do that. A test scheduler that can do it tests a sequence that the true scheduler never makes. A wait for the end of the current transaction costs a test nothing, because the action in the queue runs before the Send that made it returns.

Fields

Instance

The one instance. This type holds no state.

Methods

CheckAccess()
Post(Action)

Runs the action on the calling thread, when no transaction is open.