using DTS.Common.Import.Interfaces; using System; using System.Collections.Generic; using System.Xml; namespace DTS.Common.Import.XML { public class XMLParseMMECustomMainLocations : XMLParseBase { public XMLParseMMECustomMainLocations(XmlElement root, double importedVersion, Func isCancelled = null) : base(root, importedVersion, isCancelled) { } public override void Parse(ref ImportObject importObject) { importObject.AddCustomMainLocations(ParseCustomMainLocations(_root)); } public IEnumerable ParseCustomMainLocations(XmlElement root) { List list = new List(); foreach (var node in root.ChildNodes) { if (IsCancelled()) { return list; } if (node is XmlElement) { list.Add(ISO.MMETransducerMainLocation.ReadXML(node as XmlElement)); } } return list; } } }