ChannelDispatcher.Endpoints Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the endpoint dispatchers which forward messages to the channel endpoints.

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

public SynchronizedCollection<EndpointDispatcher> Endpoints { get; }

Property Value

Type: System.Collections.Generic.SynchronizedCollection<EndpointDispatcher>

A SynchronizedCollection<T> of EndpointDispatcher which forward messages to the channel endpoints.

The ChannelDispatcher has a distinct EndpointDispatcher for each endpoint that the channel can support.

Use the EndpointDispatcher to obtain access to runtime properties that enable you to customize the runtime across an entire endpoint.

Uri baseAddress = new Uri("http://localhost:8001/Simple");
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);

serviceHost.AddServiceEndpoint(
    typeof(ICalculator),
    new WSHttpBinding(),
    "CalculatorServiceObject");

serviceHost.Open();

ChannelDispatcher dispatcher = (ChannelDispatcher)serviceHost.ChannelDispatchers[0];
SynchronizedCollection<EndpointDispatcher> col = dispatcher.Endpoints;

.NET Framework
Available since 3.0
Return to top
Show: