/// <summary> /// Finalize the XmlConfig table. /// </summary> /// <param name="tables">Collection of all tables.</param> private void FinalizeXmlConfigTable(TableCollection tables) { Table xmlConfigTable = tables["XmlConfig"]; if (null != xmlConfigTable) { foreach (Row row in xmlConfigTable.Rows) { Util.XmlConfig xmlConfig = (Util.XmlConfig) this.Core.GetIndexedElement(row); if (null == row[6] || 0 == (int)row[6]) { Util.XmlConfig parentXmlConfig = (Util.XmlConfig) this.Core.GetIndexedElement("XmlConfig", (string)row[2]); if (null != parentXmlConfig) { parentXmlConfig.AddChild(xmlConfig); } else { this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, xmlConfigTable.Name, row.GetPrimaryKey(DecompilerCore.PrimaryKeyDelimiter), "ElementPath", (string)row[2], "XmlConfig")); } } else { Wix.Component component = (Wix.Component) this.Core.GetIndexedElement("Component", (string)row[7]); if (null != component) { component.AddChild(xmlConfig); } else { this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, xmlConfigTable.Name, row.GetPrimaryKey(DecompilerCore.PrimaryKeyDelimiter), "Component_", (string)row[7], "Component")); } } } } }
/// <summary> /// Decompile the XmlConfig table. /// </summary> /// <param name="table">The table to decompile.</param> private void DecompileXmlConfigTable(Table table) { foreach (Row row in table.Rows) { Util.XmlConfig xmlConfig = new Util.XmlConfig(); xmlConfig.Id = (string)row[0]; xmlConfig.File = (string)row[1]; xmlConfig.ElementPath = (string)row[2]; if (null != row[3]) { xmlConfig.VerifyPath = (string)row[3]; } if (null != row[4]) { xmlConfig.Name = (string)row[4]; } if (null != row[5]) { xmlConfig.Value = (string)row[5]; } int flags = (int)row[6]; if (0x1 == (flags & 0x1)) { xmlConfig.Node = Util.XmlConfig.NodeType.element; } else if (0x2 == (flags & 0x2)) { xmlConfig.Node = Util.XmlConfig.NodeType.value; } else if (0x4 == (flags & 0x4)) { xmlConfig.Node = Util.XmlConfig.NodeType.document; } if (0x10 == (flags & 0x10)) { xmlConfig.Action = Util.XmlConfig.ActionType.create; } else if (0x20 == (flags & 0x20)) { xmlConfig.Action = Util.XmlConfig.ActionType.delete; } if (0x100 == (flags & 0x100)) { xmlConfig.On = Util.XmlConfig.OnType.install; } else if (0x200 == (flags & 0x200)) { xmlConfig.On = Util.XmlConfig.OnType.uninstall; } if (0x00001000 == (flags & 0x00001000)) { xmlConfig.PreserveModifiedDate = Util.YesNoType.yes; } if (null != row[8]) { xmlConfig.Sequence = (int)row[8]; } this.Core.IndexElement(row, xmlConfig); } }
/// <summary> /// Decompile the XmlConfig table. /// </summary> /// <param name="table">The table to decompile.</param> private void DecompileXmlConfigTable(Table table) { foreach (Row row in table.Rows) { Util.XmlConfig xmlConfig = new Util.XmlConfig(); xmlConfig.Id = (string)row[0]; xmlConfig.File = (string)row[1]; xmlConfig.ElementPath = (string)row[2]; if (null != row[3]) { xmlConfig.VerifyPath = (string)row[3]; } if (null != row[4]) { xmlConfig.Name = (string)row[4]; } if (null != row[5]) { xmlConfig.Value = (string)row[5]; } int flags = (int)row[6]; if (0x1 == (flags & 0x1)) { xmlConfig.Node = Util.XmlConfig.NodeType.element; } else if (0x2 == (flags & 0x2)) { xmlConfig.Node = Util.XmlConfig.NodeType.value; } if (0x4 == (flags & 0x4)) { xmlConfig.Action = Util.XmlConfig.ActionType.create; } else if (0x8 == (flags & 0x8)) { xmlConfig.Action = Util.XmlConfig.ActionType.delete; } if (0x10 == (flags & 0x10)) { xmlConfig.On = Util.XmlConfig.OnType.install; } else if (0x20 == (flags & 0x20)) { xmlConfig.On = Util.XmlConfig.OnType.uninstall; } if (null != row[8]) { xmlConfig.Sequence = (int)row[8]; } this.Core.IndexElement(row, xmlConfig); } }