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 XMLParseMMECustomPhysicalDimensions : XMLParseBase
|
||||
{
|
||||
public XMLParseMMECustomPhysicalDimensions(XmlElement root, double importedVersion, Func<bool> isCancelled = null) : base(root, importedVersion, isCancelled)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Parse(ref ImportObject importObject)
|
||||
{
|
||||
importObject.AddCustomPhysicalDimensions(ParsePhysicalDimensions(_root));
|
||||
}
|
||||
|
||||
private IEnumerable<ISO.MMEPhysicalDimensions> ParsePhysicalDimensions(XmlElement root)
|
||||
{
|
||||
List<ISO.MMEPhysicalDimensions> list = new List<ISO.MMEPhysicalDimensions>();
|
||||
|
||||
foreach (var child in root.ChildNodes)
|
||||
{
|
||||
if (IsCancelled()) { return list; }
|
||||
if (child is XmlElement)
|
||||
{
|
||||
list.Add(ISO.MMEPhysicalDimensions.ReadXML(child as XmlElement));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user