Partager via


EndpointAddress.Headers Propriété

Définition

Obtient la collection d’en-têtes d’adresse des points de terminaison que le générateur peut créer.

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

Valeur de propriété

AddressHeaderCollection

AddressHeaderCollection contenant les informations d'adresse du point de terminaison.

Exemples

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;

S’applique à