private static void GetProperties(Dictionary<ulong, object> items, XmlNode parentNode) { foreach (XmlNode childNode in parentNode.ChildNodes) { if (childNode.NodeType == XmlNodeType.Element) { GXDLT645Data item = new GXDLT645Data(childNode.Attributes["Name"].Value); item.DataID = Convert.ToUInt64(childNode.Attributes["ID"].Value, 16); if (childNode.Attributes["Type"] != null) { item.Type = (DataType)Enum.Parse(typeof(DataType), childNode.Attributes["Type"].Value); } if (childNode.Attributes["Access"] != null) { item.Access = (AccessMode)Enum.Parse(typeof(AccessMode), childNode.Attributes["Access"].Value); } items.Add(item.DataID, item); } } }
private static void GetColumns(GXDLT645TableTemplate table, XmlNode parentNode) { foreach (XmlNode childNode in parentNode.ChildNodes) { if (childNode.NodeType == XmlNodeType.Element) { GXDLT645Data item = new GXDLT645Data(childNode.Attributes["Name"].Value); if (childNode.Attributes["Type"] != null) { item.Type = (DataType)Enum.Parse(typeof(DataType), childNode.Attributes["Type"].Value); } table.Columns.Add(item); } } }