diff --git a/GBase/DataHandling/XmlDataReader.cs b/GBase/DataHandling/XmlDataReader.cs index 979fe01..04b78c0 100644 --- a/GBase/DataHandling/XmlDataReader.cs +++ b/GBase/DataHandling/XmlDataReader.cs @@ -3,6 +3,7 @@ // Copyright(c) 2020 SimonG. All Rights Reserved. using System; +using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; @@ -88,6 +89,12 @@ namespace GBase.DataHandling return null; IEnumerable values = valueElements.Select(v => v.Value); + + if (typeof(TProperty) != typeof(string) && typeof(TProperty).GetInterfaces().Contains(typeof(IEnumerable))) + { + return null; //FixMe: Implement handling for IEnumerables + } + return values.Select(value => (TProperty)Convert.ChangeType(value, typeof(TProperty))).ToList(); }, _cancellationToken); }