XmlSerializationWriter.InitCallbacks 方法
定义
初始化 XmlSerializationWriteCallback 委托的一个实例,以序列化 SOAP 编码的 XML 数据。Initializes an instances of the XmlSerializationWriteCallback delegate to serialize SOAP-encoded XML data.
此 API 支持产品基础结构,不能在代码中直接使用。
protected:
abstract void InitCallbacks();
protected abstract void InitCallbacks ();
abstract member InitCallbacks : unit -> unit
Protected MustOverride Sub InitCallbacks ()
注解
的受保护成员 XmlSerializationWriter 仅供在 .NET FRAMEWORK XML 序列化基础结构内部使用的派生类使用。The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.
在初始化期间,.NET Framework XML 序列化基础结构会动态生成和编译派生自的序列化的临时类 XmlSerializationWriter 。During initialization, the .NET Framework XML serialization infrastructure dynamically generates and compiles a temporary class for serialization that is derived from XmlSerializationWriter. 在此过程中,.NET Framework 生成实现委托的写入方法 XmlSerializationWriteCallback 。During this process, the .NET Framework generates write methods that implement the XmlSerializationWriteCallback delegate. 它用于在 .NET Framework 类型和 XML 数据类型之间进行特定映射,这些映射使用 SOAP 编码的 XML 进行序列化,而不是根元素。It does so for certain mappings between .NET Framework types and XML data types that are serialized using SOAP-encoded XML and are not root elements. 然后,根据需要,在序列化过程中调用 write 方法。Then, as necessary, a write method is called during serialization.
抽象 InitCallbacks 方法是临时派生类创建的实例并初始化写入回调方法的位置。The abstract InitCallbacks method is where the temporary derived class creates an instance of and initializes write callback methods.
不应直接创建的实例 XmlSerializationWriteCallback 。You should not directly create an instance of XmlSerializationWriteCallback.
Soap 编码在 SOAP 1.1 规范的第5节中进行了介绍。SOAP encoding is described in Section 5 of the SOAP 1.1 specification.