ChannelDispatcher Konstruktor
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menginisialisasi instans baru kelas ChannelDispatcher.
Overload
ChannelDispatcher(IChannelListener) |
Menginisialisasi instans baru kelas ChannelDispatcher. |
ChannelDispatcher(IChannelListener, String) |
Menginisialisasi instans baru kelas ChannelDispatcher. |
ChannelDispatcher(IChannelListener, String, IDefaultCommunicationTimeouts) |
Menginisialisasi instans baru kelas ChannelDispatcher. |
ChannelDispatcher(IChannelListener)
Menginisialisasi instans baru kelas ChannelDispatcher.
public:
ChannelDispatcher(System::ServiceModel::Channels::IChannelListener ^ listener);
public ChannelDispatcher (System.ServiceModel.Channels.IChannelListener listener);
new System.ServiceModel.Dispatcher.ChannelDispatcher : System.ServiceModel.Channels.IChannelListener -> System.ServiceModel.Dispatcher.ChannelDispatcher
Public Sub New (listener As IChannelListener)
Parameter
- listener
- IChannelListener
IChannelListener untuk dispatcher saluran.
Pengecualian
listener
adalah null
.
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();
IChannelListener icl = serviceHost.ChannelDispatchers[0].Listener;
ChannelDispatcher dispatcher = new ChannelDispatcher(icl);
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 icl As IChannelListener = serviceHost.ChannelDispatchers(0).Listener
Dim dispatcher As New ChannelDispatcher(icl)
Keterangan
Menginisialisasi instans ChannelDispatcher baru kelas dari pendengar yang disediakan, dengan batas waktu default yang disediakan sistem.
Berlaku untuk
ChannelDispatcher(IChannelListener, String)
Menginisialisasi instans baru kelas ChannelDispatcher.
public:
ChannelDispatcher(System::ServiceModel::Channels::IChannelListener ^ listener, System::String ^ bindingName);
public ChannelDispatcher (System.ServiceModel.Channels.IChannelListener listener, string bindingName);
new System.ServiceModel.Dispatcher.ChannelDispatcher : System.ServiceModel.Channels.IChannelListener * string -> System.ServiceModel.Dispatcher.ChannelDispatcher
Public Sub New (listener As IChannelListener, bindingName As String)
Parameter
- listener
- IChannelListener
IChannelListener untuk dispatcher saluran.
- bindingName
- String
Nama pengikatan yang digunakan untuk mengonfigurasi layanan.
Pengecualian
listener
adalah null
.
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();
IChannelListener icl = serviceHost.ChannelDispatchers[0].Listener;
ChannelDispatcher dispatcher = new ChannelDispatcher(icl, "MyTestBinding");
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 icl As IChannelListener = serviceHost.ChannelDispatchers(0).Listener
Dim dispatcher As New ChannelDispatcher(icl, "MyTestBinding")
Keterangan
Menginisialisasi instans ChannelDispatcher baru kelas dari pendengar dan pengikatan yang disediakan, dengan batas waktu default yang disediakan sistem.
Berlaku untuk
ChannelDispatcher(IChannelListener, String, IDefaultCommunicationTimeouts)
Menginisialisasi instans baru kelas ChannelDispatcher.
public:
ChannelDispatcher(System::ServiceModel::Channels::IChannelListener ^ listener, System::String ^ bindingName, System::ServiceModel::IDefaultCommunicationTimeouts ^ timeouts);
public ChannelDispatcher (System.ServiceModel.Channels.IChannelListener listener, string bindingName, System.ServiceModel.IDefaultCommunicationTimeouts timeouts);
new System.ServiceModel.Dispatcher.ChannelDispatcher : System.ServiceModel.Channels.IChannelListener * string * System.ServiceModel.IDefaultCommunicationTimeouts -> System.ServiceModel.Dispatcher.ChannelDispatcher
Public Sub New (listener As IChannelListener, bindingName As String, timeouts As IDefaultCommunicationTimeouts)
Parameter
- listener
- IChannelListener
Untuk IChannelListener layanan.
- bindingName
- String
Nama pengikatan yang digunakan untuk mengonfigurasi layanan.
- timeouts
- IDefaultCommunicationTimeouts
Untuk IDefaultCommunicationTimeouts layanan.
Pengecualian
listener
adalah null
.
Contoh
Uri baseAddress = new Uri("http://localhost:8001/Simple");
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);
WSHttpBinding binding = new WSHttpBinding();
serviceHost.AddServiceEndpoint(
typeof(ICalculator),
binding,
"CalculatorServiceObject");
serviceHost.Open();
IChannelListener icl = serviceHost.ChannelDispatchers[0].Listener;
ChannelDispatcher dispatcher = new ChannelDispatcher(icl, "MyTestBinding", binding);
Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)
Dim binding As New WSHttpBinding()
serviceHost.AddServiceEndpoint(GetType(ICalculator), binding, "CalculatorServiceObject")
serviceHost.Open()
Dim icl As IChannelListener = serviceHost.ChannelDispatchers(0).Listener
Dim dispatcher As New ChannelDispatcher(icl, "MyTestBinding", binding)
Keterangan
Menginisialisasi instans ChannelDispatcher baru kelas dari pendengar dan pengikatan yang disediakan, dengan batas waktu default yang ditentukan.