BindingContext.ListenUriRelativeAddress 属性

定义

获取或设置一个 URI,该 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 属性设置此绝对地址。

适用于