EndpointAddressAugust2004 类

定义

提供可序列化的终结点地址类型,该类型与 WS-Addressing 2004 年 8 月版兼容,且可使终结点作为服务协定的一部分进行公开。Provides a serializable type of endpoint address that is compliant with the version of WS-Addressing published in August 2004 and that enables it to be exposed as part of the service contract.

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 规范版本无关。The EndpointAddress is not serializable nor is it tied to a particular version of the WS-Addressing specification. Windows Communication Foundation (WCF)提供了一个类,该类提供可序列化的类型,@no__t 为-0,它符合 WS-ADDRESSING V1。Windows Communication Foundation (WCF) supplies a class that provides a serializable type, EndpointAddress10, which is WS-Addressing V1 compliant.

出于兼容目的,此类提供与 WS-Addressing 2004 年 8 月版兼容的包装程序,用于可进行序列化且已绑定到特定连网格式的 EndpointAddressThis class provides a WS-Addressing August 2004 compliant wrapper for the EndpointAddress that is serializable and bound to a particular wire format for legacy purposes. 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 being serialized on the wire.

方法

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 endpoint address from a specified cached schema.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToEndpointAddress()

检索此可序列化类型中包含的终结点地址。Retrieves the endpoint address contained in this serializable type.

ToString()

返回一个表示当前对象的 string。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.

适用于