Table of Contents

AddEnumerableConverter Method

Definition

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

decorator IDecorator<IList<XmlConverter>>

The decorator that wraps the IList<T> to extend.

flattenItems bool

When true and a qualified element name is available, each collection item is serialized as a repeated element using that name instead of being wrapped in a generic Item element. The default is false.

Returns

IDecorator<IList<XmlConverter>>

A reference to decorator after the operation has completed.

Exceptions

ArgumentNullException

decorator cannot be null.