CustomBinding Oluşturucular
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
CustomBinding sınıfının yeni bir örneğini başlatır.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| CustomBinding() |
CustomBinding sınıfının yeni bir örneğini başlatır. |
| CustomBinding(IEnumerable<BindingElement>) |
Tam bir kanal yığınından CustomBinding bağlama öğeleriyle sınıfının yeni bir örneğini başlatır. |
| CustomBinding(Binding) |
Belirtilen bağlamanın CustomBinding değerlerinden sınıfının yeni bir örneğini başlatır. |
| CustomBinding(BindingElement[]) |
Bağlama öğeleri dizisinden sınıfının yeni bir örneğini CustomBinding başlatır. |
| CustomBinding(String) |
CustomBinding sınıfının yeni bir örneğini başlatır. |
| CustomBinding(String, String, BindingElement[]) |
Sınıfın CustomBinding yeni bir örneğini belirtilen ad ve ad alanına sahip bağlama öğeleri dizisinden başlatır. |
CustomBinding()
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
CustomBinding sınıfının yeni bir örneğini başlatır.
public:
CustomBinding();
public CustomBinding();
Public Sub New ()
Örnekler
Aşağıdaki örnekte parametresiz oluşturucunun nasıl kullanılacağı gösterilmektedir:
Şunlara uygulanır
CustomBinding(IEnumerable<BindingElement>)
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
Tam bir kanal yığınından CustomBinding bağlama öğeleriyle sınıfının yeni bir örneğini başlatır.
public:
CustomBinding(System::Collections::Generic::IEnumerable<System::ServiceModel::Channels::BindingElement ^> ^ bindingElementsInTopDownChannelStackOrder);
public CustomBinding(System.Collections.Generic.IEnumerable<System.ServiceModel.Channels.BindingElement> bindingElementsInTopDownChannelStackOrder);
new System.ServiceModel.Channels.CustomBinding : seq<System.ServiceModel.Channels.BindingElement> -> System.ServiceModel.Channels.CustomBinding
Public Sub New (bindingElementsInTopDownChannelStackOrder As IEnumerable(Of BindingElement))
Parametreler
- bindingElementsInTopDownChannelStackOrder
- IEnumerable<BindingElement>
IEnumerable<T> Kanal yığınının bağlama öğelerini yukarıdan aşağıya sırasıyla içeren bir türBindingElement.
Özel durumlar
bindingElementsInTopDownChannelStackOrder, null'e eşittir.
Örnekler
Uri baseAddress = new Uri("http://localhost:8000/servicemodelsamples/service");
// Create a ServiceHost for the CalculatorService type and provide the base address.
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);
// Create a custom binding that contains two binding elements.
ReliableSessionBindingElement reliableSession = new ReliableSessionBindingElement();
reliableSession.Ordered = true;
HttpTransportBindingElement httpTransport = new HttpTransportBindingElement();
httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous;
httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
SynchronizedCollection<BindingElement> coll = new SynchronizedCollection<BindingElement>();
coll.Add(reliableSession);
coll.Add(httpTransport);
CustomBinding binding = new CustomBinding(coll);
Dim baseAddress As New Uri("http://localhost:8000/servicemodelsamples/service")
' Create a ServiceHost for the CalculatorService type and provide the base address.
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)
' Create a custom binding that contains two binding elements.
Dim reliableSession As New ReliableSessionBindingElement()
reliableSession.Ordered = True
Dim httpTransport As New HttpTransportBindingElement()
httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous
httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard
Dim coll As New SynchronizedCollection(Of BindingElement)()
coll.Add(reliableSession)
coll.Add(httpTransport)
Dim binding As New CustomBinding(coll)
Şunlara uygulanır
CustomBinding(Binding)
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
Belirtilen bağlamanın CustomBinding değerlerinden sınıfının yeni bir örneğini başlatır.
public:
CustomBinding(System::ServiceModel::Channels::Binding ^ binding);
public CustomBinding(System.ServiceModel.Channels.Binding binding);
new System.ServiceModel.Channels.CustomBinding : System.ServiceModel.Channels.Binding -> System.ServiceModel.Channels.CustomBinding
Public Sub New (binding As Binding)
Parametreler
Özel durumlar
binding, null'e eşittir.
Şunlara uygulanır
CustomBinding(BindingElement[])
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
Bağlama öğeleri dizisinden sınıfının yeni bir örneğini CustomBinding başlatır.
public:
CustomBinding(... cli::array <System::ServiceModel::Channels::BindingElement ^> ^ bindingElementsInTopDownChannelStackOrder);
public CustomBinding(params System.ServiceModel.Channels.BindingElement[] bindingElementsInTopDownChannelStackOrder);
new System.ServiceModel.Channels.CustomBinding : System.ServiceModel.Channels.BindingElement[] -> System.ServiceModel.Channels.CustomBinding
Public Sub New (ParamArray bindingElementsInTopDownChannelStackOrder As BindingElement())
Parametreler
- bindingElementsInTopDownChannelStackOrder
- BindingElement[]
Array Özel bağlamayı başlatmak için kullanılan türüBindingElement.
Özel durumlar
bindingElementsInTopDownChannelStackOrder, null'e eşittir.
Örnekler
Uri baseAddress = new Uri("http://localhost:8000/servicemodelsamples/service");
// Create a ServiceHost for the CalculatorService type and provide the base address.
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);
// Create a custom binding that contains two binding elements.
ReliableSessionBindingElement reliableSession = new ReliableSessionBindingElement();
reliableSession.Ordered = true;
HttpTransportBindingElement httpTransport = new HttpTransportBindingElement();
httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous;
httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
BindingElement[] elements = new BindingElement[2];
elements[0] = reliableSession;
elements[1] = httpTransport;
CustomBinding binding = new CustomBinding(elements);
Dim baseAddress As New Uri("http://localhost:8000/servicemodelsamples/service")
' Create a ServiceHost for the CalculatorService type and provide the base address.
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)
' Create a custom binding that contains two binding elements.
Dim reliableSession As New ReliableSessionBindingElement()
reliableSession.Ordered = True
Dim httpTransport As New HttpTransportBindingElement()
httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous
httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard
Dim elements(1) As BindingElement
elements(0) = reliableSession
elements(1) = httpTransport
Dim binding As New CustomBinding(elements)
Şunlara uygulanır
CustomBinding(String)
CustomBinding sınıfının yeni bir örneğini başlatır.
public:
CustomBinding(System::String ^ configurationName);
public CustomBinding(string configurationName);
new System.ServiceModel.Channels.CustomBinding : string -> System.ServiceModel.Channels.CustomBinding
Public Sub New (configurationName As String)
Parametreler
- configurationName
- String
Bağlamayı configurationName başlatmak için ayarları kullanılan öğesini tanımlayan binding özniteliğin değeri.
Özel durumlar
tarafından configurationName tanımlanan bağlama öğesidir null.
Şunlara uygulanır
CustomBinding(String, String, BindingElement[])
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
- Kaynak:
- CustomBinding.cs
Sınıfın CustomBinding yeni bir örneğini belirtilen ad ve ad alanına sahip bağlama öğeleri dizisinden başlatır.
public:
CustomBinding(System::String ^ name, System::String ^ ns, ... cli::array <System::ServiceModel::Channels::BindingElement ^> ^ bindingElementsInTopDownChannelStackOrder);
public CustomBinding(string name, string ns, params System.ServiceModel.Channels.BindingElement[] bindingElementsInTopDownChannelStackOrder);
new System.ServiceModel.Channels.CustomBinding : string * string * System.ServiceModel.Channels.BindingElement[] -> System.ServiceModel.Channels.CustomBinding
Public Sub New (name As String, ns As String, ParamArray bindingElementsInTopDownChannelStackOrder As BindingElement())
Parametreler
- name
- String
Bağlamanın adı.
- ns
- String
Bağlamanın ad alanı.
- bindingElementsInTopDownChannelStackOrder
- BindingElement[]
Array Özel bağlamayı başlatmak için kullanılan türüBindingElement.
Özel durumlar
bindingElementsInTopDownChannelStackOrder, null'e eşittir.
Örnekler
Uri baseAddress = new Uri("http://localhost:8000/servicemodelsamples/service");
// Create a ServiceHost for the CalculatorService type and provide the base address.
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);
// Create a custom binding that contains two binding elements.
ReliableSessionBindingElement reliableSession = new ReliableSessionBindingElement();
reliableSession.Ordered = true;
HttpTransportBindingElement httpTransport = new HttpTransportBindingElement();
httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous;
httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
BindingElement[] elements = new BindingElement[2];
elements[0] = reliableSession;
elements[1] = httpTransport;
CustomBinding binding = new CustomBinding("MyCustomBinding", "http://localhost/service", elements);
Dim baseAddress As New Uri("http://localhost:8000/servicemodelsamples/service")
' Create a ServiceHost for the CalculatorService type and provide the base address.
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)
' Create a custom binding that contains two binding elements.
Dim reliableSession As New ReliableSessionBindingElement()
reliableSession.Ordered = True
Dim httpTransport As New HttpTransportBindingElement()
httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous
httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard
Dim elements(1) As BindingElement
elements(0) = reliableSession
elements(1) = httpTransport
Dim binding As New CustomBinding("MyCustomBinding", "http://localhost/service", elements)