BindingContext 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 BindingContext.
Overload
BindingContext(CustomBinding, BindingParameterCollection) |
Menginisialisasi instans BindingContext baru kelas untuk pengikatan dan pengumpulan parameter pengikatan tertentu. |
BindingContext(CustomBinding, BindingParameterCollection, Uri, String, ListenUriMode) |
Menginisialisasi instans BindingContext baru kelas untuk pengikatan tertentu, pengumpulan parameter pengikatan, dan alamat untuk titik akhir di mana layanan mendengarkan. |
BindingContext(CustomBinding, BindingParameterCollection)
- Sumber:
- BindingContext.cs
- Sumber:
- BindingContext.cs
- Sumber:
- BindingContext.cs
Menginisialisasi instans BindingContext baru kelas untuk pengikatan dan pengumpulan parameter pengikatan tertentu.
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)
Parameter
- binding
- CustomBinding
Untuk CustomBinding saluran.
- parameters
- BindingParameterCollection
Untuk BindingParameterCollection saluran.
Pengecualian
binding
adalah null
.
Contoh
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)
Keterangan
Nilai ListenUriMode diatur ke Explicit oleh konstruktor ini, alamat relatif diatur ke Empty, dan alamat dasar diatur ke null
.
Berlaku untuk
BindingContext(CustomBinding, BindingParameterCollection, Uri, String, ListenUriMode)
Menginisialisasi instans BindingContext baru kelas untuk pengikatan tertentu, pengumpulan parameter pengikatan, dan alamat untuk titik akhir di mana layanan mendengarkan.
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)
Parameter
- binding
- CustomBinding
Untuk CustomBinding saluran.
- parameters
- BindingParameterCollection
Untuk BindingParameterCollection saluran.
- listenUriRelativeAddress
- String
Alamat relatif tempat titik akhir layanan mendengarkan.
- listenUriMode
- ListenUriMode
ListenUriMode yang menunjukkan apakah transportasi harus memastikan bahwa URI yang disediakan untuk didengarkan layanan unik.
Pengecualian
binding
adalah null
.
ListenUriMode tidak didefinisikan.
Contoh
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)