EndpointAddress.ReadFrom 方法

定义

从指定的 XML 读取器读取终结点地址。

重载

ReadFrom(XmlDictionaryReader)

从指定的 XML 字典读取器读取终结点地址。

ReadFrom(AddressingVersion, XmlDictionaryReader)

从指定的 XML 字典读取器读取指定地址版本的终结点地址。

ReadFrom(AddressingVersion, XmlReader)

从指定的 XML 读取器读取指定地址版本的终结点地址。

ReadFrom(XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

从指定的 XML 字典读取器中读取具有指定限定名称的终结点地址。

ReadFrom(AddressingVersion, XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

从指定的 XML 字典读取器中读取具有指定限定名称的指定地址版本的终结点地址。

ReadFrom(AddressingVersion, XmlReader, String, String)

从指定的 XML 读取器中读取具有指定限定名称的指定地址版本的终结点地址。

ReadFrom(XmlDictionaryReader)

Source:
EndpointAddress.cs
Source:
EndpointAddress.cs
Source:
EndpointAddress.cs

从指定的 XML 字典读取器读取终结点地址。

public:
 static System::ServiceModel::EndpointAddress ^ ReadFrom(System::Xml::XmlDictionaryReader ^ reader);
public static System.ServiceModel.EndpointAddress ReadFrom (System.Xml.XmlDictionaryReader reader);
static member ReadFrom : System.Xml.XmlDictionaryReader -> System.ServiceModel.EndpointAddress
Public Shared Function ReadFrom (reader As XmlDictionaryReader) As EndpointAddress

参数

reader
XmlDictionaryReader

从中获取终结点地址的 XmlDictionaryReader

返回

从 XML 字典读取器读取 EndpointAddress

示例

以下代码演示如何从 XML 字典读取器读取终结点地址。

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

适用于

ReadFrom(AddressingVersion, XmlDictionaryReader)

Source:
EndpointAddress.cs
Source:
EndpointAddress.cs
Source:
EndpointAddress.cs

从指定的 XML 字典读取器读取指定地址版本的终结点地址。

public:
 static System::ServiceModel::EndpointAddress ^ ReadFrom(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlDictionaryReader ^ reader);
public static System.ServiceModel.EndpointAddress ReadFrom (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryReader reader);
static member ReadFrom : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlDictionaryReader -> System.ServiceModel.EndpointAddress
Public Shared Function ReadFrom (addressingVersion As AddressingVersion, reader As XmlDictionaryReader) As EndpointAddress

参数

addressingVersion
AddressingVersion

当前终结点地址的 AddressingVersion

reader
XmlDictionaryReader

从中获取终结点地址的 XmlDictionaryReader

返回

从 XML 字典读取器读取 EndpointAddress

示例

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

适用于

ReadFrom(AddressingVersion, XmlReader)

从指定的 XML 读取器读取指定地址版本的终结点地址。

public:
 static System::ServiceModel::EndpointAddress ^ ReadFrom(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlReader ^ reader);
public static System.ServiceModel.EndpointAddress ReadFrom (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlReader reader);
static member ReadFrom : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlReader -> System.ServiceModel.EndpointAddress
Public Shared Function ReadFrom (addressingVersion As AddressingVersion, reader As XmlReader) As EndpointAddress

参数

addressingVersion
AddressingVersion

当前终结点地址的 AddressingVersion

reader
XmlReader

从中获取终结点地址的 XmlReader

返回

从 XML 读取器读取 EndpointAddress

示例

以下代码演示如何从 XML 字典读取器读取终结点地址。

    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");

适用于

ReadFrom(XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

从指定的 XML 字典读取器中读取具有指定限定名称的终结点地址。

public:
 static System::ServiceModel::EndpointAddress ^ ReadFrom(System::Xml::XmlDictionaryReader ^ reader, System::Xml::XmlDictionaryString ^ localName, System::Xml::XmlDictionaryString ^ ns);
public static System.ServiceModel.EndpointAddress ReadFrom (System.Xml.XmlDictionaryReader reader, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString ns);
static member ReadFrom : System.Xml.XmlDictionaryReader * System.Xml.XmlDictionaryString * System.Xml.XmlDictionaryString -> System.ServiceModel.EndpointAddress
Public Shared Function ReadFrom (reader As XmlDictionaryReader, localName As XmlDictionaryString, ns As XmlDictionaryString) As EndpointAddress

参数

reader
XmlDictionaryReader

从中获取终结点地址的 XmlDictionaryReader

localName
XmlDictionaryString

一个 XmlDictionaryString,其中包含 XML 节点要包含终结点地址的本地名称。

ns
XmlDictionaryString

包含 XML 节点的命名空间以包含终结点地址的 XmlDictionaryString

返回

具有从 XML 字典读取器读取的限定名称的 EndpointAddress

示例

以下代码演示如何从 XML 字典读取器读取终结点地址。

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

适用于

ReadFrom(AddressingVersion, XmlDictionaryReader, XmlDictionaryString, XmlDictionaryString)

Source:
EndpointAddress.cs
Source:
EndpointAddress.cs
Source:
EndpointAddress.cs

从指定的 XML 字典读取器中读取具有指定限定名称的指定地址版本的终结点地址。

public:
 static System::ServiceModel::EndpointAddress ^ ReadFrom(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlDictionaryReader ^ reader, System::Xml::XmlDictionaryString ^ localName, System::Xml::XmlDictionaryString ^ ns);
public static System.ServiceModel.EndpointAddress ReadFrom (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryReader reader, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString ns);
static member ReadFrom : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlDictionaryReader * System.Xml.XmlDictionaryString * System.Xml.XmlDictionaryString -> System.ServiceModel.EndpointAddress
Public Shared Function ReadFrom (addressingVersion As AddressingVersion, reader As XmlDictionaryReader, localName As XmlDictionaryString, ns As XmlDictionaryString) As EndpointAddress

参数

addressingVersion
AddressingVersion

当前终结点地址的 AddressingVersion

reader
XmlDictionaryReader

从中获取终结点地址的 XmlDictionaryReader

localName
XmlDictionaryString

包含 XML 节点的本地名称,以包含终结点地址。

ns
XmlDictionaryString

包含要包含终结点地址的 XML 节点的命名空间。

返回

具有从 XML 读取器读取的限定名称的 EndpointAddress

示例

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

适用于

ReadFrom(AddressingVersion, XmlReader, String, String)

从指定的 XML 读取器中读取具有指定限定名称的指定地址版本的终结点地址。

public:
 static System::ServiceModel::EndpointAddress ^ ReadFrom(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlReader ^ reader, System::String ^ localName, System::String ^ ns);
public static System.ServiceModel.EndpointAddress ReadFrom (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlReader reader, string localName, string ns);
static member ReadFrom : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlReader * string * string -> System.ServiceModel.EndpointAddress
Public Shared Function ReadFrom (addressingVersion As AddressingVersion, reader As XmlReader, localName As String, ns As String) As EndpointAddress

参数

addressingVersion
AddressingVersion

当前终结点地址的 AddressingVersion

reader
XmlReader

从中获取终结点地址的 XmlReader

localName
String

包含 XML 节点的本地名称,以包含终结点地址。

ns
String

包含要包含终结点地址的 XML 节点的命名空间。

返回

具有从 XML 读取器读取的限定名称的 EndpointAddress

示例

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

适用于