EndpointAddressAugust2004 类

定义

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

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。

出于兼容目的,此类提供与 WS-Addressing 2004 年 8 月版兼容的包装程序,用于可进行序列化且已绑定到特定连网格式的 EndpointAddressFromEndpointAddress(EndpointAddress) 方法执行包装操作,ToEndpointAddress 方法执行取消包装操作,以便在网络上序列化终结点地址后可以对其进行恢复。

方法

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 结构,不能在代码中直接使用。

适用于