BindingContext Constructeurs

Définition

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

Surcharges

BindingContext(CustomBinding, BindingParameterCollection)

Initialise une nouvelle instance de la classe BindingContext pour une liaison et une collection de paramètres de liaison spécifiées.Initializes a new instance of the BindingContext class for a specified binding and collection of binding parameters.

BindingContext(CustomBinding, BindingParameterCollection, Uri, String, ListenUriMode)

Initialise une nouvelle instance de la classe BindingContext pour une liaison, une collection de paramètres de liaison et une adresse spécifiées pour le point de terminaison sur lequel le service écoute.Initializes a new instance of the BindingContext class for a specified binding, collection of binding parameters, and address for the endpoint at which the service listens.

BindingContext(CustomBinding, BindingParameterCollection)

Initialise une nouvelle instance de la classe BindingContext pour une liaison et une collection de paramètres de liaison spécifiées.Initializes a new instance of the BindingContext class for a specified binding and collection of binding parameters.

public:
 BindingContext(System::ServiceModel::Channels::CustomBinding ^ binding, System::ServiceModel::Channels::BindingParameterCollection ^ parameters);
public BindingContext (System.ServiceModel.Channels.CustomBinding binding, System.ServiceModel.Channels.BindingParameterCollection parameters);
new System.ServiceModel.Channels.BindingContext : System.ServiceModel.Channels.CustomBinding * System.ServiceModel.Channels.BindingParameterCollection -> System.ServiceModel.Channels.BindingContext
Public Sub New (binding As CustomBinding, parameters As BindingParameterCollection)

Paramètres

binding
CustomBinding

CustomBinding correspondant au canal.The CustomBinding for the channel.

parameters
BindingParameterCollection

BindingParameterCollection correspondant au canal.The BindingParameterCollection for the channel.

Exceptions

binding a la valeur null.binding is null.

Exemples

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)

Remarques

Le constructeur affecte la valeur ListenUriMode à Explicit, l'adresse relative a la valeur Empty et l'adresse de base a la valeur null.The value of ListenUriMode is set to Explicit by this constructor, the relative address is set to Empty, and the base address is set to null.

BindingContext(CustomBinding, BindingParameterCollection, Uri, String, ListenUriMode)

Initialise une nouvelle instance de la classe BindingContext pour une liaison, une collection de paramètres de liaison et une adresse spécifiées pour le point de terminaison sur lequel le service écoute.Initializes a new instance of the BindingContext class for a specified binding, collection of binding parameters, and address for the endpoint at which the service listens.

public:
 BindingContext(System::ServiceModel::Channels::CustomBinding ^ binding, System::ServiceModel::Channels::BindingParameterCollection ^ parameters, Uri ^ listenUriBaseAddress, System::String ^ listenUriRelativeAddress, System::ServiceModel::Description::ListenUriMode listenUriMode);
public BindingContext (System.ServiceModel.Channels.CustomBinding binding, System.ServiceModel.Channels.BindingParameterCollection parameters, Uri listenUriBaseAddress, string listenUriRelativeAddress, System.ServiceModel.Description.ListenUriMode listenUriMode);
new System.ServiceModel.Channels.BindingContext : System.ServiceModel.Channels.CustomBinding * System.ServiceModel.Channels.BindingParameterCollection * Uri * string * System.ServiceModel.Description.ListenUriMode -> System.ServiceModel.Channels.BindingContext

Paramètres

binding
CustomBinding

CustomBinding correspondant au canal.The CustomBinding for the channel.

parameters
BindingParameterCollection

BindingParameterCollection correspondant au canal.The BindingParameterCollection for the channel.

listenUriBaseAddress
Uri

Uri au niveau duquel le point de terminaison de service effectue son écoute.The Uri at which the service endpoint listens.

listenUriRelativeAddress
String

Adresse relative sur laquelle le point de terminaison de service écoute.The relative address at which the service endpoint listens.

listenUriMode
ListenUriMode

ListenUriMode qui indique si le transport doit garantir que l'URI sur lequel doit écouter le service est unique.The ListenUriMode that indicates whether the transport must ensure that the URI provided for the service to listen on is unique.

Exceptions

binding a la valeur null.binding is null.

ListenUriMode n'est pas définie.The ListenUriMode is not defined.

Exemples

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
Uri baseAddress = new Uri("http://MyServer/Base");
string relAddress = "MyService";
BindingContext context = new BindingContext(binding, bpCol, baseAddress, relAddress, ListenUriMode.Explicit);
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim baseAddress As New Uri("http://MyServer/Base")
Dim relAddress As String = "MyService"
Dim context As New BindingContext(binding, bpCol, baseAddress, relAddress, ListenUriMode.Explicit)

S’applique à