SafeDispatcher Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Events
SafeDispatcherUnhandledException |
Occurs when a thread exception is thrown and not caught during execution of a delegate by way of Invoke, BeginInvoke, or InvokeAsync. |