EndpointAddress.Headers Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public ReadOnly Property Headers As AddressHeaderCollection
public AddressHeaderCollection Headers { get; }

Property Value

Type: System.ServiceModel.Channels.AddressHeaderCollection
The AddressHeaderCollection that contains address information for the endpoint.

Examples

            'Use Headers property to create a collection of address headers from the EnpointAddress
            Dim addressHeader3 As AddressHeader = AddressHeader.CreateAddressHeader("specialservice3", "https://localhost:8000/service", 1)
            Dim addressHeader4 As AddressHeader = AddressHeader.CreateAddressHeader("specialservice4", "https://localhost:8000/service", 2)
            Dim addressHeaders2() As AddressHeader = { addressHeader3, addressHeader4 }
            Dim endpointAddressWithHeaders2 As New EndpointAddress(New Uri("https://localhost/silverlightsamples/service3"), addressHeaders2)
            Dim addressHeaderCollection2 As AddressHeaderCollection = endpointAddressWithHeaders.Headers
//Use Headers property to create a collection of address headers from the EnpointAddress
AddressHeader addressHeader3 = AddressHeader.CreateAddressHeader("specialservice3", "https://localhost:8000/service", 1);
AddressHeader addressHeader4 = AddressHeader.CreateAddressHeader("specialservice4", "https://localhost:8000/service", 2);
AddressHeader[] addressHeaders2 = new AddressHeader[2] { addressHeader3, addressHeader4 };
EndpointAddress endpointAddressWithHeaders2 = new EndpointAddress(
    new Uri("https://localhost/silverlightsamples/service3"), addressHeaders2
    );
AddressHeaderCollection addressHeaderCollection2 = endpointAddressWithHeaders.Headers;

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.