Bagikan melalui


ChannelDispatcher.Endpoints Properti

Definisi

Mendapatkan dispatcher titik akhir yang meneruskan pesan ke titik akhir saluran.

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)

Nilai Properti

yang SynchronizedCollection<T>EndpointDispatcher meneruskan pesan ke titik akhir saluran.

Contoh

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

Keterangan

ChannelDispatcher memiliki perbedaan EndpointDispatcher untuk setiap titik akhir yang dapat didukung saluran.

EndpointDispatcher Gunakan untuk mendapatkan akses ke properti runtime yang memungkinkan Anda menyesuaikan runtime di seluruh titik akhir.

Berlaku untuk