Share via


SafeDispatcher Class

Definition

Provides services for managing the queue of work items for a UI or non-UI thread for custom Unified Service Desk hosted controls. For internal use only.

public ref class SafeDispatcher : IDisposable
public class SafeDispatcher : IDisposable
type SafeDispatcher = class
    interface IDisposable
Public Class SafeDispatcher
Implements IDisposable
Inheritance
SafeDispatcher
Implements

Remarks

The SafeDispatcher class is a wrapper on the WPF Dispatcher class, and exposes a safe variant for the Invoke, BeginInvoke, and InvokeAsync methods of the Dispatcher class. These methods internally handle any exceptions raised by the delegates called by the methods, and can notify user about the error for handling.

Do not use the SafeDispatcher class directly in your code. It is exposed as a protected property on the DynamicsBaseHostedControl Class, and you should use this property on your custom hosted control instance that is derived from the DynamicsBaseHostedControl Class.

Constructors

SafeDispatcher(String, ApartmentState, Boolean)
SafeDispatcher(String, ApartmentState)
SafeDispatcher(String)

Methods

BeginInvoke(Action, Boolean)
BeginInvoke(Delegate, DispatcherPriority, Object[], Boolean)
BeginInvoke(Delegate, Object[], Boolean)
BeginInvoke(DispatcherPriority, Delegate, Boolean)
BeginInvoke(DispatcherPriority, Delegate, Object, Boolean)
BeginInvoke(DispatcherPriority, Delegate, Object, Object[], Boolean)
Dispose()
Invoke(Action, Boolean, Boolean)
Invoke(Action, DispatcherPriority, Boolean, Boolean)
Invoke(Action, DispatcherPriority, CancellationToken, Boolean, Boolean)
Invoke(Action, DispatcherPriority, CancellationToken, TimeSpan, Boolean, Boolean)
Invoke(Delegate, DispatcherPriority, Object[], Boolean, Boolean)
Invoke(Delegate, Object[], Boolean, Boolean)
Invoke(Delegate, TimeSpan, DispatcherPriority, Object[], Boolean, Boolean)
Invoke(Delegate, TimeSpan, Object[], Boolean, Boolean)
Invoke(DispatcherPriority, Delegate, Boolean, Boolean)
Invoke(DispatcherPriority, Delegate, Object, Boolean, Boolean)
Invoke(DispatcherPriority, Delegate, Object, Object[], Boolean, Boolean)
Invoke(DispatcherPriority, TimeSpan, Delegate, Boolean, Boolean)
Invoke(DispatcherPriority, TimeSpan, Delegate, Object, Boolean, Boolean)
Invoke(DispatcherPriority, TimeSpan, Delegate, Object, Object[], Boolean, Boolean)
Invoke<TResult>(Func<TResult>, Boolean, Boolean)
Invoke<TResult>(Func<TResult>, DispatcherPriority, Boolean, Boolean)
Invoke<TResult>(Func<TResult>, DispatcherPriority, CancellationToken, Boolean, Boolean)
Invoke<TResult>(Func<TResult>, DispatcherPriority, CancellationToken, TimeSpan, Boolean, Boolean)
InvokeAsync(Action, Boolean)
InvokeAsync(Action, DispatcherPriority, Boolean)
InvokeAsync(Action, DispatcherPriority, CancellationToken, Boolean)
InvokeAsync<TResult>(Func<TResult>, Boolean)
InvokeAsync<TResult>(Func<TResult>, DispatcherPriority, Boolean)
InvokeAsync<TResult>(Func<TResult>, DispatcherPriority, CancellationToken, Boolean)

Events

SafeDispatcherUnhandledException

Occurs when a thread exception is thrown and not caught during execution of a delegate by way of Invoke, BeginInvoke, or InvokeAsync.

Applies to