Export (0) Print
Expand All

EndpointDispatcher Class

Represents the run-time object that exposes properties that enable the insertion of run-time extensions or modifications for messages in service applications.

System::Object
  System.ServiceModel.Dispatcher::EndpointDispatcher

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

public ref class EndpointDispatcher

The EndpointDispatcher type exposes the following members.

  NameDescription
Public methodEndpointDispatcher(EndpointAddress, String, String)Initializes a new instance of the EndpointDispatcher class with the specified address, contract name, and contract namespace.
Public methodEndpointDispatcher(EndpointAddress, String, String, Boolean)Initializes a new instance of the EndpointDispatcher class with the specified address, contract name, contract namespace, and whether the endpoint is a public, system endpoint.
Top

  NameDescription
Public propertyAddressFilterGets or sets a System.ServiceModel.Dispatcher::MessageFilter object that is used to identify whether a particular message is destined for the endpoint address.
Public propertyChannelDispatcherGets the associated ChannelDispatcher object, which can be used to inspect or modify other channel-related values and behaviors.
Public propertyContractFilterGets or sets the MessageFilter object that is used to identify whether a message is destined for this contract.
Public propertyContractNameGets the endpoint contract name.
Public propertyContractNamespaceGets the namespace of the endpoint contract.
Public propertyDispatchRuntimeGets the DispatchRuntime object used to inspect, modify, or extend run-time behavior across a service endpoint or a client callback endpoint.
Public propertyEndpointAddressGets the address of the endpoint.
Public propertyFilterPriorityGets or sets the priority of the ContractFilter and the AddressFilter combination when the ChannelDispatcher is selecting endpoints.
Public propertyIsSystemEndpointGets a value that indicates whether the endpoint is created internally by the server and not by the user.
Top

  NameDescription
Public methodSupported in .NET for Windows Store appsEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported in .NET for Windows Store appsFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported in .NET for Windows Store appsMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The EndpointDispatcher and the System.ServiceModel.Dispatcher::DispatchRuntime classes expose the runtime customization points for endpoints in a service. The EndpointDispatcher can be used to control which messages it can process and some endpoint-related information. The DispatchRuntime has a large number of properties used to insert custom extensions into the endpoint-wide runtime.

The EndpointDispatcher object is responsible for processing messages from a System.ServiceModel.Dispatcher::ChannelDispatcher when the destination address of a message matches the AddressFilter property and the message action matches the ContractFilter property. If two EndpointDispatcher objects can accept a message, the FilterPriority property value determines the higher priority endpoint.

Use the EndpointDispatcher object to configure or extend the process of receiving messages from the associated ChannelDispatcher, converting from message objects to objects used as parameters, and invoking an endpoint operation as well as the reverse process.

Typically, the EndpointDispatcher for an endpoint is obtained by implementing the IEndpointBehavior interface, but you can access the EndpointDispatcher from the other behavior interfaces.

You can use the following EndpointDispatcher properties:

The following code example shows the use of EndpointDispatcher to locate the System.ServiceModel.Dispatcher::DispatchRuntime for the endpoint and inserts a custom message inspector using an endpoint behavior.

// IEndpointBehavior Members 
public void AddBindingParameters(ServiceEndpoint serviceEndpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
{
  return;
}

public void ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
{
  behavior.MessageInspectors.Add(new EndpointBehaviorMessageInspector());
}

public void ApplyDispatchBehavior(ServiceEndpoint serviceEndpoint, EndpointDispatcher endpointDispatcher)
{
  endpointDispatcher.DispatchRuntime.MessageInspectors.Add(new EndpointBehaviorMessageInspector());
}

public void Validate(ServiceEndpoint serviceEndpoint)
{
  return;
}

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone 8, Silverlight 8.1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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