BindingContext.ListenUriRelativeAddress 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个 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 属性设置此绝对地址。