mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 04:35:00 +00:00
fix: Fixed bug preventing deserialization of XML lists
This commit is contained in:
@@ -72,7 +72,12 @@ namespace ICD.Common.Utils.Xml
|
||||
throw new ArgumentNullException("type");
|
||||
|
||||
using (IcdXmlReader reader = new IcdXmlReader(xml))
|
||||
return DeserializeObject(type, reader);
|
||||
{
|
||||
if (reader.ReadToNextElement())
|
||||
return DeserializeObject(type, reader);
|
||||
|
||||
throw new FormatException("Expected element in XML");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user