EndpointAddress10 类

定义

提供可序列化的终结点地址类型,该类型与 WS-Addressing 1.0 版兼容,且可使终结点作为服务协定的一部分进行公开。

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 规范版本无关。 此类提供与 WS-Addressing 1.0 版兼容的包装程序,用于可通过实现 EndpointAddress 接口进行序列化且已绑定到 WS-Addressing 1.0 版连网格式的 ISerializableFromEndpointAddress(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 结构,不能在代码中直接使用。

适用于