CustomBinding コンストラクター

定義

CustomBinding クラスの新しいインスタンスを初期化します。

オーバーロード

名前 説明
CustomBinding()

CustomBinding クラスの新しいインスタンスを初期化します。

CustomBinding(IEnumerable<BindingElement>)

完全なチャネル スタックのバインド要素を使用して、 CustomBinding クラスの新しいインスタンスを初期化します。

CustomBinding(Binding)

指定したバインディングの値から、 CustomBinding クラスの新しいインスタンスを初期化します。

CustomBinding(BindingElement[])

バインド要素の配列から CustomBinding クラスの新しいインスタンスを初期化します。

CustomBinding(String)

CustomBinding クラスの新しいインスタンスを初期化します。

CustomBinding(String, String, BindingElement[])

指定した名前と名前空間を持つバインド要素の配列から、 CustomBinding クラスの新しいインスタンスを初期化します。

CustomBinding()

ソース:
CustomBinding.cs
ソース:
CustomBinding.cs
ソース:
CustomBinding.cs

CustomBinding クラスの新しいインスタンスを初期化します。

public:
 CustomBinding();
public CustomBinding();
Public Sub New ()

次の例は、パラメーターなしのコンストラクターを使用する方法を示しています。

適用対象

CustomBinding(IEnumerable<BindingElement>)

ソース:
CustomBinding.cs
ソース:
CustomBinding.cs
ソース:
CustomBinding.cs

完全なチャネル スタックのバインド要素を使用して、 CustomBinding クラスの新しいインスタンスを初期化します。

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

パラメーター

bindingElementsInTopDownChannelStackOrder
IEnumerable<BindingElement>

チャネル スタックのバインド要素を上から下の順序で格納するIEnumerable<T>型のBindingElement

例外

bindingElementsInTopDownChannelStackOrdernullです。

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)

適用対象

CustomBinding(Binding)

ソース:
CustomBinding.cs
ソース:
CustomBinding.cs
ソース:
CustomBinding.cs

指定したバインディングの値から、 CustomBinding クラスの新しいインスタンスを初期化します。

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)

パラメーター

binding
Binding

カスタム バインドの初期化に使用される Binding

例外

bindingnullです。

適用対象

CustomBinding(BindingElement[])

ソース:
CustomBinding.cs
ソース:
CustomBinding.cs
ソース:
CustomBinding.cs

バインド要素の配列から CustomBinding クラスの新しいインスタンスを初期化します。

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

パラメーター

bindingElementsInTopDownChannelStackOrder
BindingElement[]

カスタム バインディングの初期化に使用Array型のBindingElement

例外

bindingElementsInTopDownChannelStackOrdernullです。

 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)

適用対象

CustomBinding(String)

CustomBinding クラスの新しいインスタンスを初期化します。

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)

パラメーター

configurationName
String

バインディングの初期化に設定が使用されるconfigurationName要素を識別するbinding属性の値。

例外

configurationNameによって識別されるバインディング要素はnull

適用対象

CustomBinding(String, String, BindingElement[])

ソース:
CustomBinding.cs
ソース:
CustomBinding.cs
ソース:
CustomBinding.cs

指定した名前と名前空間を持つバインド要素の配列から、 CustomBinding クラスの新しいインスタンスを初期化します。

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

パラメーター

name
String

バインディングの名前。

ns
String

バインディングの名前空間。

bindingElementsInTopDownChannelStackOrder
BindingElement[]

カスタム バインディングの初期化に使用Array型のBindingElement

例外

bindingElementsInTopDownChannelStackOrdernullです。

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)

適用対象