Share via


BindingContext.ListenUriRelativeAddress 屬性

定義

取得或設定提供服務端點接聽之相對位址的 URI。

public:
 property System::String ^ ListenUriRelativeAddress { System::String ^ get(); void set(System::String ^ value); };
public string ListenUriRelativeAddress { get; set; }
member this.ListenUriRelativeAddress : string with get, set
Public Property ListenUriRelativeAddress As String

屬性值

服務端點接聽的相對位址。

範例

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
string relAddress = context.ListenUriRelativeAddress;
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)
Dim relAddress As String = context.ListenUriRelativeAddress

備註

取得服務接聽之端點位址的方式,是將 ListenUriRelativeAddress 附加至 ListenUriBaseAddress。 可以使用 ListenUri 屬性來設定這個絕對位址。

適用於