EndpointAddress::ReadFrom Method (XmlDictionaryReader^, XmlDictionaryString^, XmlDictionaryString^)
Reads an endpoint address with a specified qualified name from a specified XML dictionary reader.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: static EndpointAddress^ ReadFrom( XmlDictionaryReader^ reader, XmlDictionaryString^ localName, XmlDictionaryString^ ns )
Parameters
- reader
-
Type:
System.Xml::XmlDictionaryReader^
The XmlDictionaryReader from which the endpoint address is obtained.
- localName
-
Type:
System.Xml::XmlDictionaryString^
An XmlDictionaryString that contains the local name for the XML node to contain the endpoint address.
- ns
-
Type:
System.Xml::XmlDictionaryString^
An XmlDictionaryString that contains the namespace for the XML node to contain the endpoint address.
Return Value
Type: System.ServiceModel::EndpointAddress^The EndpointAddress with the qualified name read from the XML dictionary reader.
The following code shows how to read in an endpoint address from an XML dictionary reader.
XmlReader reader = XmlReader.Create("addressdata.xml"); XmlDictionaryReader dictReader = XmlDictionaryReader.CreateDictionaryReader(reader); XmlDictionaryString xdLocalName = new XmlDictionaryString(XmlDictionary.Empty, "EndpointReference",0); XmlDictionaryString xdNamespace = new XmlDictionaryString(XmlDictionary.Empty, "http://www.w3.org/2005/08/addressing", 0); EndpointAddress createdEA = EndpointAddress.ReadFrom(dictReader, xdLocalName, xdNamespace);
Available since 3.0