EndpointAddress10 類別

定義

提供符合 WS-Addressing V1 標準的端點位址之可序列化類型,使其公開為服務合約的一部分。

public ref class EndpointAddress10 : System::Xml::Serialization::IXmlSerializable
public class EndpointAddress10 : System.Xml.Serialization.IXmlSerializable
type EndpointAddress10 = class
    interface IXmlSerializable
Public Class EndpointAddress10
Implements IXmlSerializable
繼承
EndpointAddress10
實作

範例

// 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 EndpointAddress10 from the endpointAddress.
EndpointAddress10 epa10 = EndpointAddress10.FromEndpointAddress(epa1);

//Serialize and then deserializde the Endpoint10 type.

//Convert the EndpointAddress10 back into an EndpointAddress.
EndpointAddress epa2 = epa10.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 EndpointAddress10 from the endpointAddress.
Dim epa10 As EndpointAddress10 = EndpointAddress10.FromEndpointAddress(epa1)

'Serialize and then deserializde the Endpoint10 type.

'Convert the EndpointAddress10 back into an EndpointAddress.
Dim epa2 As EndpointAddress = epa10.ToEndpointAddress()

Console.WriteLine("The URI of the EndpointAddress is still {0}:", epa2.Uri)
Console.WriteLine()

備註

EndpointAddress 不可序列化,與 WS-Addressing 規格的特定版本也沒有密切的關係。 此類別會針對可序列化 (實作 EndpointAddress 介面) 且繫結至 WS-Addressing V1 Wire 格式的 ISerializable,提供符合 WS-Addressing V1 的包裝函式。 FromEndpointAddress(EndpointAddress) 方法會進行包裝,而 ToEndpointAddress 方法則進行解除包裝,允許網路上的端點位址在序列化後得以復原。

Windows Communication Foundation (WCF) 也提供類別,該類別提供可序列化類型, EndpointAddressAugust2004 此類別WS-Addressing 2004 年 8 月符合舊版用途規範。

方法

Equals(Object)

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

(繼承來源 Object)
FromEndpointAddress(EndpointAddress)

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

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetSchema(XmlSchemaSet)

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

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToEndpointAddress()

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

ToString()

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

(繼承來源 Object)

明確介面實作

IXmlSerializable.GetSchema()

傳回 null

IXmlSerializable.ReadXml(XmlReader)

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

IXmlSerializable.WriteXml(XmlWriter)

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

適用於