Freigeben über


EndpointAddress.Headers Eigenschaft

Definition

Ruft die Auflistung von Adressenheadern für die Endpunkte ab, die der Generator erzeugen kann.

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

Eigenschaftswert

AddressHeaderCollection

Die AddressHeaderCollection, die Adresseninformationen für den Endpunkt enthält.

Beispiele

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;

Gilt für