init
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using DTS.Common.Import.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
|
||||
namespace DTS.Common.Import.XML
|
||||
{
|
||||
public class XMLParseMMECustomFineLoc2s : XMLParseBase
|
||||
{
|
||||
public XMLParseMMECustomFineLoc2s(XmlElement root, double importedVersion, Func<bool> isCancelled = null) : base(root, importedVersion, isCancelled)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Parse(ref ImportObject importObject)
|
||||
{
|
||||
importObject.AddCustomFineLoc2s(ParseCustomFineLoc2s(_root));
|
||||
}
|
||||
|
||||
private IEnumerable<ISO.MMEFineLocations2> ParseCustomFineLoc2s(XmlElement root)
|
||||
{
|
||||
List<ISO.MMEFineLocations2> list = new List<ISO.MMEFineLocations2>();
|
||||
|
||||
foreach (var child in root.ChildNodes)
|
||||
{
|
||||
if (IsCancelled()) { return list; }
|
||||
if (child is XmlElement)
|
||||
{
|
||||
list.Add(ISO.MMEFineLocations2.ReadXML(child as XmlElement));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user