mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
fix: IcdXmlConvert supports serializing arrays of different items
This commit is contained in:
parent
da4415a11c
commit
f03f49b376
1 changed files with 6 additions and 3 deletions
|
|
@ -138,9 +138,12 @@ namespace ICD.Common.Utils.Xml
|
|||
if (items == null)
|
||||
throw new ArgumentNullException("items");
|
||||
|
||||
IXmlConverter converter = XmlConverterAttribute.GetConverterForType(typeof(T));
|
||||
|
||||
SerializeArray(elementName, childElementName, writer, items, (w, element, item) => converter.WriteXml(w, element, item));
|
||||
SerializeArray(elementName, childElementName, writer, items,
|
||||
(w, element, item) =>
|
||||
{
|
||||
IXmlConverter converter = XmlConverterAttribute.GetConverterForInstance(item);
|
||||
converter.WriteXml(w, element, item);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue