다음을 통해 공유


CustomBinding 생성자

정의

CustomBinding 클래스의 새 인스턴스를 초기화합니다.

오버로드

CustomBinding()

CustomBinding 클래스의 새 인스턴스를 초기화합니다.

CustomBinding(IEnumerable<BindingElement>)

전체 채널 스택의 바인딩 요소를 사용하여 CustomBinding 클래스의 새 인스턴스를 초기화합니다.

CustomBinding(Binding)

지정한 바인딩 값에서 CustomBinding 클래스의 새 인스턴스를 초기화합니다.

CustomBinding(BindingElement[])

바인딩 요소 배열에서 CustomBinding 클래스의 새 인스턴스를 초기화합니다.

CustomBinding(String)

CustomBinding 클래스의 새 인스턴스를 초기화합니다.

CustomBinding(String, String, BindingElement[])

지정된 이름과 네임스페이스를 사용하여 바인딩 요소 배열에서 CustomBinding 클래스의 새 인스턴스를 초기화합니다.

CustomBinding()

Source:
CustomBinding.cs
Source:
CustomBinding.cs
Source:
CustomBinding.cs

CustomBinding 클래스의 새 인스턴스를 초기화합니다.

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

예제

다음 예제에서는 매개 변수가 없는 생성자를 사용하는 방법을 보여줍니다.

적용 대상

CustomBinding(IEnumerable<BindingElement>)

Source:
CustomBinding.cs
Source:
CustomBinding.cs
Source:
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입니다.

예외

bindingElementsInTopDownChannelStackOrder이(가) null인 경우

예제

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)

Source:
CustomBinding.cs
Source:
CustomBinding.cs
Source:
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입니다.

예외

binding이(가) null인 경우

적용 대상

CustomBinding(BindingElement[])

Source:
CustomBinding.cs
Source:
CustomBinding.cs
Source:
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입니다.

예외

bindingElementsInTopDownChannelStackOrder이(가) null인 경우

예제

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

Source:
CustomBinding.cs
Source:
CustomBinding.cs
Source:
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입니다.

예외

bindingElementsInTopDownChannelStackOrder이(가) null인 경우

예제

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)

적용 대상