ChannelDispatcher.Endpoints Property

Definition

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

public System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.EndpointDispatcher> Endpoints { get; }

Property Value

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

Examples

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;

Remarks

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.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1