Sdílet prostřednictvím


ChannelDispatcher Konstruktory

Definice

Inicializuje novou instanci ChannelDispatcher třídy.

Přetížení

ChannelDispatcher(IChannelListener)

Inicializuje novou instanci ChannelDispatcher třídy.

ChannelDispatcher(IChannelListener, String)

Inicializuje novou instanci ChannelDispatcher třídy.

ChannelDispatcher(IChannelListener, String, IDefaultCommunicationTimeouts)

Inicializuje novou instanci ChannelDispatcher třídy.

ChannelDispatcher(IChannelListener)

Inicializuje novou instanci ChannelDispatcher třídy.

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)

Parametry

listener
IChannelListener

Dispečer IChannelListener kanálu.

Výjimky

listener je null.

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();

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)

Poznámky

Inicializuje novou instanci ChannelDispatcher třídy z poskytnutého naslouchacího procesu s výchozími časovými limity poskytovanými systémem.

Platí pro

ChannelDispatcher(IChannelListener, String)

Inicializuje novou instanci ChannelDispatcher třídy.

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)

Parametry

listener
IChannelListener

Dispečer IChannelListener kanálu.

bindingName
String

Název vazby použité ke konfiguraci služby.

Výjimky

listener je null.

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();

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")

Poznámky

Inicializuje novou instanci třídy z poskytnutého naslouchacího ChannelDispatcher procesu a vazby s výchozími časovými limity zadanými systémem.

Platí pro

ChannelDispatcher(IChannelListener, String, IDefaultCommunicationTimeouts)

Inicializuje novou instanci ChannelDispatcher třídy.

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)

Parametry

listener
IChannelListener

Služba IChannelListener je určená pro službu.

bindingName
String

Název vazby použité ke konfiguraci služby.

timeouts
IDefaultCommunicationTimeouts

Služba IDefaultCommunicationTimeouts je určená pro službu.

Výjimky

listener je null.

Příklady

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)

Poznámky

Inicializuje novou instanci ChannelDispatcher třídy z poskytnutého naslouchacího procesu a vazby se zadanými výchozími časovými limity.

Platí pro