ChannelDispatcher Constructeurs

Définition

Initialise une nouvelle instance de la classe ChannelDispatcher.Initializes a new instance of the ChannelDispatcher class.

Surcharges

ChannelDispatcher(IChannelListener)

Initialise une nouvelle instance de la classe ChannelDispatcher.Initializes a new instance of the ChannelDispatcher class.

ChannelDispatcher(IChannelListener, String)

Initialise une nouvelle instance de la classe ChannelDispatcher.Initializes a new instance of the ChannelDispatcher class.

ChannelDispatcher(IChannelListener, String, IDefaultCommunicationTimeouts)

Initialise une nouvelle instance de la classe ChannelDispatcher.Initializes a new instance of the ChannelDispatcher class.

ChannelDispatcher(IChannelListener)

Initialise une nouvelle instance de la classe ChannelDispatcher.Initializes a new instance of the ChannelDispatcher class.

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)

Paramètres

listener
IChannelListener

IChannelListener pour le répartiteur de canal.The IChannelListener for the channel dispatcher.

Exceptions

listener est null.listener is null.

Exemples

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)

Remarques

Initialise une nouvelle instance de la classe ChannelDispatcher à partir de l'écouteur fourni, avec les délais d'attente par défaut fournis par le système.Initializes a new instance of the ChannelDispatcher class from the provided listener, with system-provided default timeouts.

ChannelDispatcher(IChannelListener, String)

Initialise une nouvelle instance de la classe ChannelDispatcher.Initializes a new instance of the ChannelDispatcher class.

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)

Paramètres

listener
IChannelListener

IChannelListener pour le répartiteur de canal.The IChannelListener for the channel dispatcher.

bindingName
String

Nom de la liaison utilisée pour configurer le service.The name of the binding used to configure the service.

Exceptions

listener est null.listener is null.

Exemples

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

Remarques

Initialise une nouvelle instance de la classe ChannelDispatcher à partir de l’écouteur et de la liaison fournis, avec les délais d’attente par défaut fournis par le système.Initializes a new instance of the ChannelDispatcher class from the provided listener and binding, with system-provided default timeouts.

ChannelDispatcher(IChannelListener, String, IDefaultCommunicationTimeouts)

Initialise une nouvelle instance de la classe ChannelDispatcher.Initializes a new instance of the ChannelDispatcher class.

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)

Paramètres

listener
IChannelListener

IChannelListener pour le service.The IChannelListener for the service.

bindingName
String

Nom de la liaison utilisée pour configurer le service.The name of the binding used to configure the service.

Exceptions

listener est null.listener is null.

Exemples

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)

Remarques

Initialise une nouvelle instance de la classe ChannelDispatcher à partir de l’écouteur et de la liaison fournis, avec les délais d’attente par défaut spécifiés.Initializes a new instance of the ChannelDispatcher class from the provided listener and binding, with the specified default timeouts.

S’applique à