EndpointAddress Constructor (Uri, AddressHeader())
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Initializes a new instance of the EndpointAddress class with a specified URI and headers.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Parameters
- uri
- Type: System.Uri
The Uri that identifies the endpoint location.
- addressHeaders
- Type:
System.ServiceModel.Channels.AddressHeader
()
The Array of type AddressHeader that contains address information used to interact with the endpoint.
' Create new address headers for special services and add them to an array Dim addressHeader1 As AddressHeader = AddressHeader.CreateAddressHeader("specialservice1", "http://localhost:8000/service", 1) Dim addressHeader2 As AddressHeader = AddressHeader.CreateAddressHeader("specialservice2", "http://localhost:8000/service", 2) Dim addressHeaders1() As AddressHeader = { addressHeader1, addressHeader2 } ' Endpoint address constructor with URI and address headers Dim endpointAddressWithHeaders As New EndpointAddress(New Uri("http://localhost/silverlightsamples/service2"), addressHeaders1) ' Confirm adddressHeader1 is in endpointAddressWithHeaders - boolHeaders returns True. Dim addressHeaderCollection As AddressHeaderCollection = endpointAddressWithHeaders.Headers Dim boolHeaders As Boolean = addressHeaderCollection.Contains(addressHeader1)
Show: