aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-04-03 11:38:20 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-04-03 13:51:31 +1000
commit11112ebcdf97d4fa53e34d9dfe48410ff2378435 (patch)
treed995b68bb319a052c2259c8a4b6dbdf665926fca /src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
parent37356647817b72a336eeedaa7472e268a04054c8 (diff)
downloadwix-11112ebcdf97d4fa53e34d9dfe48410ff2378435.tar.gz
wix-11112ebcdf97d4fa53e34d9dfe48410ff2378435.tar.bz2
wix-11112ebcdf97d4fa53e34d9dfe48410ff2378435.zip
Use TupleIdIsPrimaryKey.
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs24
1 files changed, 2 insertions, 22 deletions
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
64 this.AddAssemblyTuple((AssemblyTuple)tuple); 64 this.AddAssemblyTuple((AssemblyTuple)tuple);
65 break; 65 break;
66 66
67 case TupleDefinitionType.Binary:
68 this.AddTupleDefaultly(tuple, idIsPrimaryKey: true);
69 break;
70
71 case TupleDefinitionType.BBControl: 67 case TupleDefinitionType.BBControl:
72 this.AddBBControlTuple((BBControlTuple)tuple); 68 this.AddBBControlTuple((BBControlTuple)tuple);
73 break; 69 break;
@@ -112,10 +108,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
112 this.AddFileTuple((FileTuple)tuple); 108 this.AddFileTuple((FileTuple)tuple);
113 break; 109 break;
114 110
115 case TupleDefinitionType.Icon:
116 this.AddTupleDefaultly(tuple, idIsPrimaryKey: true);
117 break;
118
119 case TupleDefinitionType.IniFile: 111 case TupleDefinitionType.IniFile:
120 this.AddIniFileTuple((IniFileTuple)tuple); 112 this.AddIniFileTuple((IniFileTuple)tuple);
121 break; 113 break;
@@ -144,10 +136,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
144 this.AddMsiServiceConfigFailureActionsTuple((MsiServiceConfigFailureActionsTuple)tuple); 136 this.AddMsiServiceConfigFailureActionsTuple((MsiServiceConfigFailureActionsTuple)tuple);
145 break; 137 break;
146 138
147 case TupleDefinitionType.MsiShortcutProperty:
148 this.AddTupleDefaultly(tuple, idIsPrimaryKey: true);
149 break;
150
151 case TupleDefinitionType.MoveFile: 139 case TupleDefinitionType.MoveFile:
152 this.AddMoveFileTuple((MoveFileTuple)tuple); 140 this.AddMoveFileTuple((MoveFileTuple)tuple);
153 break; 141 break;
@@ -177,10 +165,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
177 this.AddRemoveRegistryTuple((RemoveRegistryTuple)tuple); 165 this.AddRemoveRegistryTuple((RemoveRegistryTuple)tuple);
178 break; 166 break;
179 167
180 case TupleDefinitionType.ReserveCost:
181 this.AddTupleDefaultly(tuple, idIsPrimaryKey: true);
182 break;
183
184 case TupleDefinitionType.ServiceControl: 168 case TupleDefinitionType.ServiceControl:
185 this.AddServiceControlTuple((ServiceControlTuple)tuple); 169 this.AddServiceControlTuple((ServiceControlTuple)tuple);
186 break; 170 break;
@@ -192,10 +176,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
192 case TupleDefinitionType.Shortcut: 176 case TupleDefinitionType.Shortcut:
193 this.AddShortcutTuple((ShortcutTuple)tuple); 177 this.AddShortcutTuple((ShortcutTuple)tuple);
194 break; 178 break;
195
196 case TupleDefinitionType.Signature:
197 this.AddTupleDefaultly(tuple, idIsPrimaryKey: true);
198 break;
199 179
200 case TupleDefinitionType.SummaryInformation: 180 case TupleDefinitionType.SummaryInformation:
201 this.AddTupleDefaultly(tuple, tableName: "_SummaryInformation"); 181 this.AddTupleDefaultly(tuple, tableName: "_SummaryInformation");
@@ -1070,7 +1050,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1070 } 1050 }
1071 } 1051 }
1072 1052
1073 private void AddTupleDefaultly(IntermediateTuple tuple, bool idIsPrimaryKey = false, string tableName = null) 1053 private void AddTupleDefaultly(IntermediateTuple tuple, string tableName = null)
1074 { 1054 {
1075 if (!this.TableDefinitions.TryGet(tableName ?? tuple.Definition.Name, out var tableDefinition)) 1055 if (!this.TableDefinitions.TryGet(tableName ?? tuple.Definition.Name, out var tableDefinition))
1076 { 1056 {
@@ -1080,7 +1060,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1080 var row = this.CreateRow(tuple, tableDefinition); 1060 var row = this.CreateRow(tuple, tableDefinition);
1081 var rowOffset = 0; 1061 var rowOffset = 0;
1082 1062
1083 if (idIsPrimaryKey) 1063 if (tableDefinition.TupleIdIsPrimaryKey)
1084 { 1064 {
1085 row[0] = tuple.Id.Id; 1065 row[0] = tuple.Id.Id;
1086 rowOffset = 1; 1066 rowOffset = 1;