The Dispatcher type exposes the following members.

Constructors

  NameDescription
Public methodDispatcher
Creates a Dispatcher, if a Dispatcher has been created in the current thread an exception will be thrown.

Methods

  NameDescription
Protected methodCheckAccessLimitation (Overrides DispatcherBase..::..CheckAccessLimitation()()()().)
Public methodStatic memberCreateSafeAction<(Of <<'(T>)>>)
Creates a new action based upon an other action which will handle exceptions. Use this to wrap safe action for tasks.
Public methodStatic memberCreateSafeFunction<(Of <<'(T>)>>)
Creates a new function based upon an other function which will handle exceptions. Use this to wrap safe functions for tasks.
Public methodDispatch(Action)
Creates a new Task based upon the given action.
(Inherited from DispatcherBase.)
Public methodDispatch(Task)
Dispatches a given Task.
(Inherited from DispatcherBase.)
Public methodDispatch<(Of <<'(T>)>>)(Func<(Of <<'(T>)>>))
Creates a new Task based upon the given action.
(Inherited from DispatcherBase.)
Public methodDispose
Disposes all dispatcher resources and remaining tasks.
(Overrides DispatcherBase..::..Dispose()()()().)
Public methodProcessNextTask()()()()
Processed the next available task. Only call this inside the thread you want the tasks to process to be processed.
Public methodProcessNextTask(WaitHandle)
Processes the next available tasks and returns true when it has been processed and false otherwise. This method will block until th exitHandle has been set or a task should be processed. Only call this inside the thread you want the tasks to process to be processed.
Public methodProcessTasks()()()()
Processes all remaining tasks. Call this periodically to allow the Dispatcher to handle dispatched tasks. Only call this inside the thread you want the tasks to process to be processed.
Public methodProcessTasks(WaitHandle)
Processes all remaining tasks and returns true when something has been processed and false otherwise. This method will block until th exitHandle has been set or tasks should be processed. Only call this inside the thread you want the tasks to process to be processed.
Protected methodReorderTasks (Inherited from DispatcherBase.)

Extension Methods

  NameDescription
Public Extension MethodRunAsync(String, array<Object>[]()[][])Overloaded.
Starts the given Method as async Task on the given TaskDistributor.
(Defined by ObjectExtension.)
Public Extension MethodRunAsync(String, TaskDistributor, array<Object>[]()[][])Overloaded.
Starts the given Method as async Task on the given TaskDistributor.
(Defined by ObjectExtension.)
Public Extension MethodRunAsync<(Of <<'(T>)>>)(String, array<Object>[]()[][])Overloaded.
Starts the given Method as async Task on the given TaskDistributor.
(Defined by ObjectExtension.)
Public Extension MethodRunAsync<(Of <<'(T>)>>)(String, TaskDistributor, array<Object>[]()[][])Overloaded.
Starts the given Method as async Task on the given TaskDistributor.
(Defined by ObjectExtension.)

Fields

  NameDescription
Public fieldAllowAccessLimitationChecks (Inherited from DispatcherBase.)
Protected fielddataEvent (Inherited from DispatcherBase.)
Protected fieldStatic membermainDispatcher
Protected fieldtaskList (Inherited from DispatcherBase.)
Public fieldTaskSortingSystem
Set the task reordering system
(Inherited from DispatcherBase.)

Properties

  NameDescription
Public propertyStatic memberCurrent
Returns the Dispatcher instance of the current thread. When no instance has been created an exception will be thrown.
Public propertyStatic memberCurrentNoThrow
Returns the Dispatcher instance of the current thread.
Public propertyStatic memberCurrentTask
Returns the task which is currently being processed. Use this only inside a task operation.
Public propertyStatic memberMain
Returns the first created Dispatcher instance, in most cases this will be the Dispatcher for the main thread. When no instance has been created an exception will be thrown.
Public propertyStatic memberMainNoThrow
Returns the first created Dispatcher instance.
Public propertyTaskCount
Returns the currently existing task count. Early aborted tasks will count too.
(Inherited from DispatcherBase.)

See Also