XmlSerializerSerializeContent(XmlWriter, Object, XmlSerializationOptions) Method
Saves public properties or collection elements of an object given in
obj parameter
by an already opened
XmlWriter object given in
writer parameter
with provided
options.
Namespace: KGySoft.Serialization.XmlAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
public static void SerializeContent(
XmlWriter writer,
Object obj,
XmlSerializationOptions options = XmlSerializationOptions.CompactSerializationOfPrimitiveArrays|XmlSerializationOptions.EscapeNewlineCharacters
)
Public Shared Sub SerializeContent (
writer As XmlWriter,
obj As Object,
Optional options As XmlSerializationOptions = XmlSerializationOptions.CompactSerializationOfPrimitiveArrays Or XmlSerializationOptions.EscapeNewlineCharacters
)
public:
static void SerializeContent(
XmlWriter^ writer,
Object^ obj,
XmlSerializationOptions options = XmlSerializationOptions::CompactSerializationOfPrimitiveArrays|XmlSerializationOptions::EscapeNewlineCharacters
)
static member SerializeContent :
writer : XmlWriter *
obj : Object *
?options : XmlSerializationOptions
(* Defaults:
let _options = defaultArg options XmlSerializationOptions.CompactSerializationOfPrimitiveArrays|XmlSerializationOptions.EscapeNewlineCharacters
*)
-> unit
Parameters
- writer XmlWriter
- A preconfigured XmlWriter object that will be used for serialization. The writer must be in proper state to serialize obj properly
and will not be closed or flushed after serialization.
- obj Object
- The object, which inner content should be serialized. Parameter value must not be .
- options XmlSerializationOptions (Optional)
- Options for serialization. This parameter is optional.
Default value: CompactSerializationOfPrimitiveArrays, EscapeNewlineCharacters