編集

次の方法で共有


EndpointAddress.Headers Property

Definition

Gets the collection of address headers for the endpoints that the builder can create.

public:
 property System::ServiceModel::Channels::AddressHeaderCollection ^ Headers { System::ServiceModel::Channels::AddressHeaderCollection ^ get(); };
public System.ServiceModel.Channels.AddressHeaderCollection Headers { get; }
member this.Headers : System.ServiceModel.Channels.AddressHeaderCollection
Public ReadOnly Property Headers As AddressHeaderCollection

Property Value

The AddressHeaderCollection that contains address information for the endpoint.

Examples

AddressHeader addressHeader1 = AddressHeader.CreateAddressHeader("specialservice1", "http://localhost:8000/service", 1);
AddressHeader addressHeader2 = AddressHeader.CreateAddressHeader("specialservice2", "http://localhost:8000/service", 2);

AddressHeader[] addressHeaders = new AddressHeader[2] { addressHeader1, addressHeader2 };
AddressHeaderCollection headers = new AddressHeaderCollection(addressHeaders);		
EndpointIdentity endpointIdentity =
    EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);
EndpointAddress endpointAddress = new EndpointAddress(
    new Uri
    ("http://localhost:8003/servicemodelsamples/service/incode/identity"),
    endpointIdentity, addressHeaders);

AddressHeaderCollection headerCollection = endpointAddress.Headers;

Applies to