Files
DP44/Common/DTS.Common.Import/XML/XMLParseMMECustomChannels.cs
2026-04-17 14:55:32 -04:00

34 lines
1.1 KiB
C#

using DTS.Common.Import.Interfaces;
using System;
using System.Collections.Generic;
using System.Xml;
namespace DTS.Common.Import.XML
{
public class XMLParseMMECustomChannels : XMLParseBase
{
public XMLParseMMECustomChannels(XmlElement root, double importedVersion, Func<bool> isCancelled = null) : base(root, importedVersion, isCancelled)
{
}
public IImportNotification ImportNotification { get; set; }
public override void Parse(ref ImportObject importObject)
{
importObject.AddCustomChannels(ParseCustomChannels(_root));
}
public IEnumerable<ISO.MMEPossibleChannels> ParseCustomChannels(XmlElement root)
{
List<ISO.MMEPossibleChannels> channels = new List<ISO.MMEPossibleChannels>();
foreach (var node in root.ChildNodes)
{
if (node is XmlElement)
{
channels.Add(ISO.MMEPossibleChannels.ReadXML(node as XmlElement));
}
}
return channels;
}
}
}