Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EndpointAddress Constructor (Uri^, EndpointIdentity^, AddressHeaderCollection^, XmlDictionaryReader^, XmlDictionaryReader^)

 

Initializes a new instance of the EndpointAddress class with a specified URI, identity, header collection, and metadata and extension readers.

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

public:
EndpointAddress(
	Uri^ uri,
	EndpointIdentity^ identity,
	AddressHeaderCollection^ headers,
	XmlDictionaryReader^ metadataReader,
	XmlDictionaryReader^ extensionReader
)

Parameters

uri
Type: System::Uri^

The Uri that identifies the endpoint location.

identity
Type: System.ServiceModel::EndpointIdentity^

The EndpointIdentity for the endpoint.

headers
Type: System.ServiceModel.Channels::AddressHeaderCollection^

The AddressHeaderCollection that contains address information used to interact with the endpoint.

metadataReader
Type: System.Xml::XmlDictionaryReader^

The XmlDictionaryReader from which the endpoint metadata is obtained.

extensionReader
Type: System.Xml::XmlDictionaryReader^

The XmlDictionaryReader from which extensions are obtained.

The WS-Addressing specification allows for arbitrary extension elements to appear at the end of an Endpoint Reference (EPR) that can be obtained using an XmlDictionaryReader.

The following code shows how to instantiate a EndpointAddress that specifies a Uri, an EndpointIdentity, a headers collection, a metadata XmlDictionaryReader and an extension XmlDictionaryReader.

XmlDictionaryReader metadataReader = endpointAddress.GetReaderAtMetadata();
XmlDictionaryReader extensionReader = endpointAddress.GetReaderAtExtensions();
EndpointIdentity identity = EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);

EndpointAddress endpointAddress2 = new EndpointAddress(
    new Uri("http://localhost:8003/servicemodelsamples/service/incode/identity"), identity, headers, metadataReader, extensionReader);

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft