Sdílet prostřednictvím


BindingContext Konstruktory

Definice

Inicializuje novou instanci BindingContext třídy .

Přetížení

BindingContext(CustomBinding, BindingParameterCollection)

Inicializuje novou instanci BindingContext třídy pro zadanou vazbu a kolekci parametrů vazby.

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

Inicializuje novou instanci BindingContext třídy pro zadanou vazbu, kolekci parametrů vazby a adresu pro koncový bod, na kterém služba naslouchá.

BindingContext(CustomBinding, BindingParameterCollection)

Zdroj:
BindingContext.cs
Zdroj:
BindingContext.cs
Zdroj:
BindingContext.cs

Inicializuje novou instanci BindingContext třídy pro zadanou vazbu a kolekci parametrů vazby.

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)

Parametry

binding
CustomBinding

Pro CustomBinding kanál.

Výjimky

binding je null.

Příklady

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)

Poznámky

Hodnota ListenUriMode je nastavena Explicit na tento konstruktor, relativní adresa je nastavena na Emptya základní adresa je nastavena na null.

Platí pro

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

Inicializuje novou instanci BindingContext třídy pro zadanou vazbu, kolekci parametrů vazby a adresu pro koncový bod, na kterém služba naslouchá.

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
Public Sub New (binding As CustomBinding, parameters As BindingParameterCollection, listenUriBaseAddress As Uri, listenUriRelativeAddress As String, listenUriMode As ListenUriMode)

Parametry

binding
CustomBinding

Pro CustomBinding kanál.

listenUriBaseAddress
Uri

Hodnota Uri , na které koncový bod služby naslouchá.

listenUriRelativeAddress
String

Relativní adresa, na které koncový bod služby naslouchá.

listenUriMode
ListenUriMode

Určuje ListenUriMode , jestli přenos musí zajistit, aby identifikátor URI zadaný pro naslouchání službě byl jedinečný.

Výjimky

binding je null.

Hodnota není definována ListenUriMode .

Příklady

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)

Platí pro