EndpointAddress Constructor (Uri, AddressHeader[])
Collapse the table of content
Expand the table of content

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.

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

'Declaration
Public Sub New ( _
	uri As Uri, _
	ParamArray addressHeaders As AddressHeader() _
)

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)


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft