EndpointAddress10 EndpointAddress10 EndpointAddress10 EndpointAddress10 Class

定义

提供可序列化的终结点地址类型,该类型与 WS-Addressing 1.0 版兼容,且可使终结点作为服务协定的一部分进行公开。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
继承
EndpointAddress10EndpointAddress10EndpointAddress10EndpointAddress10
实现

示例

// 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. 此类提供与 WS-Addressing 1.0 版兼容的包装程序,用于可通过实现 EndpointAddress 接口进行序列化且已绑定到 WS-Addressing 1.0 版连网格式的 ISerializableThis 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 年 8 月符合出于兼容目的。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) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
FromEndpointAddress(EndpointAddress) FromEndpointAddress(EndpointAddress) FromEndpointAddress(EndpointAddress) FromEndpointAddress(EndpointAddress)

使用指定的终结点地址初始化 EndpointAddress10 类的新实例。Initializes a new instance of the EndpointAddress10 class with a specified endpoint address.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetSchema(XmlSchemaSet) GetSchema(XmlSchemaSet) GetSchema(XmlSchemaSet) 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() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
ToEndpointAddress() ToEndpointAddress() ToEndpointAddress() ToEndpointAddress()

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

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema()

返回 nullReturns null.

IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) 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) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter)

此成员支持 .NET Framework 结构,不能在代码中直接使用。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

适用于