Aracılığıyla paylaş


ServiceEndpoint.Address Özellik

Tanım

Hizmet uç noktasının uç nokta adresini alır veya ayarlar.

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

Özellik Değeri

EndpointAddress Hizmet uç noktasının konumunu belirten.

Örnekler

Aşağıdaki örnekte var olan ServiceHost bir öğeye nasıl ekleneceği ServiceEndpoint ve adres özelliğinin nasıl görüntüleneceği gösterilmektedir:

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)

Açıklamalar

Hizmet uç noktasının dinlediği varsayılan değeri ListenUri tarafından UriAddressdöndürülen tarafından EndpointAddress sağlanır.

Şunlara uygulanır