ServiceEndpoint Constructors

Definitie

Initialiseert een nieuw exemplaar van de ServiceEndpoint klasse.

Overloads

Name Description
ServiceEndpoint(ContractDescription)

Initialiseert een nieuw exemplaar van de ServiceEndpoint klasse voor een opgegeven contract.

ServiceEndpoint(ContractDescription, Binding, EndpointAddress)

Initialiseert een nieuw exemplaar van de ServiceEndpoint klasse met een opgegeven contract, binding en adres.

ServiceEndpoint(ContractDescription)

Initialiseert een nieuw exemplaar van de ServiceEndpoint klasse voor een opgegeven contract.

public:
 ServiceEndpoint(System::ServiceModel::Description::ContractDescription ^ contract);
public ServiceEndpoint(System.ServiceModel.Description.ContractDescription contract);
new System.ServiceModel.Description.ServiceEndpoint : System.ServiceModel.Description.ContractDescription -> System.ServiceModel.Description.ServiceEndpoint
Public Sub New (contract As ContractDescription)

Parameters

contract
ContractDescription

Het ContractDescription voor het service-eindpunt.

Voorbeelden

ContractDescription cd = new ContractDescription("Calculator");
ServiceEndpoint svcEndpoint = new ServiceEndpoint(cd);
Dim cd As New ContractDescription("Calculator")
Dim svcEndpoint As New ServiceEndpoint(cd)

Opmerkingen

Gebruik deze constructor wanneer de binding en het adres voor het eindpunt worden opgegeven in de configuratie.

Van toepassing op

ServiceEndpoint(ContractDescription, Binding, EndpointAddress)

Initialiseert een nieuw exemplaar van de ServiceEndpoint klasse met een opgegeven contract, binding en adres.

public:
 ServiceEndpoint(System::ServiceModel::Description::ContractDescription ^ contract, System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::EndpointAddress ^ address);
public ServiceEndpoint(System.ServiceModel.Description.ContractDescription contract, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress address);
new System.ServiceModel.Description.ServiceEndpoint : System.ServiceModel.Description.ContractDescription * System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress -> System.ServiceModel.Description.ServiceEndpoint
Public Sub New (contract As ContractDescription, binding As Binding, address As EndpointAddress)

Parameters

contract
ContractDescription

Het ContractDescription voor het service-eindpunt.

binding
Binding

Hiermee Binding geeft u op hoe het service-eindpunt communiceert met de wereld.

address
EndpointAddress

Het EndpointAddress voor het service-eindpunt.

Voorbeelden

string address = "http://localhost:8001/CalculatorService";

ServiceEndpoint endpoint = new ServiceEndpoint(
    ContractDescription.GetContract(
        typeof(ICalculator),
        typeof(CalculatorService)),
        new WSHttpBinding(),
        new EndpointAddress(address));
Dim address As String = "http://localhost:8001/CalculatorService"

Dim endpoint As New ServiceEndpoint(ContractDescription.GetContract(GetType(ICalculator), GetType(CalculatorService)), New WSHttpBinding(), New EndpointAddress(address))

Opmerkingen

Gebruik deze constructor om een service-eindpunt imperatief in code op te geven.

Van toepassing op