mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
fix: Fixed bug preventing deserialization of XML lists
This commit is contained in:
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|||||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Changed
|
||||||
|
- Fixed bug preventing deserialization of XML lists
|
||||||
|
|
||||||
## [9.1.0] - 2019-02-07
|
## [9.1.0] - 2019-02-07
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -72,7 +72,12 @@ namespace ICD.Common.Utils.Xml
|
|||||||
throw new ArgumentNullException("type");
|
throw new ArgumentNullException("type");
|
||||||
|
|
||||||
using (IcdXmlReader reader = new IcdXmlReader(xml))
|
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>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user