WriteObject Method
Definition
- Namespace
- Cuemon.Extensions.Xml
- Assemblies
- Cuemon.Extensions.Xml.dll
WriteObject<T>(XmlWriter, T, Action<XmlFormatterOptions>)
Serializes the specified value into an XML format.
public static void WriteObject<T>(this XmlWriter writer, T value, Action<XmlFormatterOptions> setup = null)
Parameters
writerXmlWriterThe XmlWriter to extend.
valueTThe object to serialize.
setupAction<XmlFormatterOptions>The XmlFormatterOptions which may be configured.
Type Parameters
TThe type of the object to serialize.
Exceptions
- ArgumentNullException
writercannot be null.
WriteObject(XmlWriter, object, Type, Action<XmlFormatterOptions>)
Serializes the specified value into an XML format.
public static void WriteObject(this XmlWriter writer, object value, Type objectType, Action<XmlFormatterOptions> setup = null)
Parameters
writerXmlWriterThe XmlWriter to extend.
valueobjectThe object to serialize.
objectTypeTypeThe type of the object to serialize.
setupAction<XmlFormatterOptions>The XmlFormatterOptions which may be configured.
Exceptions
- ArgumentNullException
writercannot be null.