EndpointAddressBuilder.Headers 属性

定义

获取生成器可以创建的终结点的地址标头列表。

public:
 property System::Collections::ObjectModel::Collection<System::ServiceModel::Channels::AddressHeader ^> ^ Headers { System::Collections::ObjectModel::Collection<System::ServiceModel::Channels::AddressHeader ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.ServiceModel.Channels.AddressHeader> Headers { get; }
member this.Headers : System.Collections.ObjectModel.Collection<System.ServiceModel.Channels.AddressHeader>
Public ReadOnly Property Headers As Collection(Of AddressHeader)

属性值

类型为 List<T>AddressHeader,包含生成器可以创建的终结点的地址标头。

示例

EndpointAddressBuilder eab = new EndpointAddressBuilder();
eab.Uri = new Uri("http://localhost/Uri");
eab.Headers.Add(AddressHeader.CreateAddressHeader("n", "ns", "val"));
Dim eab As New EndpointAddressBuilder()
eab.Uri = New Uri("http://localhost/Uri")
eab.Headers.Add(AddressHeader.CreateAddressHeader("n", "ns", "val"))

注解

可以使用 EndpointAddressBuilder(EndpointAddress) 构造函数设置终结点的地址标头。

适用于