ServiceEndpoint.Address Właściwość

Definicja

Pobiera lub ustawia adres punktu końcowego dla punktu końcowego usługi.

public:
 property System::ServiceModel::EndpointAddress ^ Address { System::ServiceModel::EndpointAddress ^ get(); void set(System::ServiceModel::EndpointAddress ^ value); };
public System.ServiceModel.EndpointAddress Address { get; set; }
member this.Address : System.ServiceModel.EndpointAddress with get, set
Public Property Address As EndpointAddress

Wartość właściwości

EndpointAddress

Element EndpointAddress określający lokalizację punktu końcowego usługi.

Przykłady

W poniższym przykładzie pokazano, jak dodać element ServiceEndpoint do istniejącego ServiceHost obiektu i wyświetlić właściwość adresu:

ServiceEndpoint endpnt = serviceHost.AddServiceEndpoint(
    typeof(ICalculator),
    new WSHttpBinding(),
    "CalculatorServiceObject");

Console.WriteLine("Address: {0}", endpnt.Address);
Dim endpnt As ServiceEndpoint = serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

Console.WriteLine("Address: {0}", endpnt.Address)

Uwagi

Wartość domyślna, ListenUri w której punkt końcowy usługi nasłuchuje, jest dostarczany przez Uri EndpointAddress element zwrócony przez Addresselement .

Dotyczy