EndpointAddressAugust2004 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供一種可序列化的端點位址類型,符合 2004 年 8 月發布的 WS-Addressing 版本,並允許其作為服務合約的一部分公開。
public ref class EndpointAddressAugust2004 : System::Xml::Serialization::IXmlSerializable
public class EndpointAddressAugust2004 : System.Xml.Serialization.IXmlSerializable
type EndpointAddressAugust2004 = class
interface IXmlSerializable
Public Class EndpointAddressAugust2004
Implements IXmlSerializable
- 繼承
-
EndpointAddressAugust2004
- 實作
範例
// Create an EndpointAddress with a specified address.
EndpointAddress epa1 = new EndpointAddress("http://localhost/ServiceModelSamples");
Console.WriteLine("The URI of the EndpointAddress is {0}:", epa1.Uri);
Console.WriteLine();
//Initialize an EndpointAddressAugust2004 from the endpointAddress.
EndpointAddressAugust2004 epaA4 = EndpointAddressAugust2004.FromEndpointAddress(epa1);
//Serialize and then deserializde the EndpointAugust2004 type.
//Convert the EndpointAugust2004 back into an EndpointAddress.
EndpointAddress epa2 = epaA4.ToEndpointAddress();
Console.WriteLine("The URI of the EndpointAddress is still {0}:", epa2.Uri);
Console.WriteLine();
' Create an EndpointAddress with a specified address.
Dim epa1 As New EndpointAddress("http://localhost/ServiceModelSamples")
Console.WriteLine("The URI of the EndpointAddress is {0}:", epa1.Uri)
Console.WriteLine()
'Initialize an EndpointAddressAugust2004 from the endpointAddress.
Dim epaA4 As EndpointAddressAugust2004 = EndpointAddressAugust2004.FromEndpointAddress(epa1)
'Serialize and then deserializde the EndpointAugust2004 type.
'Convert the EndpointAugust2004 back into an EndpointAddress.
Dim epa2 As EndpointAddress = epaA4.ToEndpointAddress()
Console.WriteLine("The URI of the EndpointAddress is still {0}:", epa2.Uri)
Console.WriteLine()
備註
該 EndpointAddress 版本不可序列化,也未綁定於特定版本的 WS-Addressing 規範。 Windows Communication Foundation(WCF)提供一個類別,提供可序列化型別 EndpointAddress10,且符合 WS-Addressing V1 標準。
此類別提供一個符合 2004 年 8 月標準的 WS-Addressing 封裝器 EndpointAddress ,且可序列化且綁定於特定線格式以供舊有用途使用。 方法 FromEndpointAddress(EndpointAddress) 負責包裝, ToEndpointAddress 方法進行展開,允許在序列化後恢復終端位址。
方法
| 名稱 | Description |
|---|---|
| Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
| FromEndpointAddress(EndpointAddress) |
初始化一個以指定端點位址的新類別實例 EndpointAddress10 。 |
| GetHashCode() |
做為預設哈希函式。 (繼承來源 Object) |
| GetSchema(XmlSchemaSet) |
回傳一個 XML 限定的名稱,描述指定快取結構中版本 1 端點位址的 XML 表示方式。 |
| GetType() |
取得目前實例的 Type。 (繼承來源 Object) |
| MemberwiseClone() |
建立目前 Object的淺層複本。 (繼承來源 Object) |
| ToEndpointAddress() |
取得此可序列化型別中包含的端點位址。 |
| ToString() |
傳回表示目前 物件的字串。 (繼承來源 Object) |
明確介面實作
| 名稱 | Description |
|---|---|
| IXmlSerializable.GetSchema() |
傳回 |
| IXmlSerializable.ReadXml(XmlReader) |
此成員支援 .NET Framework 基礎架構,並非直接從您的程式碼中使用。 |
| IXmlSerializable.WriteXml(XmlWriter) |
此成員支援 .NET Framework 基礎架構,並非直接從您的程式碼中使用。 |