ChannelDispatcher.Endpoints Proprietà

Definizione

Ottiene i dispatcher dell'endpoint che inoltrano i messaggi agli endpoint del canale.

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)

Valore della proprietà

SynchronizedCollection<EndpointDispatcher>

Una classe SynchronizedCollection<T> di oggetti EndpointDispatcher che inoltrano i messaggi agli endpoint del canale.

Esempio

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

Commenti

La classe ChannelDispatcher è dotata di un oggetto EndpointDispatcher distinto per ogni endpoint supportato dal canale.

Utilizzare EndpointDispatcher per ottenere l'accesso alle proprietà della fase di esecuzione che consentono di personalizzare la fase di esecuzione in un endpoint.

Si applica a