WriteObject Method
Definition
- Assemblies
- Cuemon.Xml.dll
WriteObject<T>(IDecorator<XmlWriter>, T, Action<XmlFormatterOptions>)
Serializes the specified value into an XML format of the enclosed XmlWriter of the specified decorator.
public static void WriteObject<T>(this IDecorator<XmlWriter> decorator, T value, Action<XmlFormatterOptions> setup = null)
Parameters
decoratorIDecorator<XmlWriter>The IDecorator<T> 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
decoratorcannot be null.
WriteObject(IDecorator<XmlWriter>, object, Type, Action<XmlFormatterOptions>)
Serializes the specified value into an XML format of the enclosed XmlWriter of the specified decorator.
public static void WriteObject(this IDecorator<XmlWriter> decorator, object value, Type objectType, Action<XmlFormatterOptions> setup = null)
Parameters
decoratorIDecorator<XmlWriter>The IDecorator<T> to extend.
valueobjectThe object to serialize.
objectTypeTypeThe type of the object to serialize.
setupAction<XmlFormatterOptions>The XmlFormatterOptions which may be configured.
Exceptions
- ArgumentNullException
decoratorcannot be null.