Share via


DispatchRuntime Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Exposes properties that can be used to modify default behavior as well as attach custom objects that can modify how incoming messages are transformed into objects and dispatched to callback operations, when a Silverlight client is using a duplex contract. This class cannot be inherited.

Inheritance Hierarchy

System.Object
  System.ServiceModel.Dispatcher.DispatchRuntime

Namespace:  System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public NotInheritable Class DispatchRuntime
public sealed class DispatchRuntime

The DispatchRuntime type exposes the following members.

Properties

  Name Description
Public property UnhandledDispatchOperation Gets or sets the operation to which unrecognized messages are dispatched.

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
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.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

Use the DispatchRuntime class either to modify the default behavior of a client or to insert objects that implement custom modifications when incoming messages are transformed into objects and those objects are released as callback invocations on a client.

The channel and endpoint dispatchers are the service (or duplex client) components responsible for accepting new channels, receiving messages, and for method dispatch and invocation, and response processing. Each client that participates in duplex communication has an endpoint dispatcher and channel dispatcher for each callback endpoint.The DispatchRuntime enables you to intercept and extend the channel or endpoint dispatcher for all messages across a particular contract, even when a message is not recognized. When a message arrives that does not match any messages declared in the contract, it is dispatched to the operation that was returned by the UnhandledDispatchOperation property. To intercept or extend across all messages for a particular operation, see the DispatchOperation class.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

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.