Share via


ServiceHost.AddServiceEndpoint 메서드

정의

서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

오버로드

AddServiceEndpoint(Type, Binding, String)

지정된 계약, 바인딩, 엔드포인트 주소를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

AddServiceEndpoint(Type, Binding, Uri)

지정된 계약, 바인딩 및 엔드포인트 주소가 포함된 URI를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

AddServiceEndpoint(Type, Binding, String, Uri)

지정된 계약, 바인딩, 엔드포인트 주소 및 서비스가 수신 대기하는 URI를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

AddServiceEndpoint(Type, Binding, Uri, Uri)

지정된 계약, 바인딩, 엔드포인트 주소가 포함된 URI 및 서비스가 수신 대기하는 URI를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

AddServiceEndpoint(Type, Binding, String)

지정된 계약, 바인딩, 엔드포인트 주소를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ AddServiceEndpoint(Type ^ implementedContract, System::ServiceModel::Channels::Binding ^ binding, System::String ^ address);
public System.ServiceModel.Description.ServiceEndpoint AddServiceEndpoint (Type implementedContract, System.ServiceModel.Channels.Binding binding, string address);
override this.AddServiceEndpoint : Type * System.ServiceModel.Channels.Binding * string -> System.ServiceModel.Description.ServiceEndpoint
Public Function AddServiceEndpoint (implementedContract As Type, binding As Binding, address As String) As ServiceEndpoint

매개 변수

implementedContract
Type

추가된 엔드포인트에 대한 계약의 Type입니다.

binding
Binding

추가된 엔드포인트에 대한 Binding입니다.

address
String

추가된 엔드포인트에 대한 주소입니다.

반환

ServiceEndpoint

호스팅된 서비스에 추가된 ServiceEndpoint입니다.

예외

implementedContract, binding 또는 addressnull인 경우

예제

WSHttpBinding binding = new WSHttpBinding();
serviceHost.AddServiceEndpoint(typeof(ICalculator), binding, "http://localhost:8000/servicemodelsamples/service/basic");
Dim binding As BasicHttpBinding = New BasicHttpBinding()
serviceHost.AddServiceEndpoint(GetType(ICalculator), binding, "http://localhost:8000/servicemodelsamples/service/basic")

적용 대상

AddServiceEndpoint(Type, Binding, Uri)

지정된 계약, 바인딩 및 엔드포인트 주소가 포함된 URI를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ AddServiceEndpoint(Type ^ implementedContract, System::ServiceModel::Channels::Binding ^ binding, Uri ^ address);
public System.ServiceModel.Description.ServiceEndpoint AddServiceEndpoint (Type implementedContract, System.ServiceModel.Channels.Binding binding, Uri address);
override this.AddServiceEndpoint : Type * System.ServiceModel.Channels.Binding * Uri -> System.ServiceModel.Description.ServiceEndpoint
Public Function AddServiceEndpoint (implementedContract As Type, binding As Binding, address As Uri) As ServiceEndpoint

매개 변수

implementedContract
Type

추가된 엔드포인트에 대한 계약의 Type입니다.

binding
Binding

추가된 엔드포인트에 대한 Binding입니다.

address
Uri

추가된 엔드포인트의 주소가 포함된 Uri입니다.

반환

ServiceEndpoint

호스팅된 서비스에 추가된 ServiceEndpoint입니다.

예외

implementedContract, binding 또는 addressnull인 경우

예제

BasicHttpBinding binding = new BasicHttpBinding();
Uri address = new Uri("http://localhost:8000/servicemodelsamples/service/basic");
serviceHost.AddServiceEndpoint(typeof(ICalculator), binding, address);
Dim binding As BasicHttpBinding = New BasicHttpBinding()
Dim address As Uri = New Uri("http://localhost:8000/servicemodelsamples/service/basic")
serviceHost.AddServiceEndpoint(GetType(ICalculator), binding, address)

적용 대상

AddServiceEndpoint(Type, Binding, String, Uri)

지정된 계약, 바인딩, 엔드포인트 주소 및 서비스가 수신 대기하는 URI를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ AddServiceEndpoint(Type ^ implementedContract, System::ServiceModel::Channels::Binding ^ binding, System::String ^ address, Uri ^ listenUri);
public System.ServiceModel.Description.ServiceEndpoint AddServiceEndpoint (Type implementedContract, System.ServiceModel.Channels.Binding binding, string address, Uri listenUri);
override this.AddServiceEndpoint : Type * System.ServiceModel.Channels.Binding * string * Uri -> System.ServiceModel.Description.ServiceEndpoint
Public Function AddServiceEndpoint (implementedContract As Type, binding As Binding, address As String, listenUri As Uri) As ServiceEndpoint

매개 변수

implementedContract
Type

추가된 엔드포인트에 대한 계약의 Type입니다.

binding
Binding

추가된 엔드포인트에 대한 Binding입니다.

address
String

서비스의 엔드포인트 주소입니다.

listenUri
Uri

서비스 엔드포인트에서 수신 대기할 수 있는 Uri입니다.

반환

ServiceEndpoint

호스팅된 서비스에 추가된 ServiceEndpoint입니다.

예외

implementedContract, binding 또는 addressnull인 경우

예제

BasicHttpBinding binding = new BasicHttpBinding();
Uri listenUri = new Uri("http://localhost:8000/MyListenUri");
string address = "http://localhost:8000/servicemodelsamples/service2";
serviceHost.AddServiceEndpoint(typeof(ICalculator), binding, address, listenUri);
Dim binding As BasicHttpBinding = New BasicHttpBinding()
Dim listenUri As Uri = New Uri("http://localhost:8000/MyListenUri")
Dim address As String = "http://localhost:8000/servicemodelsamples/service/basic"
serviceHost.AddServiceEndpoint(GetType(ICalculator), binding, address, listenUri)

설명

지정된 동일한 URI에서 수신해야 하는 여러 엔드포인트가 있는 경우 이 버전의 메서드를 사용합니다.

적용 대상

AddServiceEndpoint(Type, Binding, Uri, Uri)

지정된 계약, 바인딩, 엔드포인트 주소가 포함된 URI 및 서비스가 수신 대기하는 URI를 사용하여 서비스 엔드포인트를 호스팅된 서비스에 추가합니다.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ AddServiceEndpoint(Type ^ implementedContract, System::ServiceModel::Channels::Binding ^ binding, Uri ^ address, Uri ^ listenUri);
public System.ServiceModel.Description.ServiceEndpoint AddServiceEndpoint (Type implementedContract, System.ServiceModel.Channels.Binding binding, Uri address, Uri listenUri);
override this.AddServiceEndpoint : Type * System.ServiceModel.Channels.Binding * Uri * Uri -> System.ServiceModel.Description.ServiceEndpoint
Public Function AddServiceEndpoint (implementedContract As Type, binding As Binding, address As Uri, listenUri As Uri) As ServiceEndpoint

매개 변수

implementedContract
Type

추가된 엔드포인트에 대한 계약의 Type입니다.

binding
Binding

추가된 엔드포인트에 대한 Binding입니다.

address
Uri

추가된 엔드포인트의 주소가 포함된 Uri입니다.

listenUri
Uri

서비스 엔드포인트에서 수신 대기할 수 있는 Uri입니다.

반환

ServiceEndpoint

호스팅된 서비스에 추가된 ServiceEndpoint입니다.

예외

implementedContract, binding 또는 addressnull인 경우

계약이 초기화되지 않거나 계약 키를 찾을 수 없는 경우

예제

BasicHttpBinding binding = new BasicHttpBinding();
Uri listenUri = new Uri("http://localhost:8000/MyListenUri");
Uri address = new Uri("http://localhost:8000/servicemodelsamples/service3");
serviceHost.AddServiceEndpoint(typeof(ICalculator), binding, address, listenUri);
Dim binding As BasicHttpBinding = New BasicHttpBinding()
Dim listenUri As Uri = New Uri("http://localhost:8000/MyListenUri")
Dim address As Uri = New Uri("http://localhost:8000/servicemodelsamples/service/basic")
serviceHost.AddServiceEndpoint(GetType(ICalculator), binding, address, listenUri)

설명

지정된 동일한 URI에서 수신해야 하는 여러 엔드포인트가 있는 경우 이 버전의 메서드를 사용합니다.

적용 대상