ChannelDispatcher.Endpoints Vlastnost

Definice

Získá dispečery koncových bodů, které přeposílají zprávy koncovým bodům kanálu.

public:
 property System::Collections::Generic::SynchronizedCollection<System::ServiceModel::Dispatcher::EndpointDispatcher ^> ^ Endpoints { System::Collections::Generic::SynchronizedCollection<System::ServiceModel::Dispatcher::EndpointDispatcher ^> ^ get(); };
public System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.EndpointDispatcher> Endpoints { get; }
member this.Endpoints : System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.EndpointDispatcher>
Public ReadOnly Property Endpoints As SynchronizedCollection(Of EndpointDispatcher)

Hodnota vlastnosti

SynchronizedCollection<EndpointDispatcher>

A SynchronizedCollection<T> z EndpointDispatcher toho přeposílání zpráv koncovým bodům kanálu.

Příklady

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;
Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)

serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

serviceHost.Open()

Dim dispatcher As ChannelDispatcher = CType(serviceHost.ChannelDispatchers(0), ChannelDispatcher)
Dim col As SynchronizedCollection(Of EndpointDispatcher) = dispatcher.Endpoints

Poznámky

Pro ChannelDispatcher každý koncový bod, který může kanál podporovat, má odlišnou hodnotu EndpointDispatcher .

EndpointDispatcher Použijte k získání přístupu k vlastnostem modulu runtime, které umožňují přizpůsobit modul runtime napříč celým koncovým bodem.

Platí pro