ServiceEndpoint.Address Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur alamat titik akhir untuk titik akhir layanan.
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
Nilai Properti
EndpointAddress yang menentukan lokasi titik akhir layanan.
Contoh
Contoh berikut menunjukkan cara menambahkan ServiceEndpoint ke properti alamat yang sudah ada ServiceHost dan ditampilkan:
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)
Keterangan
Nilai ListenUri default di mana titik akhir layanan mendengarkan disediakan oleh Uri yang EndpointAddress dikembalikan oleh Address.