From 11112ebcdf97d4fa53e34d9dfe48410ff2378435 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 3 Apr 2020 11:38:20 +1000 Subject: Use TupleIdIsPrimaryKey. --- .../Bind/CreateOutputFromIRCommand.cs | 24 ++-------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index 3a165582..79b7b67b 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs @@ -64,10 +64,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.AddAssemblyTuple((AssemblyTuple)tuple); break; - case TupleDefinitionType.Binary: - this.AddTupleDefaultly(tuple, idIsPrimaryKey: true); - break; - case TupleDefinitionType.BBControl: this.AddBBControlTuple((BBControlTuple)tuple); break; @@ -112,10 +108,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.AddFileTuple((FileTuple)tuple); break; - case TupleDefinitionType.Icon: - this.AddTupleDefaultly(tuple, idIsPrimaryKey: true); - break; - case TupleDefinitionType.IniFile: this.AddIniFileTuple((IniFileTuple)tuple); break; @@ -144,10 +136,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.AddMsiServiceConfigFailureActionsTuple((MsiServiceConfigFailureActionsTuple)tuple); break; - case TupleDefinitionType.MsiShortcutProperty: - this.AddTupleDefaultly(tuple, idIsPrimaryKey: true); - break; - case TupleDefinitionType.MoveFile: this.AddMoveFileTuple((MoveFileTuple)tuple); break; @@ -177,10 +165,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.AddRemoveRegistryTuple((RemoveRegistryTuple)tuple); break; - case TupleDefinitionType.ReserveCost: - this.AddTupleDefaultly(tuple, idIsPrimaryKey: true); - break; - case TupleDefinitionType.ServiceControl: this.AddServiceControlTuple((ServiceControlTuple)tuple); break; @@ -192,10 +176,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind case TupleDefinitionType.Shortcut: this.AddShortcutTuple((ShortcutTuple)tuple); break; - - case TupleDefinitionType.Signature: - this.AddTupleDefaultly(tuple, idIsPrimaryKey: true); - break; case TupleDefinitionType.SummaryInformation: this.AddTupleDefaultly(tuple, tableName: "_SummaryInformation"); @@ -1070,7 +1050,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind } } - private void AddTupleDefaultly(IntermediateTuple tuple, bool idIsPrimaryKey = false, string tableName = null) + private void AddTupleDefaultly(IntermediateTuple tuple, string tableName = null) { if (!this.TableDefinitions.TryGet(tableName ?? tuple.Definition.Name, out var tableDefinition)) { @@ -1080,7 +1060,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind var row = this.CreateRow(tuple, tableDefinition); var rowOffset = 0; - if (idIsPrimaryKey) + if (tableDefinition.TupleIdIsPrimaryKey) { row[0] = tuple.Id.Id; rowOffset = 1; -- cgit v1.2.3-55-g6feb