EndpointAddress10 类

定义

提供符合 V1 WS-Addressing 的可序列化终结点地址类型,并使它能够作为服务协定的一部分公开。

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 标准的包装器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 基础结构,不应直接从代码使用。

适用于