EndpointAddress.Headers Propiedad

Definición

Obtiene la colección de encabezados de dirección para los puntos de conexión que el generador puede crear.

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

Valor de propiedad

AddressHeaderCollection

AddressHeaderCollection que contiene información de la dirección para el extremo.

Ejemplos

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;

Se aplica a