EndpointAddress10 類別

定義

提供符合 WS-Addressing V1 標準的端點位址之可序列化類型,使其公開為服務合約的一部分。Provides a serializable type of endpoint address that is WS-Addressing V1 compliant and that enables it to be exposed as part of the service contract.

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 規格的特定版本也沒有密切的關係。The EndpointAddress is not serializable nor is it tied to a particular version of the WS-Addressing specification. 此類別會針對可序列化 (實作 EndpointAddress 介面) 且繫結至 WS-Addressing V1 Wire 格式的 ISerializable,提供符合 WS-Addressing V1 的包裝函式。This class provides a WS-Addressing V1 compliant wrapper for the EndpointAddress that is serializable (implements the ISerializable interface) and bound to the WS-Addressing V1 wire format. FromEndpointAddress(EndpointAddress) 方法會進行包裝,而 ToEndpointAddress 方法則進行解除包裝,允許網路上的端點位址在序列化後得以復原。The FromEndpointAddress(EndpointAddress) method does the wrapping and the ToEndpointAddress method does the unwrapping, allowing the recovery of the endpoint address after it is serialized on the wire.

Windows Communication Foundation (WCF)也會提供可序列化類型的類別,EndpointAddressAugust2004,這是適用于舊版用途的 WS-ADDRESSING 2004。Windows Communication Foundation (WCF) also supplies a class that provides a serializable type, EndpointAddressAugust2004, which is WS-Addressing August 2004 compliant for legacy purposes.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
FromEndpointAddress(EndpointAddress)

使用指定的端點位址,初始化 EndpointAddress10 類別的新執行個體。Initializes a new instance of the EndpointAddress10 class with a specified endpoint address.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetSchema(XmlSchemaSet)

自指定的快取結構描述傳回 XML 限定名稱,用以描述版本 1.0 端點位址的 XML 表示方式。Returns an XML-qualified name that describes the XML representation of the version 1.0 endpoint address from a specified cached schema.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToEndpointAddress()

擷取包含在這個可序列化型別的端點位址。Retrieves the endpoint address contained in this serializable type.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

明確介面實作

IXmlSerializable.GetSchema()

傳回 nullReturns null.

IXmlSerializable.ReadXml(XmlReader)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.WriteXml(XmlWriter)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

適用於