EndpointAddress.ReadFrom Method

Definition

Reads an endpoint address from a specified XML reader.

Overloads

ReadFrom(XmlDictionaryReader)

Reads an endpoint address from a specified XML dictionary reader.

ReadFrom(AddressingVersion, XmlDictionaryReader)

Reads an endpoint address for a specified address version from a specified XML dictionary reader.

ReadFrom(AddressingVersion, XmlReader)

Reads an endpoint address for a specified address version from a specified XML reader.

ReadFrom(XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

Reads an endpoint address with a specified qualified name from a specified XML dictionary reader.

ReadFrom(AddressingVersion, XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

Reads an endpoint address for a specified address version with a specified qualified name from a specified XML dictionary reader.

ReadFrom(AddressingVersion, XmlReader, String, String)

Reads an endpoint address for a specified address version with a specified qualified name from a specified XML reader.

ReadFrom(XmlDictionaryReader)

Source:
EndpointAddress.cs
Source:
EndpointAddress.cs

Reads an endpoint address from a specified XML dictionary reader.

C#
public static System.ServiceModel.EndpointAddress ReadFrom(System.Xml.XmlDictionaryReader reader);

Parameters

reader
XmlDictionaryReader

The XmlDictionaryReader from which the endpoint address is obtained.

Returns

The EndpointAddress read from the XML dictionary reader.

Examples

The following code shows how to read an endpoint address from a XML dictionary reader.

C#
XmlDictionaryReader reader = (XmlDictionaryReader) XmlDictionaryReader.Create("addressdata.xml");
EndpointAddress createdEA = EndpointAddress.ReadFrom(reader);

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

ReadFrom(AddressingVersion, XmlDictionaryReader)

Source:
EndpointAddress.cs
Source:
EndpointAddress.cs

Reads an endpoint address for a specified address version from a specified XML dictionary reader.

C#
public static System.ServiceModel.EndpointAddress ReadFrom(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryReader reader);

Parameters

addressingVersion
AddressingVersion

The AddressingVersion of the current endpoint address.

reader
XmlDictionaryReader

The XmlDictionaryReader from which the endpoint address is obtained.

Returns

The EndpointAddress read from the XML dictionary reader.

Examples

C#
XmlReader reader = XmlReader.Create("addressdata.xml");
XmlDictionaryReader dictReader = XmlDictionaryReader.CreateDictionaryReader(reader);
EndpointAddress createdEA = EndpointAddress.ReadFrom
                (AddressingVersion.WSAddressing10,
                 dictReader);

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

ReadFrom(AddressingVersion, XmlReader)

Reads an endpoint address for a specified address version from a specified XML reader.

C#
public static System.ServiceModel.EndpointAddress ReadFrom(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlReader reader);

Parameters

addressingVersion
AddressingVersion

The AddressingVersion of the current endpoint address.

reader
XmlReader

The XmlReader from which the endpoint address is obtained.

Returns

The EndpointAddress read from the XML reader.

Examples

The following code shows how to read in an endpoint address from an XML dictionary reader.

C#
    XmlReader reader = XmlReader.Create("addressdata.xml");
    XmlDictionaryReader dictReader = XmlDictionaryReader.CreateDictionaryReader(reader);
    EndpointAddress createdEA = EndpointAddress.ReadFrom
(AddressingVersion.WSAddressing10,
 dictReader,
 "EndpointReference",
 "http://www.w3.org/2005/08/addressing");

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

ReadFrom(XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

Reads an endpoint address with a specified qualified name from a specified XML dictionary reader.

C#
public static System.ServiceModel.EndpointAddress ReadFrom(System.Xml.XmlDictionaryReader reader, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString ns);

Parameters

reader
XmlDictionaryReader

The XmlDictionaryReader from which the endpoint address is obtained.

localName
XmlDictionaryString

An XmlDictionaryString that contains the local name for the XML node to contain the endpoint address.

ns
XmlDictionaryString

An XmlDictionaryString that contains the namespace for the XML node to contain the endpoint address.

Returns

The EndpointAddress with the qualified name read from the XML dictionary reader.

Examples

The following code shows how to read in an endpoint address from an XML dictionary reader.

C#
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);

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

ReadFrom(AddressingVersion, XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

Source:
EndpointAddress.cs
Source:
EndpointAddress.cs

Reads an endpoint address for a specified address version with a specified qualified name from a specified XML dictionary reader.

C#
public static System.ServiceModel.EndpointAddress ReadFrom(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryReader reader, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString ns);

Parameters

addressingVersion
AddressingVersion

The AddressingVersion of the current endpoint address.

reader
XmlDictionaryReader

The XmlDictionaryReader from which the endpoint address is obtained.

localName
XmlDictionaryString

Contains the local name for the XML node to contain the endpoint address.

ns
XmlDictionaryString

Contains the namespace for the XML node to contain the endpoint address.

Returns

The EndpointAddress with the qualified name read from the XML reader.

Examples

C#
XmlReader reader = XmlReader.Create("addressdata.xml");
XmlDictionaryReader xReader = XmlDictionaryReader.CreateDictionaryReader(reader);
// Create an XmlDictionary and add values to it.
XmlDictionary d = new XmlDictionary();
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
                (AddressingVersion.WSAddressing10,
                 xReader,
                 xdLocalName,
                 xdNamespace
                );

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

ReadFrom(AddressingVersion, XmlReader, String, String)

Reads an endpoint address for a specified address version with a specified qualified name from a specified XML reader.

C#
public static System.ServiceModel.EndpointAddress ReadFrom(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlReader reader, string localName, string ns);

Parameters

addressingVersion
AddressingVersion

The AddressingVersion of the current endpoint address.

reader
XmlReader

The XmlReader from which the endpoint address is obtained.

localName
String

Contains the local name for the XML node to contain the endpoint address.

ns
String

Contains the namespace for the XML node to contain the endpoint address.

Returns

The EndpointAddress with the qualified name read from the XML reader.

Examples

C#
XmlReader reader = XmlReader.Create("addressdata.xml");
XmlDictionaryReader xReader = XmlDictionaryReader.CreateDictionaryReader(reader);
// Create an XmlDictionary and add values to it.
XmlDictionary d = new XmlDictionary();
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
                (AddressingVersion.WSAddressing10,
                 xReader,
                 xdLocalName,
                 xdNamespace
                );

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1