From 534d79c4434c4a165f4d82ddf033fa43768c3357 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 23 Oct 2019 12:48:22 -0700 Subject: Remove BootstrapperApplicationData generally in favor of Unreal --- .../WindowsInstaller/TableDefinition.cs | 34 ++++++---------------- 1 file changed, 9 insertions(+), 25 deletions(-) (limited to 'src/WixToolset.Data/WindowsInstaller') diff --git a/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs b/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs index bc7fb537..ee8ab0c1 100644 --- a/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs +++ b/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs @@ -4,7 +4,7 @@ namespace WixToolset.Data.WindowsInstaller { using System; using System.Collections.Generic; - using System.Collections.ObjectModel; + using System.Linq; using System.Xml; /// @@ -24,14 +24,12 @@ namespace WixToolset.Data.WindowsInstaller /// Name of table to create. /// Column definitions for the table. /// Flag if table is unreal. - /// Flag if table is part of UX Manifest. - public TableDefinition(string name, ColumnDefinition[] columns, bool unreal = false, bool bootstrapperApplicationData = false) + public TableDefinition(string name, IEnumerable columns, bool unreal = false) { this.Name = name; this.Unreal = unreal; - this.BootstrapperApplicationData = bootstrapperApplicationData; - this.Columns = columns; + this.Columns = columns.ToArray(); } /// @@ -46,12 +44,6 @@ namespace WixToolset.Data.WindowsInstaller /// Flag if table is unreal. public bool Unreal { get; private set; } - /// - /// Gets if the table is a part of the bootstrapper application data manifest. - /// - /// Flag if table is a part of the bootstrapper application data manifest. - public bool BootstrapperApplicationData { get; private set; } - /// /// Gets the collection of column definitions for this table. /// @@ -82,7 +74,7 @@ namespace WixToolset.Data.WindowsInstaller } // compare the table names - int ret = String.Compare(this.Name, updated.Name, StringComparison.Ordinal); + var ret = String.Compare(this.Name, updated.Name, StringComparison.Ordinal); // compare the column count if (0 == ret) @@ -91,10 +83,10 @@ namespace WixToolset.Data.WindowsInstaller ret = Math.Min(0, updated.Columns.Length - this.Columns.Length); // compare name, type, and length of each column - for (int i = 0; 0 == ret && this.Columns.Length > i; i++) + for (var i = 0; 0 == ret && this.Columns.Length > i; i++) { - ColumnDefinition thisColumnDef = this.Columns[i]; - ColumnDefinition updatedColumnDef = updated.Columns[i]; + var thisColumnDef = this.Columns[i]; + var updatedColumnDef = updated.Columns[i]; ret = thisColumnDef.CompareTo(updatedColumnDef); } @@ -125,9 +117,6 @@ namespace WixToolset.Data.WindowsInstaller case "unreal": unreal = reader.Value.Equals("yes"); break; - case "bootstrapperApplicationData": - bootstrapperApplicationData = reader.Value.Equals("yes"); - break; } } @@ -181,7 +170,7 @@ namespace WixToolset.Data.WindowsInstaller } } - return new TableDefinition(name, columns.ToArray(), unreal, bootstrapperApplicationData); + return new TableDefinition(name, columns.ToArray(), unreal); } /// @@ -199,12 +188,7 @@ namespace WixToolset.Data.WindowsInstaller writer.WriteAttributeString("unreal", "yes"); } - if (this.BootstrapperApplicationData) - { - writer.WriteAttributeString("bootstrapperApplicationData", "yes"); - } - - foreach (ColumnDefinition columnDefinition in this.Columns) + foreach (var columnDefinition in this.Columns) { columnDefinition.Write(writer); } -- cgit v1.2.3-55-g6feb