diff --git a/GBase/DataHandling/XmlDataReader.cs b/GBase/DataHandling/XmlDataReader.cs index 6337558..a360fda 100644 --- a/GBase/DataHandling/XmlDataReader.cs +++ b/GBase/DataHandling/XmlDataReader.cs @@ -12,16 +12,25 @@ using System.Threading.Tasks; using System.Xml.Linq; using GBase.DataHandling.Exceptions; using GBase.Helpers; +using GBase.Interfaces; using GBase.Interfaces.DataHandling; using GBase.Interfaces.DataHandling.Xml; namespace GBase.DataHandling { /// - /// A that reads from a xml file + /// An that reads from a xml file /// public class XmlDataReader : IXmlDataReader { + private readonly IGBase _gBase; + + /// + /// An that reads from a xml file + /// + /// The + public XmlDataReader(IGBase gBase) => _gBase = gBase; + /// /// Read the data of a property /// @@ -66,7 +75,7 @@ namespace GBase.DataHandling IEnumerable values = valueElements.Select(v => v.Value); if (typeof(TProperty) != typeof(string) && typeof(TProperty).GetInterfaces().Contains(typeof(IEnumerable))) //read property is an IEnumerable - return values.Select(Enumerables.ConvertToGBaseEnumerable).ToList(); + return values.Select(s => Enumerables.ConvertToGBaseEnumerable(s, _gBase)).ToList(); return values.Select(value => (TProperty) Convert.ChangeType(value, typeof(TProperty))).ToList(); }, cancellationToken);