共用方式為


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)

來源:
EndpointAddress.cs
來源:
EndpointAddress.cs
來源:
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)

來源:
EndpointAddress.cs
來源:
EndpointAddress.cs
來源:
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

XmlDictionaryString,其中包含 XML 節點包含端點位址的命名空間。

傳回

具有 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)

來源:
EndpointAddress.cs
來源:
EndpointAddress.cs
來源:
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
                );

適用於