Click or drag to resize

ThreadWithDispatcher Class

A dedicated thread hosting an active dispatcher.

Creates a thread and starts a dispatcher in this thread. The dispatcher is only accessible after it's fully started.

Inheritance Hierarchy

Namespace: TomsToolbox.Wpf
Assembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public abstract class ThreadWithDispatcher

The ThreadWithDispatcher type exposes the following members.

Constructors
 NameDescription
Protected methodThreadWithDispatcher Initializes a new instance of the ThreadWithDispatcher class.
Top
Properties
 NameDescription
Public propertyDispatcher Gets the dispatcher of the thread.
Public propertyTaskScheduler Gets the task scheduler associated with the Dispatcher
Top
Methods
 NameDescription
Public methodAbortObsolete.
Aborts this instance.
Public methodBeginInvoke(Action) Invokes the specified method asynchronously in the dispatcher thread.
Public methodBeginInvoke(DispatcherPriority, Action) Invokes the specified method asynchronously in the dispatcher thread.
Public methodBeginShutdown Initiates shutdown of the Dispatcher asynchronously.
Public methodCheckAccess Determines whether the calling thread is the thread associated with this Dispatcher.
Public methodInvoke(Action) Invokes the specified method in the dispatcher thread.
Public methodInvokeT(FuncT) Invokes the specified method in the dispatcher thread.
Public methodJoin Blocks the calling thread until the Dispatcher terminates.
Public methodJoin(TimeSpan) Blocks the calling thread until the Dispatcher terminates.
Public methodVerifyAccess Determines whether the calling thread has access to this Dispatcher.
Top
Events
 NameDescription
Public eventTerminated Occurs when the dispatcher is terminated.
Top
Extension Methods
 NameDescription
Public Extension MethodSafeCastT Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions)
Top
See Also