ServiceEndpoint ServiceEndpoint ServiceEndpoint ServiceEndpoint Constructors

Definition

Overloads

ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription)

Initializes a new instance of the ServiceEndpoint class for a specified contract.

ServiceEndpoint(ContractDescription, Binding, EndpointAddress) ServiceEndpoint(ContractDescription, Binding, EndpointAddress) ServiceEndpoint(ContractDescription, Binding, EndpointAddress)

Initializes a new instance of the ServiceEndpoint class with a specified contract, binding, and address.

ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription)

Initializes a new instance of the ServiceEndpoint class for a specified 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

Examples

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

Remarks

Use this constructor when the binding and address for the endpoint are provided in configuration.

ServiceEndpoint(ContractDescription, Binding, EndpointAddress) ServiceEndpoint(ContractDescription, Binding, EndpointAddress) ServiceEndpoint(ContractDescription, Binding, EndpointAddress)

Initializes a new instance of the ServiceEndpoint class with a specified contract, binding, and address.

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

Parameters

binding
Binding Binding Binding Binding

The Binding that specifies how the service endpoint communicates with the world.

Examples

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

Remarks

Use this constructor to specify a service endpoint imperatively in code.

Applies to