BindingContext.ListenUriBaseAddress 属性

定义

获取或设置一个 URI,该 URI 提供服务终结点侦听的基址。

public:
 property Uri ^ ListenUriBaseAddress { Uri ^ get(); void set(Uri ^ value); };
public Uri ListenUriBaseAddress { get; set; }
member this.ListenUriBaseAddress : Uri with get, set
Public Property ListenUriBaseAddress As Uri

属性值

Uri

服务终结点侦听的 Uri

示例

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
Uri baseAddress = context.ListenUriBaseAddress;
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)
Dim baseAddress As Uri = context.ListenUriBaseAddress

注解

服务侦听的终结点的地址是通过将 ListenUriRelativeAddress 追加到 ListenUriBaseAddress 获得的。 可以使用 ListenUri 属性设置此绝对地址。

适用于