AtomPub10ServiceDocumentFormatter<TServiceDocument> 类

定义

一个格式化程序,该程序使用 Atom 1.0 格式在派生自 ServiceDocument 实例的类与 XML 之间来回序列化。A formatter that serializes classes derived from a ServiceDocument instance to and from XML using Atom 1.0 formats.

generic <typename TServiceDocument>
 where TServiceDocument : ServiceDocumentgcnew()public ref class AtomPub10ServiceDocumentFormatter : System::ServiceModel::Syndication::AtomPub10ServiceDocumentFormatter
public class AtomPub10ServiceDocumentFormatter<TServiceDocument> : System.ServiceModel.Syndication.AtomPub10ServiceDocumentFormatter where TServiceDocument : ServiceDocumentnew()
type AtomPub10ServiceDocumentFormatter<'ServiceDocument (requires 'ServiceDocument :> ServiceDocument and 'ServiceDocument : (new : unit -> 'ServiceDocument))> = class
    inherit AtomPub10ServiceDocumentFormatter
Public Class AtomPub10ServiceDocumentFormatter(Of TServiceDocument)
Inherits AtomPub10ServiceDocumentFormatter

类型参数

TServiceDocument

派生自 ServiceDocument 实例的类,该实例将使用 Atom 1.0 格式序列化为 XML 或从 XML 进行反序列化。The class derived from a ServiceDocument instance that is to be serialized to XML or deserialized from XML using Atom 1.0 formatting.

继承
AtomPub10ServiceDocumentFormatter<TServiceDocument>

注解

如果要序列化或反列化 ServiceDocument 实例,而不是派生自该 ServiceDocument 的实例的对象,请改用 AtomPub10ServiceDocumentFormatter 格式化程序。If you want to serialize or deserialized a ServiceDocument instance instead of an object derived from this an instance of ServiceDocument, use the AtomPub10ServiceDocumentFormatter formatter instead.

构造函数

AtomPub10ServiceDocumentFormatter<TServiceDocument>()

创建 ServiceDocumentFormatter 类的新实例。Creates a new instance of the ServiceDocumentFormatter class.

AtomPub10ServiceDocumentFormatter<TServiceDocument>(TServiceDocument)

创建基于 Atom 1.0 的 ServiceDocumentFormatter 类的新实例。Creates a new instance of the Atom 1.0-based ServiceDocumentFormatter class.

属性

Document

获取与格式化程序关联的 ServiceDocumentGets the ServiceDocument associated with the formatter.

(继承自 ServiceDocumentFormatter)
Version

获取 Atom 发布协议命名空间的名称。Gets the name of Atom Publishing Protocol namespace.

(继承自 AtomPub10ServiceDocumentFormatter)

方法

CanRead(XmlReader)

测试指定的 XML 读取器是否包含有效的服务文档。Tests whether the specified XML reader contains a valid service document.

(继承自 AtomPub10ServiceDocumentFormatter)
CreateDocumentInstance()

创建与 Atom 1.0 格式化程序关联的 ServiceDocument 新实例。Creates a new ServiceDocument instance associated with the Atom 1.0 formatter.

Equals(Object)

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

(继承自 Object)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
MemberwiseClone()

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

(继承自 Object)
ReadFrom(XmlReader)

从指定的 XML 读取器中生成 ServiceDocument 对象。Generates a ServiceDocument object from a specified XML reader.

(继承自 AtomPub10ServiceDocumentFormatter)
SetDocument(ServiceDocument)

设置要写入的 ServiceDocumentSets the ServiceDocument to write.

(继承自 ServiceDocumentFormatter)
ToString()

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

(继承自 Object)
WriteTo(XmlWriter)

将与格式化程序关联的 ServiceDocument 对象写入指定的 XML 编写器。Writes a ServiceDocument object associated with the formatter to a specified XML writer.

(继承自 AtomPub10ServiceDocumentFormatter)

显式接口实现

IXmlSerializable.GetSchema()

此方法是保留方法,请不要使用。This method is reserved and should not be used.

(继承自 AtomPub10ServiceDocumentFormatter)
IXmlSerializable.ReadXml(XmlReader)

从 XML 的表示形式生成 ServiceDocumentGenerates a ServiceDocument from its XML representation.

(继承自 AtomPub10ServiceDocumentFormatter)
IXmlSerializable.WriteXml(XmlWriter)

ServiceDocument 转换为其 XML 表示形式。Converts the ServiceDocument into its XML representation.

(继承自 AtomPub10ServiceDocumentFormatter)

适用于