WriteXmlRootElement Method
Definition
- Assemblies
- Cuemon.Xml.dll
WriteXmlRootElement<T>(IDecorator<XmlWriter>, T, Action<XmlWriter, T, XmlQualifiedEntity>, XmlQualifiedEntity)
Writes the XML root element to the enclosed XmlWriter of the specified decorator.
public static void WriteXmlRootElement<T>(this IDecorator<XmlWriter> decorator, T value, Action<XmlWriter, T, XmlQualifiedEntity> treeWriter, XmlQualifiedEntity rootEntity = null)
Parameters
decoratorIDecorator<XmlWriter>The IDecorator<T> to extend.
valueTThe object to serialize.
treeWriterAction<XmlWriter, T, XmlQualifiedEntity>The delegate used to write the XML hierarchy.
rootEntityXmlQualifiedEntityThe optional XmlQualifiedEntity that will provide the name of the root element.
Type Parameters
TThe type of the object to serialize.
Exceptions
- ArgumentNullException
decoratorcannot be null.