EndpointAddressAugust2004 類別

定義

提供符合 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 相容。

此類別針對 EndpointAddress 提供相容於 2004 年 8 月 WS-Addressing 的包裝函式,並且為考量舊版相容性,繫結至特定的 Wire 格式。 FromEndpointAddress(EndpointAddress) 方法會進行包裝而 ToEndpointAddress 方法則進行解除包裝,允許網路上的端點位址在序列化後得以復原。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
FromEndpointAddress(EndpointAddress)

使用指定的端點位址,初始化 EndpointAddress10 類別的新執行個體。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetSchema(XmlSchemaSet)

自指定的快取結構描述傳回 XML 限定名稱,用以描述版本 1 端點位址的 XML 表示方式。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToEndpointAddress()

擷取包含在這個可序列化型別的端點位址。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

IXmlSerializable.GetSchema()

傳回 null

IXmlSerializable.ReadXml(XmlReader)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。

IXmlSerializable.WriteXml(XmlWriter)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。

適用於