XmlSerializationWriter.AddWriteCallback(Type, String, String, XmlSerializationWriteCallback) Método
Definição
Armazena uma implementação do delegado XmlSerializationWriteCallback e o tipo ao qual ele se aplica para uma invocação posterior.Stores an implementation of the XmlSerializationWriteCallback delegate and the type it applies to, for a later invocation.
Esta API dá suporte à infraestrutura do produto e não deve ser usada diretamente do seu código.
protected:
void AddWriteCallback(Type ^ type, System::String ^ typeName, System::String ^ typeNs, System::Xml::Serialization::XmlSerializationWriteCallback ^ callback);
protected void AddWriteCallback (Type type, string typeName, string? typeNs, System.Xml.Serialization.XmlSerializationWriteCallback callback);
protected void AddWriteCallback (Type type, string typeName, string typeNs, System.Xml.Serialization.XmlSerializationWriteCallback callback);
member this.AddWriteCallback : Type * string * string * System.Xml.Serialization.XmlSerializationWriteCallback -> unit
Protected Sub AddWriteCallback (type As Type, typeName As String, typeNs As String, callback As XmlSerializationWriteCallback)
Parâmetros
- typeName
- String
O nome do tipo de objetos que são serializados.The name of the type of objects that are serialized.
- typeNs
- String
O namespace do tipo de objetos que são serializados.The namespace of the type of objects that are serialized.
- callback
- XmlSerializationWriteCallback
Uma instância do delegado XmlSerializationWriteCallback.An instance of the XmlSerializationWriteCallback delegate.
Comentários
Os membros protegidos do XmlSerializationWriter são destinados para uso somente por classes derivadas que são usadas internamente dentro da infraestrutura de serialização de .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.
Durante a inicialização, a infraestrutura de serialização XML .NET Framework gera e compila dinamicamente uma classe temporária para serialização que é derivada de XmlSerializationWriter .During initialization, the .NET Framework XML serialization infrastructure dynamically generates and compiles a temporary class for serialization that is derived from XmlSerializationWriter. Durante esse processo, o .NET Framework gera métodos de gravação que implementam o XmlSerializationWriteCallback delegado.During this process, the .NET Framework generates write methods that implement the XmlSerializationWriteCallback delegate. Ele faz isso para determinados mapeamentos entre tipos de .NET Framework e tipos de dados XML que são serializados por meio de XML codificado em SOAP e não são elementos raiz.It does so for certain mappings between .NET Framework types and XML data types that are serialized via SOAP-encoded XML and are not root elements. Em seguida, conforme necessário, um método Write é chamado durante a serialização.Then, as necessary, a write method is called during serialization.
Você não deve criar diretamente uma instância do XmlSerializationWriteCallback .You should not directly create an instance of XmlSerializationWriteCallback.
A codificação SOAP é descrita na seção 5 da especificação SOAP 1,1.SOAP encoding is described in Section 5 of the SOAP 1.1 specification.