Dispatcher Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides services for maintaining the event queue for a thread.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT..::..Dispatcher

Namespace:  Microsoft.SPOT
Assembly:  Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)

Syntax

'Declaration
Public NotInheritable Class Dispatcher
public sealed class Dispatcher
public ref class Dispatcher sealed
[<Sealed>]
type Dispatcher =  class end
public final class Dispatcher

The Dispatcher type exposes the following members.

Properties

  Name Description
Public propertyStatic member CurrentDispatcher Gets the dispatcher for the thread that is currently executing and creates a new dispatcher if one is not already associated with the current thread.
Public property HasShutdownFinished Determines whether the current dispatcher has finished shutting down.
Public property HasShutdownStarted Determines whether the current dispatcher is shutting down.
Public property Thread Gets the thread with which the current dispatcher is associated.

Top

Methods

  Name Description
Public method BeginInvoke Executes a specified delegate on the thread on which a particular dispatcher was created.
Public method CheckAccess Determines whether the calling thread has access to the current dispatcher.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodStatic member FromThread Gets the dispatcher for a specified thread.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Invoke Executes a specified delegate with a specified argument.
Public method InvokeShutdown Initiates the shutdown process for a dispatcher synchronously.
Public methodStatic member PushFrame Pushes an execution frame onto the event queue of a dispatcher.
Public methodStatic member Run Initiates the event queue of a dispatcher.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method VerifyAccess Determines whether the calling thread has access to the current dispatcher.

Top

Events

  Name Description
Public event ShutdownFinished Occurs when a dispatcher finishes shutting down.
Public event ShutdownStarted Occurs when a dispatcher begins the shutdown process.

Top

Remarks

This class cannot be inherited.

When a Dispatcher object (a dispatcher) is created on a thread, it becomes the only dispatcher that can be associated with that thread, even if the program shuts down the Dispatcher object. If your program shuts down a Dispatcher object, that dispatcher cannot be restarted. If your program calls the BeginInvoke and Invoke methods on a Dispatcher object that has been shut down, an exception is thrown.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SPOT Namespace