diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-27 14:23:39 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-27 14:23:39 -0800 |
| commit | 68075faa4a60e8016ea7653cfc1396cd00e3f646 (patch) | |
| tree | 4656616a3f1030620594ee38a280e4dab8ab9e8e /src | |
| parent | 9813f0b4054ab0c003529699d1a467db90395980 (diff) | |
| download | wix-68075faa4a60e8016ea7653cfc1396cd00e3f646.tar.gz wix-68075faa4a60e8016ea7653cfc1396cd00e3f646.tar.bz2 wix-68075faa4a60e8016ea7653cfc1396cd00e3f646.zip | |
Integrate latest Data and Extensibility changes and build light.exe
Diffstat (limited to 'src')
9 files changed, 14 insertions, 17 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs index 9afb3260..6b1dead5 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs | |||
| @@ -69,9 +69,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 69 | return; | 69 | return; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | if (TableDefinition.MaxColumnsInRealTable < table.Definition.Columns.Count) | 72 | if (TableDefinition.MaxColumnsInRealTable < table.Definition.Columns.Length) |
| 73 | { | 73 | { |
| 74 | throw new WixException(ErrorMessages.TooManyColumnsInRealTable(table.Definition.Name, table.Definition.Columns.Count, TableDefinition.MaxColumnsInRealTable)); | 74 | throw new WixException(ErrorMessages.TooManyColumnsInRealTable(table.Definition.Name, table.Definition.Columns.Length, TableDefinition.MaxColumnsInRealTable)); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | // Tack on the table header, and flush before we start writing bytes directly to the stream. | 77 | // Tack on the table header, and flush before we start writing bytes directly to the stream. |
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index 0642d217..ac770823 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs | |||
| @@ -254,7 +254,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 254 | var row = table.CreateRow(tuple.SourceLineNumbers); | 254 | var row = table.CreateRow(tuple.SourceLineNumbers); |
| 255 | for (var i = 0; i < tuple.Fields.Length; ++i) | 255 | for (var i = 0; i < tuple.Fields.Length; ++i) |
| 256 | { | 256 | { |
| 257 | if (i < tableDefinition.Columns.Count) | 257 | if (i < tableDefinition.Columns.Length) |
| 258 | { | 258 | { |
| 259 | var column = tableDefinition.Columns[i]; | 259 | var column = tableDefinition.Columns[i]; |
| 260 | 260 | ||
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs index cc920ac2..3357db3e 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs | |||
| @@ -219,7 +219,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 219 | // Import each row containing a stream | 219 | // Import each row containing a stream |
| 220 | foreach (Row row in table.Rows) | 220 | foreach (Row row in table.Rows) |
| 221 | { | 221 | { |
| 222 | using (Record record = new Record(table.Definition.Columns.Count)) | 222 | using (Record record = new Record(table.Definition.Columns.Length)) |
| 223 | { | 223 | { |
| 224 | StringBuilder streamName = new StringBuilder(); | 224 | StringBuilder streamName = new StringBuilder(); |
| 225 | bool needStream = false; | 225 | bool needStream = false; |
| @@ -230,7 +230,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 230 | streamName.Append(table.Name); | 230 | streamName.Append(table.Name); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | for (int i = 0; i < table.Definition.Columns.Count; i++) | 233 | for (int i = 0; i < table.Definition.Columns.Length; i++) |
| 234 | { | 234 | { |
| 235 | ColumnDefinition columnDefinition = table.Definition.Columns[i]; | 235 | ColumnDefinition columnDefinition = table.Definition.Columns[i]; |
| 236 | 236 | ||
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ModularaizeCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ModularaizeCommand.cs index 03538fc3..8c6e3831 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/ModularaizeCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/ModularaizeCommand.cs | |||
| @@ -48,7 +48,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 48 | var modularizedColumns = new List<int>(); | 48 | var modularizedColumns = new List<int>(); |
| 49 | 49 | ||
| 50 | // find the modularized columns | 50 | // find the modularized columns |
| 51 | for (var i = 0; i < table.Definition.Columns.Count; ++i) | 51 | for (var i = 0; i < table.Definition.Columns.Length; ++i) |
| 52 | { | 52 | { |
| 53 | if (ColumnModularizeType.None != table.Definition.Columns[i].ModularizeType) | 53 | if (ColumnModularizeType.None != table.Definition.Columns[i].ModularizeType) |
| 54 | { | 54 | { |
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs index 5d24d08a..f4e05489 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | |||
| @@ -127,7 +127,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 127 | 127 | ||
| 128 | using (View tableView = this.Database.OpenExecuteView(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM `{0}`", tableName))) | 128 | using (View tableView = this.Database.OpenExecuteView(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM `{0}`", tableName))) |
| 129 | { | 129 | { |
| 130 | List<ColumnDefinition> columns; | 130 | ColumnDefinition[] columns; |
| 131 | using (Record columnNameRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFONAMES), | 131 | using (Record columnNameRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFONAMES), |
| 132 | columnTypeRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFOTYPES)) | 132 | columnTypeRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFOTYPES)) |
| 133 | { | 133 | { |
| @@ -144,7 +144,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | int columnCount = columnNameRecord.GetFieldCount(); | 146 | int columnCount = columnNameRecord.GetFieldCount(); |
| 147 | columns = new List<ColumnDefinition>(columnCount); | 147 | columns = new ColumnDefinition[columnCount]; |
| 148 | for (int i = 1; i <= columnCount; i++) | 148 | for (int i = 1; i <= columnCount; i++) |
| 149 | { | 149 | { |
| 150 | string columnName = columnNameRecord.GetString(i); | 150 | string columnName = columnNameRecord.GetString(i); |
| @@ -260,7 +260,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 260 | columnModularizeType = ColumnModularizeType.Column; | 260 | columnModularizeType = ColumnModularizeType.Column; |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | columns.Add(new ColumnDefinition(columnName, columnType, length, primary, nullable, columnCategory, minValue, maxValue, keyTable, keyColumn, set, description, columnModularizeType, (ColumnType.Localized == columnType), true)); | 263 | columns[i - 1] = new ColumnDefinition(columnName, columnType, length, primary, nullable, columnCategory, minValue, maxValue, keyTable, keyColumn, set, description, columnModularizeType, (ColumnType.Localized == columnType), true); |
| 264 | } | 264 | } |
| 265 | } | 265 | } |
| 266 | 266 | ||
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs index 00e5a755..80401822 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindTranformCommand.cs | |||
| @@ -212,7 +212,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 212 | 212 | ||
| 213 | // mark the field as modified | 213 | // mark the field as modified |
| 214 | int indexOfModifiedValue = -1; | 214 | int indexOfModifiedValue = -1; |
| 215 | for (int i = 0; i < modifiedRow.TableDefinition.Columns.Count; ++i) | 215 | for (int i = 0; i < modifiedRow.TableDefinition.Columns.Length; ++i) |
| 216 | { | 216 | { |
| 217 | if (columnName.Equals(modifiedRow.TableDefinition.Columns[i].Name, StringComparison.Ordinal)) | 217 | if (columnName.Equals(modifiedRow.TableDefinition.Columns[i].Name, StringComparison.Ordinal)) |
| 218 | { | 218 | { |
| @@ -270,7 +270,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 270 | string[] primaryKeyParts = primaryKeys.Split('\t'); | 270 | string[] primaryKeyParts = primaryKeys.Split('\t'); |
| 271 | int primaryKeyPartIndex = 0; | 271 | int primaryKeyPartIndex = 0; |
| 272 | 272 | ||
| 273 | for (int i = 0; i < table.Definition.Columns.Count; i++) | 273 | for (int i = 0; i < table.Definition.Columns.Length; i++) |
| 274 | { | 274 | { |
| 275 | ColumnDefinition columnDefinition = table.Definition.Columns[i]; | 275 | ColumnDefinition columnDefinition = table.Definition.Columns[i]; |
| 276 | 276 | ||
diff --git a/src/WixToolset.Core/ExtensibilityServices/WindowsInstallerBackendHelper.cs b/src/WixToolset.Core/ExtensibilityServices/WindowsInstallerBackendHelper.cs index 3b41fdf1..6e0ffce6 100644 --- a/src/WixToolset.Core/ExtensibilityServices/WindowsInstallerBackendHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/WindowsInstallerBackendHelper.cs | |||
| @@ -30,7 +30,7 @@ namespace WixToolset.Core.ExtensibilityServices | |||
| 30 | var row = table.CreateRow(tuple.SourceLineNumbers); | 30 | var row = table.CreateRow(tuple.SourceLineNumbers); |
| 31 | for (var i = 0; i < tuple.Fields.Length; ++i) | 31 | for (var i = 0; i < tuple.Fields.Length; ++i) |
| 32 | { | 32 | { |
| 33 | if (i < tableDefinition.Columns.Count) | 33 | if (i < tableDefinition.Columns.Length) |
| 34 | { | 34 | { |
| 35 | var column = tableDefinition.Columns[i]; | 35 | var column = tableDefinition.Columns[i]; |
| 36 | 36 | ||
diff --git a/src/test/TestData/Example.Extension/ExampleCompilerExtension.cs b/src/test/TestData/Example.Extension/ExampleCompilerExtension.cs index 5b20e48f..cd9e1fb9 100644 --- a/src/test/TestData/Example.Extension/ExampleCompilerExtension.cs +++ b/src/test/TestData/Example.Extension/ExampleCompilerExtension.cs | |||
| @@ -10,10 +10,7 @@ namespace Example.Extension | |||
| 10 | 10 | ||
| 11 | internal class ExampleCompilerExtension : BaseCompilerExtension | 11 | internal class ExampleCompilerExtension : BaseCompilerExtension |
| 12 | { | 12 | { |
| 13 | public ExampleCompilerExtension() | 13 | public override XNamespace Namespace => "http://www.example.com/scheams/v1/wxs"; |
| 14 | { | ||
| 15 | this.Namespace = "http://www.example.com/scheams/v1/wxs"; | ||
| 16 | } | ||
| 17 | 14 | ||
| 18 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | 15 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) |
| 19 | { | 16 | { |
diff --git a/src/test/TestData/Example.Extension/ExampleTableDefinitions.cs b/src/test/TestData/Example.Extension/ExampleTableDefinitions.cs index 870b02e1..16da1316 100644 --- a/src/test/TestData/Example.Extension/ExampleTableDefinitions.cs +++ b/src/test/TestData/Example.Extension/ExampleTableDefinitions.cs | |||
| @@ -9,7 +9,7 @@ namespace Example.Extension | |||
| 9 | { | 9 | { |
| 10 | public static readonly TableDefinition ExampleTable = new TableDefinition( | 10 | public static readonly TableDefinition ExampleTable = new TableDefinition( |
| 11 | "Example", | 11 | "Example", |
| 12 | new List<ColumnDefinition> | 12 | new[] |
| 13 | { | 13 | { |
| 14 | new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier), | 14 | new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier), |
| 15 | new ColumnDefinition("Value", ColumnType.String, 0, false, false, ColumnCategory.Formatted), | 15 | new ColumnDefinition("Value", ColumnType.String, 0, false, false, ColumnCategory.Formatted), |
