AddEnumerableConverter Method
Definition
- Namespace
- Cuemon.Xml.Serialization.Converters
- Assemblies
- Cuemon.Xml.dll
AddEnumerableConverter(IDecorator<IList<XmlConverter>>, bool)
Adds an IEnumerable XML converter to the enclosed IList<T> of the specified decorator.
public static IDecorator<IList<XmlConverter>> AddEnumerableConverter(this IDecorator<IList<XmlConverter>> decorator, bool flattenItems = false)
Parameters
decoratorIDecorator<IList<XmlConverter>>The decorator that wraps the IList<T> to extend.
flattenItemsboolWhen
trueand a qualified element name is available, each collection item is serialized as a repeated element using that name instead of being wrapped in a genericItemelement. The default isfalse.
Returns
- IDecorator<IList<XmlConverter>>
A reference to
decoratorafter the operation has completed.
Exceptions
- ArgumentNullException
decoratorcannot be null.