@joebigelow / wix / commits / 38afa9e7

The Great Tuple to Symbol Rename (tm)

Rob Mensching committed Jun 25, 2020 at 14:43 UTC 38afa9e7bc7eacc021f8805f607368a05751e3c3
102 files changed +2913 -2913
src/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs
+8 -8
@@ -4,23 +4,23 @@ namespace WixToolset.Core.Burn
4 {
5 using System;
6 using System.Xml;
7 - using WixToolset.Data.Tuples;
7 + using WixToolset.Data.Symbols;
8
9 internal abstract class BaseSearchFacade : ISearchFacade
10 {
11 - protected WixSearchTuple SearchTuple { get; set; }
11 + protected WixSearchSymbol SearchSymbol { get; set; }
12
13 public virtual void WriteXml(XmlTextWriter writer)
14 {
15 - writer.WriteAttributeString("Id", this.SearchTuple.Id.Id);
16 - writer.WriteAttributeString("Variable", this.SearchTuple.Variable);
17 - if (!String.IsNullOrEmpty(this.SearchTuple.Condition))
15 + writer.WriteAttributeString("Id", this.SearchSymbol.Id.Id);
16 + writer.WriteAttributeString("Variable", this.SearchSymbol.Variable);
17 + if (!String.IsNullOrEmpty(this.SearchSymbol.Condition))
18 {
19 - writer.WriteAttributeString("Condition", this.SearchTuple.Condition);
19 + writer.WriteAttributeString("Condition", this.SearchSymbol.Condition);
20 }
21 - if (!String.IsNullOrEmpty(this.SearchTuple.BundleExtensionRef))
21 + if (!String.IsNullOrEmpty(this.SearchSymbol.BundleExtensionRef))
22 {
23 - writer.WriteAttributeString("ExtensionId", this.SearchTuple.BundleExtensionRef);
23 + writer.WriteAttributeString("ExtensionId", this.SearchSymbol.BundleExtensionRef);
24 }
25 }
26 }
src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+91 -91
@@ -13,7 +13,7 @@ namespace WixToolset.Core.Burn
13 using WixToolset.Core.Burn.Bundles;
14 using WixToolset.Data;
15 using WixToolset.Data.Burn;
16 - using WixToolset.Data.Tuples;
16 + using WixToolset.Data.Symbols;
17 using WixToolset.Extensibility;
18 using WixToolset.Extensibility.Data;
19 using WixToolset.Extensibility.Services;
@@ -88,28 +88,28 @@ namespace WixToolset.Core.Burn
88 // We shouldn't really get past the linker phase if there are
89 // no group items... that means that there's no UX, no Chain,
90 // *and* no Containers!
91 - var chainPackageTuples = this.GetRequiredTuples<WixBundlePackageTuple>();
91 + var chainPackageSymbols = this.GetRequiredSymbols<WixBundlePackageSymbol>();
92
93 - var wixGroupTuples = this.GetRequiredTuples<WixGroupTuple>();
93 + var wixGroupSymbols = this.GetRequiredSymbols<WixGroupSymbol>();
94
95 // Ensure there is one and only one row in the WixBundle table.
96 // The compiler and linker behavior should have colluded to get
97 // this behavior.
98 - var bundleTuple = this.GetSingleTuple<WixBundleTuple>();
98 + var bundleSymbol = this.GetSingleSymbol<WixBundleSymbol>();
99
100 - bundleTuple.ProviderKey = bundleTuple.BundleId = Guid.NewGuid().ToString("B").ToUpperInvariant();
100 + bundleSymbol.ProviderKey = bundleSymbol.BundleId = Guid.NewGuid().ToString("B").ToUpperInvariant();
101
102 - bundleTuple.Attributes |= WixBundleAttributes.PerMachine; // default to per-machine but the first-per user package wil flip the bundle per-user.
102 + bundleSymbol.Attributes |= WixBundleAttributes.PerMachine; // default to per-machine but the first-per user package wil flip the bundle per-user.
103
104 // Ensure there is one and only one row in the WixBootstrapperApplication table.
105 // The compiler and linker behavior should have colluded to get
106 // this behavior.
107 - var bundleApplicationTuple = this.GetSingleTuple<WixBootstrapperApplicationTuple>();
107 + var bundleApplicationSymbol = this.GetSingleSymbol<WixBootstrapperApplicationSymbol>();
108
109 // Ensure there is one and only one row in the WixChain table.
110 // The compiler and linker behavior should have colluded to get
111 // this behavior.
112 - var chainTuple = this.GetSingleTuple<WixChainTuple>();
112 + var chainSymbol = this.GetSingleSymbol<WixChainSymbol>();
113
114 if (this.Messaging.EncounteredError)
115 {
@@ -122,7 +122,7 @@ namespace WixToolset.Core.Burn
122 var orderSearchesCommand = new OrderSearchesCommand(this.Messaging, section);
123 orderSearchesCommand.Execute();
124 var orderedSearches = orderSearchesCommand.OrderedSearchFacades;
125 - var extensionSearchTuplesById = orderSearchesCommand.ExtensionSearchTuplesByExtensionId;
125 + var extensionSearchSymbolsById = orderSearchesCommand.ExtensionSearchSymbolsByExtensionId;
126
127 // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules).
128 {
@@ -133,29 +133,29 @@ namespace WixToolset.Core.Burn
133 }
134
135 // Get the explicit payloads.
136 - var payloadTuples = section.Tuples.OfType<WixBundlePayloadTuple>().ToDictionary(t => t.Id.Id);
136 + var payloadSymbols = section.Symbols.OfType<WixBundlePayloadSymbol>().ToDictionary(t => t.Id.Id);
137
138 // Update explicitly authored payloads with their parent package and container (as appropriate)
139 // to make it easier to gather the payloads later.
140 - foreach (var groupTuple in wixGroupTuples)
140 + foreach (var groupSymbol in wixGroupSymbols)
141 {
142 - if (ComplexReferenceChildType.Payload == groupTuple.ChildType)
142 + if (ComplexReferenceChildType.Payload == groupSymbol.ChildType)
143 {
144 - var payloadTuple = payloadTuples[groupTuple.ChildId];
144 + var payloadSymbol = payloadSymbols[groupSymbol.ChildId];
145
146 - if (ComplexReferenceParentType.Package == groupTuple.ParentType)
146 + if (ComplexReferenceParentType.Package == groupSymbol.ParentType)
147 {
148 - Debug.Assert(String.IsNullOrEmpty(payloadTuple.PackageRef));
149 - payloadTuple.PackageRef = groupTuple.ParentId;
148 + Debug.Assert(String.IsNullOrEmpty(payloadSymbol.PackageRef));
149 + payloadSymbol.PackageRef = groupSymbol.ParentId;
150 }
151 - else if (ComplexReferenceParentType.Container == groupTuple.ParentType)
151 + else if (ComplexReferenceParentType.Container == groupSymbol.ParentType)
152 {
153 - Debug.Assert(String.IsNullOrEmpty(payloadTuple.ContainerRef));
154 - payloadTuple.ContainerRef = groupTuple.ParentId;
153 + Debug.Assert(String.IsNullOrEmpty(payloadSymbol.ContainerRef));
154 + payloadSymbol.ContainerRef = groupSymbol.ParentId;
155 }
156 - else if (ComplexReferenceParentType.Layout == groupTuple.ParentType)
156 + else if (ComplexReferenceParentType.Layout == groupSymbol.ParentType)
157 {
158 - payloadTuple.LayoutOnly = true;
158 + payloadSymbol.LayoutOnly = true;
159 }
160 }
161 }
@@ -165,44 +165,44 @@ namespace WixToolset.Core.Burn
165 // Process the explicitly authored payloads.
166 ISet<string> processedPayloads;
167 {
168 - var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, payloadTuples.Values, bundleTuple.DefaultPackagingType, layoutDirectory);
168 + var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, payloadSymbols.Values, bundleSymbol.DefaultPackagingType, layoutDirectory);
169 command.Execute();
170
171 fileTransfers.AddRange(command.FileTransfers);
172 trackedFiles.AddRange(command.TrackedFiles);
173
174 - processedPayloads = new HashSet<string>(payloadTuples.Keys);
174 + processedPayloads = new HashSet<string>(payloadSymbols.Keys);
175 }
176
177 IDictionary<string, PackageFacade> facades;
178 {
179 - var command = new GetPackageFacadesCommand(chainPackageTuples, section);
179 + var command = new GetPackageFacadesCommand(chainPackageSymbols, section);
180 command.Execute();
181
182 facades = command.PackageFacades;
183 }
184
185 - // Process each package facade. Note this is likely to add payloads and other tuples so
185 + // Process each package facade. Note this is likely to add payloads and other symbols so
186 // note that any indexes created above may be out of date now.
187 foreach (var facade in facades.Values)
188 {
189 - switch (facade.PackageTuple.Type)
189 + switch (facade.PackageSymbol.Type)
190 {
191 case WixBundlePackageType.Exe:
192 {
193 - var command = new ProcessExePackageCommand(facade, payloadTuples);
193 + var command = new ProcessExePackageCommand(facade, payloadSymbols);
194 command.Execute();
195 }
196 break;
197
198 case WixBundlePackageType.Msi:
199 {
200 - var command = new ProcessMsiPackageCommand(this.ServiceProvider, this.BackendExtensions, section, facade, payloadTuples);
200 + var command = new ProcessMsiPackageCommand(this.ServiceProvider, this.BackendExtensions, section, facade, payloadSymbols);
201 command.Execute();
202
203 if (null != variableCache)
204 {
205 - var msiPackage = (WixBundleMsiPackageTuple)facade.SpecificPackageTuple;
205 + var msiPackage = (WixBundleMsiPackageSymbol)facade.SpecificPackageSymbol;
206 variableCache.Add(String.Concat("packageLanguage.", facade.PackageId), msiPackage.ProductLanguage.ToString());
207
208 if (null != msiPackage.Manufacturer)
@@ -215,14 +215,14 @@ namespace WixToolset.Core.Burn
215
216 case WixBundlePackageType.Msp:
217 {
218 - var command = new ProcessMspPackageCommand(this.Messaging, section, facade, payloadTuples);
218 + var command = new ProcessMspPackageCommand(this.Messaging, section, facade, payloadSymbols);
219 command.Execute();
220 }
221 break;
222
223 case WixBundlePackageType.Msu:
224 {
225 - var command = new ProcessMsuPackageCommand(facade, payloadTuples);
225 + var command = new ProcessMsuPackageCommand(facade, payloadSymbols);
226 command.Execute();
227 }
228 break;
@@ -230,7 +230,7 @@ namespace WixToolset.Core.Burn
230
231 if (null != variableCache)
232 {
233 - BindBundleCommand.PopulatePackageVariableCache(facade.PackageTuple, variableCache);
233 + BindBundleCommand.PopulatePackageVariableCache(facade.PackageSymbol, variableCache);
234 }
235 }
236
@@ -241,13 +241,13 @@ namespace WixToolset.Core.Burn
241
242 // Reindex the payloads now that all the payloads (minus the manifest payloads that will be created later)
243 // are present.
244 - payloadTuples = section.Tuples.OfType<WixBundlePayloadTuple>().ToDictionary(t => t.Id.Id);
244 + payloadSymbols = section.Symbols.OfType<WixBundlePayloadSymbol>().ToDictionary(t => t.Id.Id);
245
246 // Process the payloads that were added by processing the packages.
247 {
248 - var toProcess = payloadTuples.Values.Where(r => !processedPayloads.Contains(r.Id.Id)).ToList();
248 + var toProcess = payloadSymbols.Values.Where(r => !processedPayloads.Contains(r.Id.Id)).ToList();
249
250 - var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, toProcess, bundleTuple.DefaultPackagingType, layoutDirectory);
250 + var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, toProcess, bundleSymbol.DefaultPackagingType, layoutDirectory);
251 command.Execute();
252
253 fileTransfers.AddRange(command.FileTransfers);
@@ -258,34 +258,34 @@ namespace WixToolset.Core.Burn
258
259 // Set the package metadata from the payloads now that we have the complete payload information.
260 {
261 - var payloadsByPackageId = payloadTuples.Values.ToLookup(p => p.PackageRef);
261 + var payloadsByPackageId = payloadSymbols.Values.ToLookup(p => p.PackageRef);
262
263 foreach (var facade in facades.Values)
264 {
265 - facade.PackageTuple.Size = 0;
265 + facade.PackageSymbol.Size = 0;
266
267 var packagePayloads = payloadsByPackageId[facade.PackageId];
268
269 foreach (var payload in packagePayloads)
270 {
271 - facade.PackageTuple.Size += payload.FileSize.Value;
271 + facade.PackageSymbol.Size += payload.FileSize.Value;
272 }
273
274 - if (!facade.PackageTuple.InstallSize.HasValue)
274 + if (!facade.PackageSymbol.InstallSize.HasValue)
275 {
276 - facade.PackageTuple.InstallSize = facade.PackageTuple.Size;
276 + facade.PackageSymbol.InstallSize = facade.PackageSymbol.Size;
277 }
278
279 - var packagePayload = payloadTuples[facade.PackageTuple.PayloadRef];
279 + var packagePayload = payloadSymbols[facade.PackageSymbol.PayloadRef];
280
281 - if (String.IsNullOrEmpty(facade.PackageTuple.Description))
281 + if (String.IsNullOrEmpty(facade.PackageSymbol.Description))
282 {
283 - facade.PackageTuple.Description = packagePayload.Description;
283 + facade.PackageSymbol.Description = packagePayload.Description;
284 }
285
286 - if (String.IsNullOrEmpty(facade.PackageTuple.DisplayName))
286 + if (String.IsNullOrEmpty(facade.PackageSymbol.DisplayName))
287 {
288 - facade.PackageTuple.DisplayName = packagePayload.DisplayName;
288 + facade.PackageSymbol.DisplayName = packagePayload.DisplayName;
289 }
290 }
291 }
@@ -293,7 +293,7 @@ namespace WixToolset.Core.Burn
293 // Give the UX payloads their embedded IDs...
294 var uxPayloadIndex = 0;
295 {
296 - foreach (var payload in payloadTuples.Values.Where(p => BurnConstants.BurnUXContainerName == p.ContainerRef))
296 + foreach (var payload in payloadSymbols.Values.Where(p => BurnConstants.BurnUXContainerName == p.ContainerRef))
297 {
298 // In theory, UX payloads could be embedded in the UX CAB, external to the bundle EXE, or even
299 // downloaded. The current engine requires the UX to be fully present before any downloading starts,
@@ -317,7 +317,7 @@ namespace WixToolset.Core.Burn
317
318 // Give the embedded payloads without an embedded id yet an embedded id.
319 var payloadIndex = 0;
320 - foreach (var payload in payloadTuples.Values)
320 + foreach (var payload in payloadSymbols.Values)
321 {
322 Debug.Assert(PackagingType.Unknown != payload.Packaging);
323
@@ -341,11 +341,11 @@ namespace WixToolset.Core.Burn
341 }
342
343 // If catalog files exist, non-embedded payloads should validate with the catalogs.
344 - var catalogs = section.Tuples.OfType<WixBundleCatalogTuple>().ToList();
344 + var catalogs = section.Symbols.OfType<WixBundleCatalogSymbol>().ToList();
345
346 if (catalogs.Count > 0)
347 {
348 - var command = new VerifyPayloadsWithCatalogCommand(this.Messaging, catalogs, payloadTuples.Values);
348 + var command = new VerifyPayloadsWithCatalogCommand(this.Messaging, catalogs, payloadSymbols.Values);
349 command.Execute();
350 }
351
@@ -355,12 +355,12 @@ namespace WixToolset.Core.Burn
355 }
356
357 IEnumerable<PackageFacade> orderedFacades;
358 - IEnumerable<WixBundleRollbackBoundaryTuple> boundaries;
358 + IEnumerable<WixBundleRollbackBoundarySymbol> boundaries;
359 {
360 - var groupTuples = section.Tuples.OfType<WixGroupTuple>();
361 - var boundaryTuplesById = section.Tuples.OfType<WixBundleRollbackBoundaryTuple>().ToDictionary(b => b.Id.Id);
360 + var groupSymbols = section.Symbols.OfType<WixGroupSymbol>();
361 + var boundarySymbolsById = section.Symbols.OfType<WixBundleRollbackBoundarySymbol>().ToDictionary(b => b.Id.Id);
362
363 - var command = new OrderPackagesAndRollbackBoundariesCommand(this.Messaging, groupTuples, boundaryTuplesById, facades);
363 + var command = new OrderPackagesAndRollbackBoundariesCommand(this.Messaging, groupSymbols, boundarySymbolsById, facades);
364 command.Execute();
365
366 orderedFacades = command.OrderedPackageFacades;
@@ -374,24 +374,24 @@ namespace WixToolset.Core.Burn
374 resolveDelayedFieldsCommand.Execute();
375 }
376
377 - Dictionary<string, ProvidesDependencyTuple> dependencyTuplesByKey;
377 + Dictionary<string, ProvidesDependencySymbol> dependencySymbolsByKey;
378 {
379 var command = new ProcessDependencyProvidersCommand(this.Messaging, section, facades);
380 command.Execute();
381
382 if (!String.IsNullOrEmpty(command.BundleProviderKey))
383 {
384 - bundleTuple.ProviderKey = command.BundleProviderKey; // set the overridable bundle provider key.
384 + bundleSymbol.ProviderKey = command.BundleProviderKey; // set the overridable bundle provider key.
385 }
386 - dependencyTuplesByKey = command.DependencyTuplesByKey;
386 + dependencySymbolsByKey = command.DependencySymbolsByKey;
387 }
388
389 // Update the bundle per-machine/per-user scope based on the chained packages.
390 - this.ResolveBundleInstallScope(section, bundleTuple, orderedFacades);
390 + this.ResolveBundleInstallScope(section, bundleSymbol, orderedFacades);
391
392 // Generate data for all manifests.
393 {
394 - var command = new GenerateManifestDataFromIRCommand(this.Messaging, section, this.BackendExtensions, this.InternalBurnBackendHelper, extensionSearchTuplesById);
394 + var command = new GenerateManifestDataFromIRCommand(this.Messaging, section, this.BackendExtensions, this.InternalBurnBackendHelper, extensionSearchSymbolsById);
395 command.Execute();
396 }
397
@@ -409,12 +409,12 @@ namespace WixToolset.Core.Burn
409 // Generate the core-defined BA manifest tables...
410 string baManifestPath;
411 {
412 - var command = new CreateBootstrapperApplicationManifestCommand(section, bundleTuple, orderedFacades, uxPayloadIndex, payloadTuples, this.IntermediateFolder, this.InternalBurnBackendHelper);
412 + var command = new CreateBootstrapperApplicationManifestCommand(section, bundleSymbol, orderedFacades, uxPayloadIndex, payloadSymbols, this.IntermediateFolder, this.InternalBurnBackendHelper);
413 command.Execute();
414
415 var baManifestPayload = command.BootstrapperApplicationManifestPayloadRow;
416 baManifestPath = command.OutputPath;
417 - payloadTuples.Add(baManifestPayload.Id.Id, baManifestPayload);
417 + payloadSymbols.Add(baManifestPayload.Id.Id, baManifestPayload);
418 ++uxPayloadIndex;
419
420 trackedFiles.Add(this.BackendHelper.TrackFile(baManifestPath, TrackedFileType.Temporary));
@@ -423,12 +423,12 @@ namespace WixToolset.Core.Burn
423 // Generate the bundle extension manifest...
424 string bextManifestPath;
425 {
426 - var command = new CreateBundleExtensionManifestCommand(section, bundleTuple, uxPayloadIndex, this.IntermediateFolder, this.InternalBurnBackendHelper);
426 + var command = new CreateBundleExtensionManifestCommand(section, bundleSymbol, uxPayloadIndex, this.IntermediateFolder, this.InternalBurnBackendHelper);
427 command.Execute();
428
429 var bextManifestPayload = command.BundleExtensionManifestPayloadRow;
430 bextManifestPath = command.OutputPath;
431 - payloadTuples.Add(bextManifestPayload.Id.Id, bextManifestPayload);
431 + payloadSymbols.Add(bextManifestPayload.Id.Id, bextManifestPayload);
432 ++uxPayloadIndex;
433
434 trackedFiles.Add(this.BackendHelper.TrackFile(bextManifestPath, TrackedFileType.Temporary));
@@ -436,11 +436,11 @@ namespace WixToolset.Core.Burn
436
437 // Create all the containers except the UX container first so the manifest (that goes in the UX container)
438 // can contain all size and hash information about the non-UX containers.
439 - WixBundleContainerTuple uxContainer;
440 - IEnumerable<WixBundlePayloadTuple> uxPayloads;
441 - IEnumerable<WixBundleContainerTuple> containers;
439 + WixBundleContainerSymbol uxContainer;
440 + IEnumerable<WixBundlePayloadSymbol> uxPayloads;
441 + IEnumerable<WixBundleContainerSymbol> containers;
442 {
443 - var command = new CreateNonUXContainers(this.BackendHelper, section, bundleApplicationTuple, payloadTuples, this.IntermediateFolder, layoutDirectory, this.DefaultCompressionLevel);
443 + var command = new CreateNonUXContainers(this.BackendHelper, section, bundleApplicationSymbol, payloadSymbols, this.IntermediateFolder, layoutDirectory, this.DefaultCompressionLevel);
444 command.Execute();
445
446 fileTransfers.AddRange(command.FileTransfers);
@@ -450,13 +450,13 @@ namespace WixToolset.Core.Burn
450 uxPayloads = command.UXContainerPayloads;
451 containers = command.Containers;
452 }
453 -
453 +
454 // Create the bundle manifest.
455 string manifestPath;
456 {
457 var executableName = Path.GetFileName(this.OutputPath);
458
459 - var command = new CreateBurnManifestCommand(this.Messaging, this.BackendExtensions, executableName, section, bundleTuple, containers, chainTuple, orderedFacades, boundaries, uxPayloads, payloadTuples, orderedSearches, catalogs, this.IntermediateFolder);
459 + var command = new CreateBurnManifestCommand(this.Messaging, this.BackendExtensions, executableName, section, bundleSymbol, containers, chainSymbol, orderedFacades, boundaries, uxPayloads, payloadSymbols, orderedSearches, catalogs, this.IntermediateFolder);
460 command.Execute();
461
462 manifestPath = command.OutputPath;
@@ -475,7 +475,7 @@ namespace WixToolset.Core.Burn
475 }
476
477 {
478 - var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleTuple, uxContainer, containers);
478 + var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleSymbol, uxContainer, containers);
479 command.Execute();
480
481 fileTransfers.Add(command.Transfer);
@@ -483,7 +483,7 @@ namespace WixToolset.Core.Burn
483 }
484
485 #if TODO // does this need to come back, or do they only need to be in TrackedFiles?
486 - this.ContentFilePaths = payloadTuples.Values.Where(p => p.ContentFile).Select(p => p.FullFileName).ToList();
486 + this.ContentFilePaths = payloadSymbols.Values.Where(p => p.ContentFile).Select(p => p.FullFileName).ToList();
487 #endif
488 this.FileTransfers = fileTransfers;
489 this.TrackedFiles = trackedFiles;
@@ -522,7 +522,7 @@ namespace WixToolset.Core.Burn
522 /// </summary>
523 /// <param name="package">The package with properties to cache.</param>
524 /// <param name="variableCache">The property cache.</param>
525 - private static void PopulatePackageVariableCache(WixBundlePackageTuple package, IDictionary<string, string> variableCache)
525 + private static void PopulatePackageVariableCache(WixBundlePackageSymbol package, IDictionary<string, string> variableCache)
526 {
527 var id = package.Id.Id;
528
@@ -533,17 +533,17 @@ namespace WixToolset.Core.Burn
533 variableCache.Add(String.Concat("packageVersion.", id), package.Version);
534 }
535
536 - private void ResolveBundleInstallScope(IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<PackageFacade> facades)
536 + private void ResolveBundleInstallScope(IntermediateSection section, WixBundleSymbol bundleSymbol, IEnumerable<PackageFacade> facades)
537 {
538 - var dependencyTuplesById = section.Tuples.OfType<ProvidesDependencyTuple>().ToDictionary(t => t.Id.Id);
538 + var dependencySymbolsById = section.Symbols.OfType<ProvidesDependencySymbol>().ToDictionary(t => t.Id.Id);
539
540 foreach (var facade in facades)
541 {
542 - if (bundleTuple.PerMachine && YesNoDefaultType.No == facade.PackageTuple.PerMachine)
542 + if (bundleSymbol.PerMachine && YesNoDefaultType.No == facade.PackageSymbol.PerMachine)
543 {
544 - this.Messaging.Write(VerboseMessages.SwitchingToPerUserPackage(facade.PackageTuple.SourceLineNumbers, facade.PackageId));
544 + this.Messaging.Write(VerboseMessages.SwitchingToPerUserPackage(facade.PackageSymbol.SourceLineNumbers, facade.PackageId));
545
546 - bundleTuple.Attributes &= ~WixBundleAttributes.PerMachine;
546 + bundleSymbol.Attributes &= ~WixBundleAttributes.PerMachine;
547 break;
548 }
549 }
@@ -551,45 +551,45 @@ namespace WixToolset.Core.Burn
551 foreach (var facade in facades)
552 {
553 // Update package scope from bundle scope if default.
554 - if (YesNoDefaultType.Default == facade.PackageTuple.PerMachine)
554 + if (YesNoDefaultType.Default == facade.PackageSymbol.PerMachine)
555 {
556 - facade.PackageTuple.PerMachine = bundleTuple.PerMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No;
556 + facade.PackageSymbol.PerMachine = bundleSymbol.PerMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No;
557 }
558
559 // We will only register packages in the same scope as the bundle. Warn if any packages with providers
560 // are in a different scope and not permanent (permanents typically don't need a ref-count).
561 - if (!bundleTuple.PerMachine &&
562 - YesNoDefaultType.Yes == facade.PackageTuple.PerMachine &&
563 - !facade.PackageTuple.Permanent &&
564 - dependencyTuplesById.ContainsKey(facade.PackageId))
561 + if (!bundleSymbol.PerMachine &&
562 + YesNoDefaultType.Yes == facade.PackageSymbol.PerMachine &&
563 + !facade.PackageSymbol.Permanent &&
564 + dependencySymbolsById.ContainsKey(facade.PackageId))
565 {
566 - this.Messaging.Write(WarningMessages.NoPerMachineDependencies(facade.PackageTuple.SourceLineNumbers, facade.PackageId));
566 + this.Messaging.Write(WarningMessages.NoPerMachineDependencies(facade.PackageSymbol.SourceLineNumbers, facade.PackageId));
567 }
568 }
569 }
570
571 - private IEnumerable<T> GetRequiredTuples<T>() where T : IntermediateTuple
571 + private IEnumerable<T> GetRequiredSymbols<T>() where T : IntermediateSymbol
572 {
573 - var tuples = this.Output.Sections.Single().Tuples.OfType<T>().ToList();
573 + var symbols = this.Output.Sections.Single().Symbols.OfType<T>().ToList();
574
575 - if (0 == tuples.Count)
575 + if (0 == symbols.Count)
576 {
577 throw new WixException(ErrorMessages.MissingBundleInformation(nameof(T)));
578 }
579
580 - return tuples;
580 + return symbols;
581 }
582
583 - private T GetSingleTuple<T>() where T : IntermediateTuple
583 + private T GetSingleSymbol<T>() where T : IntermediateSymbol
584 {
585 - var tuples = this.Output.Sections.Single().Tuples.OfType<T>().ToList();
585 + var symbols = this.Output.Sections.Single().Symbols.OfType<T>().ToList();
586
587 - if (1 != tuples.Count)
587 + if (1 != symbols.Count)
588 {
589 throw new WixException(ErrorMessages.MissingBundleInformation(nameof(T)));
590 }
591
592 - return tuples[0];
592 + return symbols[0];
593 }
594 }
595 }
src/WixToolset.Core.Burn/Bind/ExtensionSearchFacade.cs
+3 -3
@@ -3,13 +3,13 @@
3 namespace WixToolset.Core.Burn
4 {
5 using System.Xml;
6 - using WixToolset.Data.Tuples;
6 + using WixToolset.Data.Symbols;
7
8 internal class ExtensionSearchFacade : BaseSearchFacade
9 {
10 - public ExtensionSearchFacade(WixSearchTuple searchTuple)
10 + public ExtensionSearchFacade(WixSearchSymbol searchSymbol)
11 {
12 - this.SearchTuple = searchTuple;
12 + this.SearchSymbol = searchSymbol;
13 }
14
15 public override void WriteXml(XmlTextWriter writer)
src/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs
+88 -88
@@ -10,26 +10,26 @@ namespace WixToolset.Core.Burn.Bind
10 using WixToolset.Core.Burn.Bundles;
11 using WixToolset.Core.Burn.ExtensibilityServices;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Extensibility;
15 using WixToolset.Extensibility.Services;
16
17 internal class GenerateManifestDataFromIRCommand
18 {
19 - public GenerateManifestDataFromIRCommand(IMessaging messaging, IntermediateSection section, IEnumerable<IBurnBackendExtension> backendExtensions, IBurnBackendHelper backendHelper, IDictionary<string, IList<IntermediateTuple>> extensionSearchTuplesById)
19 + public GenerateManifestDataFromIRCommand(IMessaging messaging, IntermediateSection section, IEnumerable<IBurnBackendExtension> backendExtensions, IBurnBackendHelper backendHelper, IDictionary<string, IList<IntermediateSymbol>> extensionSearchSymbolsById)
20 {
21 this.Messaging = messaging;
22 this.Section = section;
23 this.BackendExtensions = backendExtensions;
24 this.BackendHelper = backendHelper;
25 - this.ExtensionSearchTuplesById = extensionSearchTuplesById;
25 + this.ExtensionSearchSymbolsById = extensionSearchSymbolsById;
26 }
27
28 private IEnumerable<IBurnBackendExtension> BackendExtensions { get; }
29
30 private IBurnBackendHelper BackendHelper { get; }
31
32 - private IDictionary<string, IList<IntermediateTuple>> ExtensionSearchTuplesById { get; }
32 + private IDictionary<string, IList<IntermediateSymbol>> ExtensionSearchSymbolsById { get; }
33
34 private IMessaging Messaging { get; }
35
@@ -37,108 +37,108 @@ namespace WixToolset.Core.Burn.Bind
37
38 public void Execute()
39 {
40 - var tuples = this.Section.Tuples.ToList();
41 - var cellsByCustomDataAndElementId = new Dictionary<string, List<WixBundleCustomDataCellTuple>>();
42 - var customDataById = new Dictionary<string, WixBundleCustomDataTuple>();
40 + var symbols = this.Section.Symbols.ToList();
41 + var cellsByCustomDataAndElementId = new Dictionary<string, List<WixBundleCustomDataCellSymbol>>();
42 + var customDataById = new Dictionary<string, WixBundleCustomDataSymbol>();
43
44 - foreach (var kvp in this.ExtensionSearchTuplesById)
44 + foreach (var kvp in this.ExtensionSearchSymbolsById)
45 {
46 var extensionId = kvp.Key;
47 - var extensionSearchTuples = kvp.Value;
48 - foreach (var extensionSearchTuple in extensionSearchTuples)
47 + var extensionSearchSymbols = kvp.Value;
48 + foreach (var extensionSearchSymbol in extensionSearchSymbols)
49 {
50 - this.BackendHelper.AddBundleExtensionData(extensionId, extensionSearchTuple, tupleIdIsIdAttribute: true);
51 - tuples.Remove(extensionSearchTuple);
50 + this.BackendHelper.AddBundleExtensionData(extensionId, extensionSearchSymbol, symbolIdIsIdAttribute: true);
51 + symbols.Remove(extensionSearchSymbol);
52 }
53 }
54
55 - foreach (var tuple in tuples)
55 + foreach (var symbol in symbols)
56 {
57 - var unknownTuple = false;
58 - switch (tuple.Definition.Type)
57 + var unknownSymbol = false;
58 + switch (symbol.Definition.Type)
59 {
60 - // Tuples used internally and are not added to a data manifest.
61 - case TupleDefinitionType.ProvidesDependency:
62 - case TupleDefinitionType.WixApprovedExeForElevation:
63 - case TupleDefinitionType.WixBootstrapperApplication:
64 - case TupleDefinitionType.WixBundle:
65 - case TupleDefinitionType.WixBundleCatalog:
66 - case TupleDefinitionType.WixBundleContainer:
67 - case TupleDefinitionType.WixBundleCustomDataAttribute:
68 - case TupleDefinitionType.WixBundleExePackage:
69 - case TupleDefinitionType.WixBundleExtension:
70 - case TupleDefinitionType.WixBundleMsiFeature:
71 - case TupleDefinitionType.WixBundleMsiPackage:
72 - case TupleDefinitionType.WixBundleMsiProperty:
73 - case TupleDefinitionType.WixBundleMspPackage:
74 - case TupleDefinitionType.WixBundleMsuPackage:
75 - case TupleDefinitionType.WixBundlePackage:
76 - case TupleDefinitionType.WixBundlePackageCommandLine:
77 - case TupleDefinitionType.WixBundlePackageExitCode:
78 - case TupleDefinitionType.WixBundlePackageGroup:
79 - case TupleDefinitionType.WixBundlePatchTargetCode:
80 - case TupleDefinitionType.WixBundlePayload:
81 - case TupleDefinitionType.WixBundlePayloadGroup:
82 - case TupleDefinitionType.WixBundleRelatedPackage:
83 - case TupleDefinitionType.WixBundleRollbackBoundary:
84 - case TupleDefinitionType.WixBundleSlipstreamMsp:
85 - case TupleDefinitionType.WixBundleUpdate:
86 - case TupleDefinitionType.WixBundleVariable:
87 - case TupleDefinitionType.WixBuildInfo:
88 - case TupleDefinitionType.WixChain:
89 - case TupleDefinitionType.WixComponentSearch:
90 - case TupleDefinitionType.WixDependencyProvider:
91 - case TupleDefinitionType.WixFileSearch:
92 - case TupleDefinitionType.WixGroup:
93 - case TupleDefinitionType.WixProductSearch:
94 - case TupleDefinitionType.WixRegistrySearch:
95 - case TupleDefinitionType.WixRelatedBundle:
96 - case TupleDefinitionType.WixSearch:
97 - case TupleDefinitionType.WixSearchRelation:
98 - case TupleDefinitionType.WixSetVariable:
99 - case TupleDefinitionType.WixUpdateRegistration:
60 + // Symbols used internally and are not added to a data manifest.
61 + case SymbolDefinitionType.ProvidesDependency:
62 + case SymbolDefinitionType.WixApprovedExeForElevation:
63 + case SymbolDefinitionType.WixBootstrapperApplication:
64 + case SymbolDefinitionType.WixBundle:
65 + case SymbolDefinitionType.WixBundleCatalog:
66 + case SymbolDefinitionType.WixBundleContainer:
67 + case SymbolDefinitionType.WixBundleCustomDataAttribute:
68 + case SymbolDefinitionType.WixBundleExePackage:
69 + case SymbolDefinitionType.WixBundleExtension:
70 + case SymbolDefinitionType.WixBundleMsiFeature:
71 + case SymbolDefinitionType.WixBundleMsiPackage:
72 + case SymbolDefinitionType.WixBundleMsiProperty:
73 + case SymbolDefinitionType.WixBundleMspPackage:
74 + case SymbolDefinitionType.WixBundleMsuPackage:
75 + case SymbolDefinitionType.WixBundlePackage:
76 + case SymbolDefinitionType.WixBundlePackageCommandLine:
77 + case SymbolDefinitionType.WixBundlePackageExitCode:
78 + case SymbolDefinitionType.WixBundlePackageGroup:
79 + case SymbolDefinitionType.WixBundlePatchTargetCode:
80 + case SymbolDefinitionType.WixBundlePayload:
81 + case SymbolDefinitionType.WixBundlePayloadGroup:
82 + case SymbolDefinitionType.WixBundleRelatedPackage:
83 + case SymbolDefinitionType.WixBundleRollbackBoundary:
84 + case SymbolDefinitionType.WixBundleSlipstreamMsp:
85 + case SymbolDefinitionType.WixBundleUpdate:
86 + case SymbolDefinitionType.WixBundleVariable:
87 + case SymbolDefinitionType.WixBuildInfo:
88 + case SymbolDefinitionType.WixChain:
89 + case SymbolDefinitionType.WixComponentSearch:
90 + case SymbolDefinitionType.WixDependencyProvider:
91 + case SymbolDefinitionType.WixFileSearch:
92 + case SymbolDefinitionType.WixGroup:
93 + case SymbolDefinitionType.WixProductSearch:
94 + case SymbolDefinitionType.WixRegistrySearch:
95 + case SymbolDefinitionType.WixRelatedBundle:
96 + case SymbolDefinitionType.WixSearch:
97 + case SymbolDefinitionType.WixSearchRelation:
98 + case SymbolDefinitionType.WixSetVariable:
99 + case SymbolDefinitionType.WixUpdateRegistration:
100 break;
101
102 - // Tuples used before binding.
103 - case TupleDefinitionType.WixComplexReference:
104 - case TupleDefinitionType.WixOrdering:
105 - case TupleDefinitionType.WixSimpleReference:
106 - case TupleDefinitionType.WixVariable:
102 + // Symbols used before binding.
103 + case SymbolDefinitionType.WixComplexReference:
104 + case SymbolDefinitionType.WixOrdering:
105 + case SymbolDefinitionType.WixSimpleReference:
106 + case SymbolDefinitionType.WixVariable:
107 break;
108
109 - // Tuples to investigate:
110 - case TupleDefinitionType.WixChainItem:
109 + // Symbols to investigate:
110 + case SymbolDefinitionType.WixChainItem:
111 break;
112
113 - case TupleDefinitionType.WixBundleCustomData:
114 - unknownTuple = !this.IndexBundleCustomDataTuple((WixBundleCustomDataTuple)tuple, customDataById);
113 + case SymbolDefinitionType.WixBundleCustomData:
114 + unknownSymbol = !this.IndexBundleCustomDataSymbol((WixBundleCustomDataSymbol)symbol, customDataById);
115 break;
116
117 - case TupleDefinitionType.WixBundleCustomDataCell:
118 - this.IndexBundleCustomDataCellTuple((WixBundleCustomDataCellTuple)tuple, cellsByCustomDataAndElementId);
117 + case SymbolDefinitionType.WixBundleCustomDataCell:
118 + this.IndexBundleCustomDataCellSymbol((WixBundleCustomDataCellSymbol)symbol, cellsByCustomDataAndElementId);
119 break;
120
121 - case TupleDefinitionType.MustBeFromAnExtension:
122 - unknownTuple = !this.AddTupleFromExtension(tuple);
121 + case SymbolDefinitionType.MustBeFromAnExtension:
122 + unknownSymbol = !this.AddSymbolFromExtension(symbol);
123 break;
124
125 default:
126 - unknownTuple = true;
126 + unknownSymbol = true;
127 break;
128 }
129
130 - if (unknownTuple)
130 + if (unknownSymbol)
131 {
132 - this.Messaging.Write(WarningMessages.TupleNotTranslatedToOutput(tuple));
132 + this.Messaging.Write(WarningMessages.SymbolNotTranslatedToOutput(symbol));
133 }
134 }
135
136 - this.AddIndexedCellTuples(customDataById, cellsByCustomDataAndElementId);
136 + this.AddIndexedCellSymbols(customDataById, cellsByCustomDataAndElementId);
137 }
138
139 - private bool IndexBundleCustomDataTuple(WixBundleCustomDataTuple wixBundleCustomDataTuple, Dictionary<string, WixBundleCustomDataTuple> customDataById)
139 + private bool IndexBundleCustomDataSymbol(WixBundleCustomDataSymbol wixBundleCustomDataSymbol, Dictionary<string, WixBundleCustomDataSymbol> customDataById)
140 {
141 - switch (wixBundleCustomDataTuple.Type)
141 + switch (wixBundleCustomDataSymbol.Type)
142 {
143 case WixBundleCustomDataType.BootstrapperApplication:
144 case WixBundleCustomDataType.BundleExtension:
@@ -147,38 +147,38 @@ namespace WixToolset.Core.Burn.Bind
147 return false;
148 }
149
150 - var customDataId = wixBundleCustomDataTuple.Id.Id;
151 - customDataById.Add(customDataId, wixBundleCustomDataTuple);
150 + var customDataId = wixBundleCustomDataSymbol.Id.Id;
151 + customDataById.Add(customDataId, wixBundleCustomDataSymbol);
152 return true;
153 }
154
155 - private void IndexBundleCustomDataCellTuple(WixBundleCustomDataCellTuple wixBundleCustomDataCellTuple, Dictionary<string, List<WixBundleCustomDataCellTuple>> cellsByCustomDataAndElementId)
155 + private void IndexBundleCustomDataCellSymbol(WixBundleCustomDataCellSymbol wixBundleCustomDataCellSymbol, Dictionary<string, List<WixBundleCustomDataCellSymbol>> cellsByCustomDataAndElementId)
156 {
157 - var tableAndRowId = wixBundleCustomDataCellTuple.CustomDataRef + "/" + wixBundleCustomDataCellTuple.ElementId;
157 + var tableAndRowId = wixBundleCustomDataCellSymbol.CustomDataRef + "/" + wixBundleCustomDataCellSymbol.ElementId;
158 if (!cellsByCustomDataAndElementId.TryGetValue(tableAndRowId, out var cells))
159 {
160 - cells = new List<WixBundleCustomDataCellTuple>();
160 + cells = new List<WixBundleCustomDataCellSymbol>();
161 cellsByCustomDataAndElementId.Add(tableAndRowId, cells);
162 }
163
164 - cells.Add(wixBundleCustomDataCellTuple);
164 + cells.Add(wixBundleCustomDataCellSymbol);
165 }
166
167 - private void AddIndexedCellTuples(Dictionary<string, WixBundleCustomDataTuple> customDataById, Dictionary<string, List<WixBundleCustomDataCellTuple>> cellsByCustomDataAndElementId)
167 + private void AddIndexedCellSymbols(Dictionary<string, WixBundleCustomDataSymbol> customDataById, Dictionary<string, List<WixBundleCustomDataCellSymbol>> cellsByCustomDataAndElementId)
168 {
169 foreach (var elementValues in cellsByCustomDataAndElementId.Values)
170 {
171 var elementName = elementValues[0].CustomDataRef;
172 - var customDataTuple = customDataById[elementName];
172 + var customDataSymbol = customDataById[elementName];
173
174 - var attributeNames = customDataTuple.AttributeNamesSeparated;
174 + var attributeNames = customDataSymbol.AttributeNamesSeparated;
175
176 var elementValuesByAttribute = elementValues.ToDictionary(t => t.AttributeRef, t => t.Value);
177
178 var sb = new StringBuilder();
179 using (var writer = XmlWriter.Create(sb, BurnBackendHelper.WriterSettings))
180 {
181 - switch (customDataTuple.Type)
181 + switch (customDataSymbol.Type)
182 {
183 case WixBundleCustomDataType.BootstrapperApplication:
184 writer.WriteStartElement(elementName, BurnCommon.BADataNamespace);
@@ -202,13 +202,13 @@ namespace WixToolset.Core.Burn.Bind
202 writer.WriteEndElement();
203 }
204
205 - switch (customDataTuple.Type)
205 + switch (customDataSymbol.Type)
206 {
207 case WixBundleCustomDataType.BootstrapperApplication:
208 this.BackendHelper.AddBootstrapperApplicationData(sb.ToString());
209 break;
210 case WixBundleCustomDataType.BundleExtension:
211 - this.BackendHelper.AddBundleExtensionData(customDataTuple.BundleExtensionRef, sb.ToString());
211 + this.BackendHelper.AddBundleExtensionData(customDataSymbol.BundleExtensionRef, sb.ToString());
212 break;
213 default:
214 throw new NotImplementedException();
@@ -216,11 +216,11 @@ namespace WixToolset.Core.Burn.Bind
216 }
217 }
218
219 - private bool AddTupleFromExtension(IntermediateTuple tuple)
219 + private bool AddSymbolFromExtension(IntermediateSymbol symbol)
220 {
221 foreach (var extension in this.BackendExtensions)
222 {
223 - if (extension.TryAddTupleToDataManifest(this.Section, tuple))
223 + if (extension.TryAddSymbolToDataManifest(this.Section, symbol))
224 {
225 return true;
226 }
src/WixToolset.Core.Burn/Bind/LegacySearchFacade.cs
+42 -42
@@ -5,17 +5,17 @@ namespace WixToolset.Core.Burn
5 using System;
6 using System.Xml;
7 using WixToolset.Data;
8 - using WixToolset.Data.Tuples;
8 + using WixToolset.Data.Symbols;
9
10 internal class LegacySearchFacade : BaseSearchFacade
11 {
12 - public LegacySearchFacade(WixSearchTuple searchTuple, IntermediateTuple searchSpecificTuple)
12 + public LegacySearchFacade(WixSearchSymbol searchSymbol, IntermediateSymbol searchSpecificSymbol)
13 {
14 - this.SearchTuple = searchTuple;
15 - this.SearchSpecificTuple = searchSpecificTuple;
14 + this.SearchSymbol = searchSymbol;
15 + this.SearchSpecificSymbol = searchSpecificSymbol;
16 }
17
18 - public IntermediateTuple SearchSpecificTuple { get; }
18 + public IntermediateSymbol SearchSpecificSymbol { get; }
19
20 /// <summary>
21 /// Generates Burn manifest and ParameterInfo-style markup a search.
@@ -23,45 +23,45 @@ namespace WixToolset.Core.Burn
23 /// <param name="writer"></param>
24 public override void WriteXml(XmlTextWriter writer)
25 {
26 - switch (this.SearchSpecificTuple)
26 + switch (this.SearchSpecificSymbol)
27 {
28 - case WixComponentSearchTuple tuple:
29 - this.WriteComponentSearchXml(writer, tuple);
28 + case WixComponentSearchSymbol symbol:
29 + this.WriteComponentSearchXml(writer, symbol);
30 break;
31 - case WixFileSearchTuple tuple:
32 - this.WriteFileSearchXml(writer, tuple);
31 + case WixFileSearchSymbol symbol:
32 + this.WriteFileSearchXml(writer, symbol);
33 break;
34 - case WixProductSearchTuple tuple:
35 - this.WriteProductSearchXml(writer, tuple);
34 + case WixProductSearchSymbol symbol:
35 + this.WriteProductSearchXml(writer, symbol);
36 break;
37 - case WixRegistrySearchTuple tuple:
38 - this.WriteRegistrySearchXml(writer, tuple);
37 + case WixRegistrySearchSymbol symbol:
38 + this.WriteRegistrySearchXml(writer, symbol);
39 break;
40 }
41 }
42
43 - private void WriteComponentSearchXml(XmlTextWriter writer, WixComponentSearchTuple searchTuple)
43 + private void WriteComponentSearchXml(XmlTextWriter writer, WixComponentSearchSymbol searchSymbol)
44 {
45 writer.WriteStartElement("MsiComponentSearch");
46
47 base.WriteXml(writer);
48
49 - writer.WriteAttributeString("ComponentId", searchTuple.Guid);
49 + writer.WriteAttributeString("ComponentId", searchSymbol.Guid);
50
51 - if (!String.IsNullOrEmpty(searchTuple.ProductCode))
51 + if (!String.IsNullOrEmpty(searchSymbol.ProductCode))
52 {
53 - writer.WriteAttributeString("ProductCode", searchTuple.ProductCode);
53 + writer.WriteAttributeString("ProductCode", searchSymbol.ProductCode);
54 }
55
56 - if (0 != (searchTuple.Attributes & WixComponentSearchAttributes.KeyPath))
56 + if (0 != (searchSymbol.Attributes & WixComponentSearchAttributes.KeyPath))
57 {
58 writer.WriteAttributeString("Type", "keyPath");
59 }
60 - else if (0 != (searchTuple.Attributes & WixComponentSearchAttributes.State))
60 + else if (0 != (searchSymbol.Attributes & WixComponentSearchAttributes.State))
61 {
62 writer.WriteAttributeString("Type", "state");
63 }
64 - else if (0 != (searchTuple.Attributes & WixComponentSearchAttributes.WantDirectory))
64 + else if (0 != (searchSymbol.Attributes & WixComponentSearchAttributes.WantDirectory))
65 {
66 writer.WriteAttributeString("Type", "directory");
67 }
@@ -69,18 +69,18 @@ namespace WixToolset.Core.Burn
69 writer.WriteEndElement();
70 }
71
72 - private void WriteFileSearchXml(XmlTextWriter writer, WixFileSearchTuple searchTuple)
72 + private void WriteFileSearchXml(XmlTextWriter writer, WixFileSearchSymbol searchSymbol)
73 {
74 - writer.WriteStartElement((0 == (searchTuple.Attributes & WixFileSearchAttributes.IsDirectory)) ? "FileSearch" : "DirectorySearch");
74 + writer.WriteStartElement((0 == (searchSymbol.Attributes & WixFileSearchAttributes.IsDirectory)) ? "FileSearch" : "DirectorySearch");
75
76 base.WriteXml(writer);
77
78 - writer.WriteAttributeString("Path", searchTuple.Path);
79 - if (WixFileSearchAttributes.WantExists == (searchTuple.Attributes & WixFileSearchAttributes.WantExists))
78 + writer.WriteAttributeString("Path", searchSymbol.Path);
79 + if (WixFileSearchAttributes.WantExists == (searchSymbol.Attributes & WixFileSearchAttributes.WantExists))
80 {
81 writer.WriteAttributeString("Type", "exists");
82 }
83 - else if (WixFileSearchAttributes.WantVersion == (searchTuple.Attributes & WixFileSearchAttributes.WantVersion))
83 + else if (WixFileSearchAttributes.WantVersion == (searchSymbol.Attributes & WixFileSearchAttributes.WantVersion))
84 {
85 // Can never get here for DirectorySearch.
86 writer.WriteAttributeString("Type", "version");
@@ -92,34 +92,34 @@ namespace WixToolset.Core.Burn
92 writer.WriteEndElement();
93 }
94
95 - private void WriteProductSearchXml(XmlTextWriter writer, WixProductSearchTuple tuple)
95 + private void WriteProductSearchXml(XmlTextWriter writer, WixProductSearchSymbol symbol)
96 {
97 writer.WriteStartElement("MsiProductSearch");
98
99 base.WriteXml(writer);
100
101 - if (0 != (tuple.Attributes & WixProductSearchAttributes.UpgradeCode))
101 + if (0 != (symbol.Attributes & WixProductSearchAttributes.UpgradeCode))
102 {
103 - writer.WriteAttributeString("UpgradeCode", tuple.Guid);
103 + writer.WriteAttributeString("UpgradeCode", symbol.Guid);
104 }
105 else
106 {
107 - writer.WriteAttributeString("ProductCode", tuple.Guid);
107 + writer.WriteAttributeString("ProductCode", symbol.Guid);
108 }
109
110 - if (0 != (tuple.Attributes & WixProductSearchAttributes.Version))
110 + if (0 != (symbol.Attributes & WixProductSearchAttributes.Version))
111 {
112 writer.WriteAttributeString("Type", "version");
113 }
114 - else if (0 != (tuple.Attributes & WixProductSearchAttributes.Language))
114 + else if (0 != (symbol.Attributes & WixProductSearchAttributes.Language))
115 {
116 writer.WriteAttributeString("Type", "language");
117 }
118 - else if (0 != (tuple.Attributes & WixProductSearchAttributes.State))
118 + else if (0 != (symbol.Attributes & WixProductSearchAttributes.State))
119 {
120 writer.WriteAttributeString("Type", "state");
121 }
122 - else if (0 != (tuple.Attributes & WixProductSearchAttributes.Assignment))
122 + else if (0 != (symbol.Attributes & WixProductSearchAttributes.Assignment))
123 {
124 writer.WriteAttributeString("Type", "assignment");
125 }
@@ -127,13 +127,13 @@ namespace WixToolset.Core.Burn
127 writer.WriteEndElement();
128 }
129
130 - private void WriteRegistrySearchXml(XmlTextWriter writer, WixRegistrySearchTuple tuple)
130 + private void WriteRegistrySearchXml(XmlTextWriter writer, WixRegistrySearchSymbol symbol)
131 {
132 writer.WriteStartElement("RegistrySearch");
133
134 base.WriteXml(writer);
135
136 - switch (tuple.Root)
136 + switch (symbol.Root)
137 {
138 case RegistryRootType.ClassesRoot:
139 writer.WriteAttributeString("Root", "HKCR");
@@ -149,25 +149,25 @@ namespace WixToolset.Core.Burn
149 break;
150 }
151
152 - writer.WriteAttributeString("Key", tuple.Key);
152 + writer.WriteAttributeString("Key", symbol.Key);
153
154 - if (!String.IsNullOrEmpty(tuple.Value))
154 + if (!String.IsNullOrEmpty(symbol.Value))
155 {
156 - writer.WriteAttributeString("Value", tuple.Value);
156 + writer.WriteAttributeString("Value", symbol.Value);
157 }
158
159 - var existenceOnly = 0 != (tuple.Attributes & WixRegistrySearchAttributes.WantExists);
159 + var existenceOnly = 0 != (symbol.Attributes & WixRegistrySearchAttributes.WantExists);
160
161 writer.WriteAttributeString("Type", existenceOnly ? "exists" : "value");
162
163 - if (0 != (tuple.Attributes & WixRegistrySearchAttributes.Win64))
163 + if (0 != (symbol.Attributes & WixRegistrySearchAttributes.Win64))
164 {
165 writer.WriteAttributeString("Win64", "yes");
166 }
167
168 if (!existenceOnly)
169 {
170 - if (0 != (tuple.Attributes & WixRegistrySearchAttributes.ExpandEnvironmentVariables))
170 + if (0 != (symbol.Attributes & WixRegistrySearchAttributes.ExpandEnvironmentVariables))
171 {
172 writer.WriteAttributeString("ExpandEnvironment", "yes");
173 }
src/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs
+36 -36
@@ -8,7 +8,7 @@ namespace WixToolset.Core.Burn.Bind
8 using WixToolset.Data;
9 using WixToolset.Core.Burn.Bundles;
10 using WixToolset.Extensibility.Services;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12
13 internal class ProcessDependencyProvidersCommand
14 {
@@ -22,7 +22,7 @@ namespace WixToolset.Core.Burn.Bind
22
23 public string BundleProviderKey { get; private set; }
24
25 - public Dictionary<string, ProvidesDependencyTuple> DependencyTuplesByKey { get; private set; }
25 + public Dictionary<string, ProvidesDependencySymbol> DependencySymbolsByKey { get; private set; }
26
27 private IMessaging Messaging { get; }
28
@@ -38,42 +38,42 @@ namespace WixToolset.Core.Burn.Bind
38 /// </summary>
39 public void Execute()
40 {
41 - var wixDependencyProviderTuples = this.Section.Tuples.OfType<WixDependencyProviderTuple>();
41 + var wixDependencyProviderSymbols = this.Section.Symbols.OfType<WixDependencyProviderSymbol>();
42
43 - foreach (var wixDependencyProviderTuple in wixDependencyProviderTuples)
43 + foreach (var wixDependencyProviderSymbol in wixDependencyProviderSymbols)
44 {
45 // Sets the provider key for the bundle, if it is not set already.
46 if (String.IsNullOrEmpty(this.BundleProviderKey))
47 {
48 - if (wixDependencyProviderTuple.Bundle)
48 + if (wixDependencyProviderSymbol.Bundle)
49 {
50 - this.BundleProviderKey = wixDependencyProviderTuple.ProviderKey;
50 + this.BundleProviderKey = wixDependencyProviderSymbol.ProviderKey;
51 }
52 }
53
54 // Import any authored dependencies. These may merge with imported provides from MSI packages.
55 - var packageId = wixDependencyProviderTuple.Id.Id;
55 + var packageId = wixDependencyProviderSymbol.Id.Id;
56
57 if (this.Facades.TryGetValue(packageId, out var facade))
58 {
59 - var dependency = this.Section.AddTuple(new ProvidesDependencyTuple(wixDependencyProviderTuple.SourceLineNumbers, wixDependencyProviderTuple.Id)
59 + var dependency = this.Section.AddSymbol(new ProvidesDependencySymbol(wixDependencyProviderSymbol.SourceLineNumbers, wixDependencyProviderSymbol.Id)
60 {
61 PackageRef = packageId,
62 - Key = wixDependencyProviderTuple.ProviderKey,
63 - Version = wixDependencyProviderTuple.Version,
64 - DisplayName = wixDependencyProviderTuple.DisplayName,
65 - Attributes = (int)wixDependencyProviderTuple.Attributes
62 + Key = wixDependencyProviderSymbol.ProviderKey,
63 + Version = wixDependencyProviderSymbol.Version,
64 + DisplayName = wixDependencyProviderSymbol.DisplayName,
65 + Attributes = (int)wixDependencyProviderSymbol.Attributes
66 });
67
68 if (String.IsNullOrEmpty(dependency.Key))
69 {
70 - switch (facade.SpecificPackageTuple)
70 + switch (facade.SpecificPackageSymbol)
71 {
72 // The WixDependencyExtension allows an empty Key for MSIs and MSPs.
73 - case WixBundleMsiPackageTuple msiPackage:
73 + case WixBundleMsiPackageSymbol msiPackage:
74 dependency.Key = msiPackage.ProductCode;
75 break;
76 - case WixBundleMspPackageTuple mspPackage:
76 + case WixBundleMspPackageSymbol mspPackage:
77 dependency.Key = mspPackage.PatchCode;
78 break;
79 }
@@ -81,7 +81,7 @@ namespace WixToolset.Core.Burn.Bind
81
82 if (String.IsNullOrEmpty(dependency.Version))
83 {
84 - dependency.Version = facade.PackageTuple.Version;
84 + dependency.Version = facade.PackageSymbol.Version;
85 }
86
87 // If the version is still missing, a version could not be harvested from the package and was not authored.
@@ -92,55 +92,55 @@ namespace WixToolset.Core.Burn.Bind
92
93 if (String.IsNullOrEmpty(dependency.DisplayName))
94 {
95 - dependency.DisplayName = facade.PackageTuple.DisplayName;
95 + dependency.DisplayName = facade.PackageSymbol.DisplayName;
96 }
97 }
98 }
99
100 - this.DependencyTuplesByKey = this.GetDependencyTuplesByKey();
100 + this.DependencySymbolsByKey = this.GetDependencySymbolsByKey();
101
102 // Generate providers for MSI and MSP packages that still do not have providers.
103 foreach (var facade in this.Facades.Values)
104 {
105 string key = null;
106
107 - //if (WixBundlePackageType.Msi == facade.PackageTuple.Type)
108 - if (facade.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage)
107 + //if (WixBundlePackageType.Msi == facade.PackageSymbol.Type)
108 + if (facade.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage)
109 {
110 - //var msiPackage = (WixBundleMsiPackageTuple)facade.SpecificPackageTuple;
110 + //var msiPackage = (WixBundleMsiPackageSymbol)facade.SpecificPackageSymbol;
111 key = msiPackage.ProductCode;
112 }
113 - //else if (WixBundlePackageType.Msp == facade.PackageTuple.Type)
114 - else if (facade.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage)
113 + //else if (WixBundlePackageType.Msp == facade.PackageSymbol.Type)
114 + else if (facade.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage)
115 {
116 - //var mspPackage = (WixBundleMspPackageTuple)facade.SpecificPackageTuple;
116 + //var mspPackage = (WixBundleMspPackageSymbol)facade.SpecificPackageSymbol;
117 key = mspPackage.PatchCode;
118 }
119
120 - if (!String.IsNullOrEmpty(key) && !this.DependencyTuplesByKey.ContainsKey(key))
120 + if (!String.IsNullOrEmpty(key) && !this.DependencySymbolsByKey.ContainsKey(key))
121 {
122 - var dependency = this.Section.AddTuple(new ProvidesDependencyTuple(facade.PackageTuple.SourceLineNumbers, facade.PackageTuple.Id)
122 + var dependency = this.Section.AddSymbol(new ProvidesDependencySymbol(facade.PackageSymbol.SourceLineNumbers, facade.PackageSymbol.Id)
123 {
124 PackageRef = facade.PackageId,
125 Key = key,
126 - Version = facade.PackageTuple.Version,
127 - DisplayName = facade.PackageTuple.DisplayName
126 + Version = facade.PackageSymbol.Version,
127 + DisplayName = facade.PackageSymbol.DisplayName
128 });
129
130 - this.DependencyTuplesByKey.Add(dependency.Key, dependency);
130 + this.DependencySymbolsByKey.Add(dependency.Key, dependency);
131 }
132 }
133 }
134
135 - private Dictionary<string, ProvidesDependencyTuple> GetDependencyTuplesByKey()
135 + private Dictionary<string, ProvidesDependencySymbol> GetDependencySymbolsByKey()
136 {
137 - var dependencyTuplesByKey = new Dictionary<string, ProvidesDependencyTuple>();
137 + var dependencySymbolsByKey = new Dictionary<string, ProvidesDependencySymbol>();
138
139 - var dependencyTuples = this.Section.Tuples.OfType<ProvidesDependencyTuple>();
139 + var dependencySymbols = this.Section.Symbols.OfType<ProvidesDependencySymbol>();
140
141 - foreach (var dependency in dependencyTuples)
141 + foreach (var dependency in dependencySymbols)
142 {
143 - if (dependencyTuplesByKey.TryGetValue(dependency.Key, out var collision))
143 + if (dependencySymbolsByKey.TryGetValue(dependency.Key, out var collision))
144 {
145 // If not a perfect dependency collision, display an error.
146 if (dependency.Key != collision.Key ||
@@ -152,11 +152,11 @@ namespace WixToolset.Core.Burn.Bind
152 }
153 else
154 {
155 - dependencyTuplesByKey.Add(dependency.Key, dependency);
155 + dependencySymbolsByKey.Add(dependency.Key, dependency);
156 }
157 }
158
159 - return dependencyTuplesByKey;
159 + return dependencySymbolsByKey;
160 }
161 }
162 }
src/WixToolset.Core.Burn/Bind/SetVariableSearchFacade.cs
+8 -8
@@ -3,17 +3,17 @@
3 namespace WixToolset.Core.Burn
4 {
5 using System.Xml;
6 - using WixToolset.Data.Tuples;
6 + using WixToolset.Data.Symbols;
7
8 internal class SetVariableSearchFacade : BaseSearchFacade
9 {
10 - public SetVariableSearchFacade(WixSearchTuple searchTuple, WixSetVariableTuple setVariableTuple)
10 + public SetVariableSearchFacade(WixSearchSymbol searchSymbol, WixSetVariableSymbol setVariableSymbol)
11 {
12 - this.SearchTuple = searchTuple;
13 - this.SetVariableTuple = setVariableTuple;
12 + this.SearchSymbol = searchSymbol;
13 + this.SetVariableSymbol = setVariableSymbol;
14 }
15
16 - private WixSetVariableTuple SetVariableTuple { get; }
16 + private WixSetVariableSymbol SetVariableSymbol { get; }
17
18 public override void WriteXml(XmlTextWriter writer)
19 {
@@ -21,10 +21,10 @@ namespace WixToolset.Core.Burn
21
22 base.WriteXml(writer);
23
24 - if (this.SetVariableTuple.Type != null)
24 + if (this.SetVariableSymbol.Type != null)
25 {
26 - writer.WriteAttributeString("Value", this.SetVariableTuple.Value);
27 - writer.WriteAttributeString("Type", this.SetVariableTuple.Type);
26 + writer.WriteAttributeString("Value", this.SetVariableSymbol.Value);
27 + writer.WriteAttributeString("Type", this.SetVariableSymbol.Type);
28 }
29
30 writer.WriteEndElement();
src/WixToolset.Core.Burn/Bundles/AutomaticallySlipstreamPatchesCommand.cs
+31 -31
@@ -7,7 +7,7 @@ namespace WixToolset.Core.Burn.Bundles
7 using System.Diagnostics;
8 using System.Linq;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11
12 internal class AutomaticallySlipstreamPatchesCommand
13 {
@@ -23,42 +23,42 @@ namespace WixToolset.Core.Burn.Bundles
23
24 public void Execute()
25 {
26 - var msiPackages = new List<WixBundleMsiPackageTuple>();
27 - var targetsProductCode = new Dictionary<string, List<WixBundlePatchTargetCodeTuple>>();
28 - var targetsUpgradeCode = new Dictionary<string, List<WixBundlePatchTargetCodeTuple>>();
26 + var msiPackages = new List<WixBundleMsiPackageSymbol>();
27 + var targetsProductCode = new Dictionary<string, List<WixBundlePatchTargetCodeSymbol>>();
28 + var targetsUpgradeCode = new Dictionary<string, List<WixBundlePatchTargetCodeSymbol>>();
29
30 foreach (var facade in this.PackageFacades)
31 {
32 // Keep track of all MSI packages.
33 - if (facade.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage)
33 + if (facade.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage)
34 {
35 msiPackages.Add(msiPackage);
36 }
37 - else if (facade.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage && mspPackage.Slipstream)
37 + else if (facade.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage && mspPackage.Slipstream)
38 {
39 - var patchTargetCodeTuples = this.Section.Tuples
40 - .OfType<WixBundlePatchTargetCodeTuple>()
39 + var patchTargetCodeSymbols = this.Section.Symbols
40 + .OfType<WixBundlePatchTargetCodeSymbol>()
41 .Where(r => r.PackageRef == facade.PackageId);
42
43 // Index target ProductCodes and UpgradeCodes for slipstreamed MSPs.
44 - foreach (var tuple in patchTargetCodeTuples)
44 + foreach (var symbol in patchTargetCodeSymbols)
45 {
46 - if (tuple.TargetsProductCode)
46 + if (symbol.TargetsProductCode)
47 {
48 - if (!targetsProductCode.TryGetValue(tuple.TargetCode, out var tuples))
48 + if (!targetsProductCode.TryGetValue(symbol.TargetCode, out var symbols))
49 {
50 - tuples = new List<WixBundlePatchTargetCodeTuple>();
51 - targetsProductCode.Add(tuple.TargetCode, tuples);
50 + symbols = new List<WixBundlePatchTargetCodeSymbol>();
51 + targetsProductCode.Add(symbol.TargetCode, symbols);
52 }
53
54 - tuples.Add(tuple);
54 + symbols.Add(symbol);
55 }
56 - else if (tuple.TargetsUpgradeCode)
56 + else if (symbol.TargetsUpgradeCode)
57 {
58 - if (!targetsUpgradeCode.TryGetValue(tuple.TargetCode, out var tuples))
58 + if (!targetsUpgradeCode.TryGetValue(symbol.TargetCode, out var symbols))
59 {
60 - tuples = new List<WixBundlePatchTargetCodeTuple>();
61 - targetsUpgradeCode.Add(tuple.TargetCode, tuples);
60 + symbols = new List<WixBundlePatchTargetCodeSymbol>();
61 + targetsUpgradeCode.Add(symbol.TargetCode, symbols);
62 }
63 }
64 }
@@ -70,39 +70,39 @@ namespace WixToolset.Core.Burn.Bundles
70 // Loop through the MSI and slipstream patches targeting it.
71 foreach (var msi in msiPackages)
72 {
73 - if (targetsProductCode.TryGetValue(msi.ProductCode, out var tuples))
73 + if (targetsProductCode.TryGetValue(msi.ProductCode, out var symbols))
74 {
75 - foreach (var tuple in tuples)
75 + foreach (var symbol in symbols)
76 {
77 - Debug.Assert(tuple.TargetsProductCode);
78 - Debug.Assert(!tuple.TargetsUpgradeCode);
77 + Debug.Assert(symbol.TargetsProductCode);
78 + Debug.Assert(!symbol.TargetsUpgradeCode);
79
80 - this.TryAddSlipstreamTuple(slipstreamMspIds, msi, tuple);
80 + this.TryAddSlipstreamSymbol(slipstreamMspIds, msi, symbol);
81 }
82 }
83
84 - if (!String.IsNullOrEmpty(msi.UpgradeCode) && targetsUpgradeCode.TryGetValue(msi.UpgradeCode, out tuples))
84 + if (!String.IsNullOrEmpty(msi.UpgradeCode) && targetsUpgradeCode.TryGetValue(msi.UpgradeCode, out symbols))
85 {
86 - foreach (var tuple in tuples)
86 + foreach (var symbol in symbols)
87 {
88 - Debug.Assert(!tuple.TargetsProductCode);
89 - Debug.Assert(tuple.TargetsUpgradeCode);
88 + Debug.Assert(!symbol.TargetsProductCode);
89 + Debug.Assert(symbol.TargetsUpgradeCode);
90
91 - this.TryAddSlipstreamTuple(slipstreamMspIds, msi, tuple);
91 + this.TryAddSlipstreamSymbol(slipstreamMspIds, msi, symbol);
92 }
93
94 - tuples = null;
94 + symbols = null;
95 }
96 }
97 }
98
99 - private bool TryAddSlipstreamTuple(HashSet<string> slipstreamMspIds, WixBundleMsiPackageTuple msiPackage, WixBundlePatchTargetCodeTuple patchTargetCode)
99 + private bool TryAddSlipstreamSymbol(HashSet<string> slipstreamMspIds, WixBundleMsiPackageSymbol msiPackage, WixBundlePatchTargetCodeSymbol patchTargetCode)
100 {
101 var id = new Identifier(AccessModifier.Private, msiPackage.Id.Id, patchTargetCode.PackageRef);
102
103 if (slipstreamMspIds.Add(id.Id))
104 {
105 - this.Section.AddTuple(new WixBundleSlipstreamMspTuple(patchTargetCode.SourceLineNumbers)
105 + this.Section.AddSymbol(new WixBundleSlipstreamMspSymbol(patchTargetCode.SourceLineNumbers)
106 {
107 TargetPackageRef = msiPackage.Id.Id,
108 MspPackageRef = patchTargetCode.PackageRef,
src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs
+64 -64
@@ -11,24 +11,24 @@ namespace WixToolset.Core.Burn.Bundles
11 using System.Xml;
12 using WixToolset.Data;
13 using WixToolset.Data.Burn;
14 - using WixToolset.Data.Tuples;
14 + using WixToolset.Data.Symbols;
15
16 internal class CreateBootstrapperApplicationManifestCommand
17 {
18 - public CreateBootstrapperApplicationManifestCommand(IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<PackageFacade> chainPackages, int lastUXPayloadIndex, Dictionary<string, WixBundlePayloadTuple> payloadTuples, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper)
18 + public CreateBootstrapperApplicationManifestCommand(IntermediateSection section, WixBundleSymbol bundleSymbol, IEnumerable<PackageFacade> chainPackages, int lastUXPayloadIndex, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper)
19 {
20 this.Section = section;
21 - this.BundleTuple = bundleTuple;
21 + this.BundleSymbol = bundleSymbol;
22 this.ChainPackages = chainPackages;
23 this.LastUXPayloadIndex = lastUXPayloadIndex;
24 - this.Payloads = payloadTuples;
24 + this.Payloads = payloadSymbols;
25 this.IntermediateFolder = intermediateFolder;
26 this.InternalBurnBackendHelper = internalBurnBackendHelper;
27 }
28
29 private IntermediateSection Section { get; }
30
31 - private WixBundleTuple BundleTuple { get; }
31 + private WixBundleSymbol BundleSymbol { get; }
32
33 private IEnumerable<PackageFacade> ChainPackages { get; }
34
@@ -36,11 +36,11 @@ namespace WixToolset.Core.Burn.Bundles
36
37 private int LastUXPayloadIndex { get; }
38
39 - private Dictionary<string, WixBundlePayloadTuple> Payloads { get; }
39 + private Dictionary<string, WixBundlePayloadSymbol> Payloads { get; }
40
41 private string IntermediateFolder { get; }
42
43 - public WixBundlePayloadTuple BootstrapperApplicationManifestPayloadRow { get; private set; }
43 + public WixBundlePayloadSymbol BootstrapperApplicationManifestPayloadRow { get; private set; }
44
45 public string OutputPath { get; private set; }
46
@@ -84,12 +84,12 @@ namespace WixToolset.Core.Burn.Bundles
84 {
85 writer.WriteStartElement("WixBundleProperties");
86
87 - writer.WriteAttributeString("DisplayName", this.BundleTuple.Name);
88 - writer.WriteAttributeString("LogPathVariable", this.BundleTuple.LogPathVariable);
89 - writer.WriteAttributeString("Compressed", this.BundleTuple.Compressed == true ? "yes" : "no");
90 - writer.WriteAttributeString("Id", this.BundleTuple.BundleId.ToUpperInvariant());
91 - writer.WriteAttributeString("UpgradeCode", this.BundleTuple.UpgradeCode);
92 - writer.WriteAttributeString("PerMachine", this.BundleTuple.PerMachine ? "yes" : "no");
87 + writer.WriteAttributeString("DisplayName", this.BundleSymbol.Name);
88 + writer.WriteAttributeString("LogPathVariable", this.BundleSymbol.LogPathVariable);
89 + writer.WriteAttributeString("Compressed", this.BundleSymbol.Compressed == true ? "yes" : "no");
90 + writer.WriteAttributeString("Id", this.BundleSymbol.BundleId.ToUpperInvariant());
91 + writer.WriteAttributeString("UpgradeCode", this.BundleSymbol.UpgradeCode);
92 + writer.WriteAttributeString("PerMachine", this.BundleSymbol.PerMachine ? "yes" : "no");
93
94 writer.WriteEndElement();
95 }
@@ -98,35 +98,35 @@ namespace WixToolset.Core.Burn.Bundles
98 {
99 foreach (var package in this.ChainPackages)
100 {
101 - var packagePayload = this.Payloads[package.PackageTuple.PayloadRef];
101 + var packagePayload = this.Payloads[package.PackageSymbol.PayloadRef];
102
103 - var size = package.PackageTuple.Size.ToString(CultureInfo.InvariantCulture);
103 + var size = package.PackageSymbol.Size.ToString(CultureInfo.InvariantCulture);
104
105 writer.WriteStartElement("WixPackageProperties");
106
107 writer.WriteAttributeString("Package", package.PackageId);
108 - writer.WriteAttributeString("Vital", package.PackageTuple.Vital == true ? "yes" : "no");
108 + writer.WriteAttributeString("Vital", package.PackageSymbol.Vital == true ? "yes" : "no");
109
110 - if (!String.IsNullOrEmpty(package.PackageTuple.DisplayName))
110 + if (!String.IsNullOrEmpty(package.PackageSymbol.DisplayName))
111 {
112 - writer.WriteAttributeString("DisplayName", package.PackageTuple.DisplayName);
112 + writer.WriteAttributeString("DisplayName", package.PackageSymbol.DisplayName);
113 }
114
115 - if (!String.IsNullOrEmpty(package.PackageTuple.Description))
115 + if (!String.IsNullOrEmpty(package.PackageSymbol.Description))
116 {
117 - writer.WriteAttributeString("Description", package.PackageTuple.Description);
117 + writer.WriteAttributeString("Description", package.PackageSymbol.Description);
118 }
119
120 writer.WriteAttributeString("DownloadSize", size);
121 writer.WriteAttributeString("PackageSize", size);
122 - writer.WriteAttributeString("InstalledSize", package.PackageTuple.InstallSize?.ToString(CultureInfo.InvariantCulture) ?? size);
123 - writer.WriteAttributeString("PackageType", package.PackageTuple.Type.ToString());
124 - writer.WriteAttributeString("Permanent", package.PackageTuple.Permanent ? "yes" : "no");
125 - writer.WriteAttributeString("LogPathVariable", package.PackageTuple.LogPathVariable);
126 - writer.WriteAttributeString("RollbackLogPathVariable", package.PackageTuple.RollbackLogPathVariable);
122 + writer.WriteAttributeString("InstalledSize", package.PackageSymbol.InstallSize?.ToString(CultureInfo.InvariantCulture) ?? size);
123 + writer.WriteAttributeString("PackageType", package.PackageSymbol.Type.ToString());
124 + writer.WriteAttributeString("Permanent", package.PackageSymbol.Permanent ? "yes" : "no");
125 + writer.WriteAttributeString("LogPathVariable", package.PackageSymbol.LogPathVariable);
126 + writer.WriteAttributeString("RollbackLogPathVariable", package.PackageSymbol.RollbackLogPathVariable);
127 writer.WriteAttributeString("Compressed", packagePayload.Compressed == true ? "yes" : "no");
128
129 - if (package.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage)
129 + if (package.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage)
130 {
131 if (!String.IsNullOrEmpty(msiPackage.ProductCode))
132 {
@@ -138,7 +138,7 @@ namespace WixToolset.Core.Burn.Bundles
138 writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode);
139 }
140 }
141 - else if (package.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage)
141 + else if (package.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage)
142 {
143 if (!String.IsNullOrEmpty(mspPackage.PatchCode))
144 {
@@ -146,17 +146,17 @@ namespace WixToolset.Core.Burn.Bundles
146 }
147 }
148
149 - if (!String.IsNullOrEmpty(package.PackageTuple.Version))
149 + if (!String.IsNullOrEmpty(package.PackageSymbol.Version))
150 {
151 - writer.WriteAttributeString("Version", package.PackageTuple.Version);
151 + writer.WriteAttributeString("Version", package.PackageSymbol.Version);
152 }
153
154 - if (!String.IsNullOrEmpty(package.PackageTuple.InstallCondition))
154 + if (!String.IsNullOrEmpty(package.PackageSymbol.InstallCondition))
155 {
156 - writer.WriteAttributeString("InstallCondition", package.PackageTuple.InstallCondition);
156 + writer.WriteAttributeString("InstallCondition", package.PackageSymbol.InstallCondition);
157 }
158
159 - switch (package.PackageTuple.Cache)
159 + switch (package.PackageSymbol.Cache)
160 {
161 case YesNoAlwaysType.No:
162 writer.WriteAttributeString("Cache", "no");
@@ -175,35 +175,35 @@ namespace WixToolset.Core.Burn.Bundles
175
176 private void WriteFeatureInfo(XmlTextWriter writer)
177 {
178 - var featureTuples = this.Section.Tuples.OfType<WixBundleMsiFeatureTuple>();
178 + var featureSymbols = this.Section.Symbols.OfType<WixBundleMsiFeatureSymbol>();
179
180 - foreach (var featureTuple in featureTuples)
180 + foreach (var featureSymbol in featureSymbols)
181 {
182 writer.WriteStartElement("WixPackageFeatureInfo");
183
184 - writer.WriteAttributeString("Package", featureTuple.PackageRef);
185 - writer.WriteAttributeString("Feature", featureTuple.Name);
186 - writer.WriteAttributeString("Size", featureTuple.Size.ToString(CultureInfo.InvariantCulture));
184 + writer.WriteAttributeString("Package", featureSymbol.PackageRef);
185 + writer.WriteAttributeString("Feature", featureSymbol.Name);
186 + writer.WriteAttributeString("Size", featureSymbol.Size.ToString(CultureInfo.InvariantCulture));
187
188 - if (!String.IsNullOrEmpty(featureTuple.Parent))
188 + if (!String.IsNullOrEmpty(featureSymbol.Parent))
189 {
190 - writer.WriteAttributeString("Parent", featureTuple.Parent);
190 + writer.WriteAttributeString("Parent", featureSymbol.Parent);
191 }
192
193 - if (!String.IsNullOrEmpty(featureTuple.Title))
193 + if (!String.IsNullOrEmpty(featureSymbol.Title))
194 {
195 - writer.WriteAttributeString("Title", featureTuple.Title);
195 + writer.WriteAttributeString("Title", featureSymbol.Title);
196 }
197
198 - if (!String.IsNullOrEmpty(featureTuple.Description))
198 + if (!String.IsNullOrEmpty(featureSymbol.Description))
199 {
200 - writer.WriteAttributeString("Description", featureTuple.Description);
200 + writer.WriteAttributeString("Description", featureSymbol.Description);
201 }
202
203 - writer.WriteAttributeString("Display", featureTuple.Display.ToString(CultureInfo.InvariantCulture));
204 - writer.WriteAttributeString("Level", featureTuple.Level.ToString(CultureInfo.InvariantCulture));
205 - writer.WriteAttributeString("Directory", featureTuple.Directory);
206 - writer.WriteAttributeString("Attributes", featureTuple.Attributes.ToString(CultureInfo.InvariantCulture));
203 + writer.WriteAttributeString("Display", featureSymbol.Display.ToString(CultureInfo.InvariantCulture));
204 + writer.WriteAttributeString("Level", featureSymbol.Level.ToString(CultureInfo.InvariantCulture));
205 + writer.WriteAttributeString("Directory", featureSymbol.Directory);
206 + writer.WriteAttributeString("Attributes", featureSymbol.Attributes.ToString(CultureInfo.InvariantCulture));
207
208 writer.WriteEndElement();
209 }
@@ -211,43 +211,43 @@ namespace WixToolset.Core.Burn.Bundles
211
212 private void WritePayloadInfo(XmlTextWriter writer)
213 {
214 - var payloadTuples = this.Section.Tuples.OfType<WixBundlePayloadTuple>();
214 + var payloadSymbols = this.Section.Symbols.OfType<WixBundlePayloadSymbol>();
215
216 - foreach (var payloadTuple in payloadTuples)
216 + foreach (var payloadSymbol in payloadSymbols)
217 {
218 writer.WriteStartElement("WixPayloadProperties");
219
220 - writer.WriteAttributeString("Payload", payloadTuple.Id.Id);
220 + writer.WriteAttributeString("Payload", payloadSymbol.Id.Id);
221
222 - if (!String.IsNullOrEmpty(payloadTuple.PackageRef))
222 + if (!String.IsNullOrEmpty(payloadSymbol.PackageRef))
223 {
224 - writer.WriteAttributeString("Package", payloadTuple.PackageRef);
224 + writer.WriteAttributeString("Package", payloadSymbol.PackageRef);
225 }
226
227 - if (!String.IsNullOrEmpty(payloadTuple.ContainerRef))
227 + if (!String.IsNullOrEmpty(payloadSymbol.ContainerRef))
228 {
229 - writer.WriteAttributeString("Container", payloadTuple.ContainerRef);
229 + writer.WriteAttributeString("Container", payloadSymbol.ContainerRef);
230 }
231
232 - writer.WriteAttributeString("Name", payloadTuple.Name);
233 - writer.WriteAttributeString("Size", payloadTuple.FileSize.Value.ToString(CultureInfo.InvariantCulture));
232 + writer.WriteAttributeString("Name", payloadSymbol.Name);
233 + writer.WriteAttributeString("Size", payloadSymbol.FileSize.Value.ToString(CultureInfo.InvariantCulture));
234
235 - if (!String.IsNullOrEmpty(payloadTuple.DownloadUrl))
235 + if (!String.IsNullOrEmpty(payloadSymbol.DownloadUrl))
236 {
237 - writer.WriteAttributeString("DownloadUrl", payloadTuple.DownloadUrl);
237 + writer.WriteAttributeString("DownloadUrl", payloadSymbol.DownloadUrl);
238 }
239
240 - writer.WriteAttributeString("LayoutOnly", payloadTuple.LayoutOnly ? "yes" : "no");
240 + writer.WriteAttributeString("LayoutOnly", payloadSymbol.LayoutOnly ? "yes" : "no");
241
242 writer.WriteEndElement();
243 }
244 }
245
246 - private WixBundlePayloadTuple CreateBootstrapperApplicationManifestPayloadRow(string baManifestPath)
246 + private WixBundlePayloadSymbol CreateBootstrapperApplicationManifestPayloadRow(string baManifestPath)
247 {
248 var generatedId = Common.GenerateIdentifier("ux", BurnCommon.BADataFileName);
249
250 - var tuple = this.Section.AddTuple(new WixBundlePayloadTuple(this.BundleTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
250 + var symbol = this.Section.AddSymbol(new WixBundlePayloadSymbol(this.BundleSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
251 {
252 Name = BurnCommon.BADataFileName,
253 SourceFile = new IntermediateFieldPathValue { Path = baManifestPath },
@@ -260,11 +260,11 @@ namespace WixToolset.Core.Burn.Bundles
260
261 var fileInfo = new FileInfo(baManifestPath);
262
263 - tuple.FileSize = (int)fileInfo.Length;
263 + symbol.FileSize = (int)fileInfo.Length;
264
265 - tuple.Hash = BundleHashAlgorithm.Hash(fileInfo);
265 + symbol.Hash = BundleHashAlgorithm.Hash(fileInfo);
266
267 - return tuple;
267 + return symbol;
268 }
269 }
270 }
src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
+11 -11
@@ -8,19 +8,19 @@ namespace WixToolset.Core.Burn.Bundles
8 using System.Reflection;
9 using WixToolset.Data;
10 using WixToolset.Data.Burn;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12 using WixToolset.Extensibility.Data;
13 using WixToolset.Extensibility.Services;
14
15 internal class CreateBundleExeCommand
16 {
17 - public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleTuple bundleTuple, WixBundleContainerTuple uxContainer, IEnumerable<WixBundleContainerTuple> containers)
17 + public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleSymbol bundleSymbol, WixBundleContainerSymbol uxContainer, IEnumerable<WixBundleContainerSymbol> containers)
18 {
19 this.Messaging = messaging;
20 this.BackendHelper = backendHelper;
21 this.IntermediateFolder = intermediateFolder;
22 this.OutputPath = outputPath;
23 - this.BundleTuple = bundleTuple;
23 + this.BundleSymbol = bundleSymbol;
24 this.UXContainer = uxContainer;
25 this.Containers = containers;
26 }
@@ -35,11 +35,11 @@ namespace WixToolset.Core.Burn.Bundles
35
36 private string OutputPath { get; }
37
38 - private WixBundleTuple BundleTuple { get; }
38 + private WixBundleSymbol BundleSymbol { get; }
39
40 - private WixBundleContainerTuple UXContainer { get; }
40 + private WixBundleContainerSymbol UXContainer { get; }
41
42 - private IEnumerable<WixBundleContainerTuple> Containers { get; }
42 + private IEnumerable<WixBundleContainerSymbol> Containers { get; }
43
44 public void Execute()
45 {
@@ -47,7 +47,7 @@ namespace WixToolset.Core.Burn.Bundles
47
48 // Copy the burn.exe to a writable location then mark it to be moved to its final build location.
49
50 - var stubPlatform = this.BundleTuple.Platform.ToString();
50 + var stubPlatform = this.BundleSymbol.Platform.ToString();
51 var stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe");
52
53 var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename);
@@ -59,19 +59,19 @@ namespace WixToolset.Core.Burn.Bundles
59 this.Messaging.Write(ErrorMessages.InsecureBundleFilename(bundleFilename));
60 }
61
62 - this.Transfer = this.BackendHelper.CreateFileTransfer(bundleTempPath, this.OutputPath, true, this.BundleTuple.SourceLineNumbers);
62 + this.Transfer = this.BackendHelper.CreateFileTransfer(bundleTempPath, this.OutputPath, true, this.BundleSymbol.SourceLineNumbers);
63
64 File.Copy(stubFile, bundleTempPath, true);
65 File.SetAttributes(bundleTempPath, FileAttributes.Normal);
66
67 - this.UpdateBurnResources(bundleTempPath, this.OutputPath, this.BundleTuple);
67 + this.UpdateBurnResources(bundleTempPath, this.OutputPath, this.BundleSymbol);
68
69 // Update the .wixburn section to point to at the UX and attached container(s) then attach the containers
70 // if they should be attached.
71 using (var writer = BurnWriter.Open(this.Messaging, bundleTempPath))
72 {
73 var burnStubFile = new FileInfo(bundleTempPath);
74 - writer.InitializeBundleSectionData(burnStubFile.Length, this.BundleTuple.BundleId);
74 + writer.InitializeBundleSectionData(burnStubFile.Length, this.BundleSymbol.BundleId);
75
76 // Always attach the UX container first
77 writer.AppendContainer(this.UXContainer.WorkingPath, BurnWriter.Container.UX);
@@ -91,7 +91,7 @@ namespace WixToolset.Core.Burn.Bundles
91 }
92 }
93
94 - private void UpdateBurnResources(string bundleTempPath, string outputPath, WixBundleTuple bundleInfo)
94 + private void UpdateBurnResources(string bundleTempPath, string outputPath, WixBundleSymbol bundleInfo)
95 {
96 var resources = new Dtf.Resources.ResourceCollection();
97 var version = new Dtf.Resources.VersionResource("#1", 1033);
src/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs
+10 -10
@@ -9,14 +9,14 @@ namespace WixToolset.Core.Burn.Bundles
9 using System.Xml;
10 using WixToolset.Data;
11 using WixToolset.Data.Burn;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13
14 internal class CreateBundleExtensionManifestCommand
15 {
16 - public CreateBundleExtensionManifestCommand(IntermediateSection section, WixBundleTuple bundleTuple, int lastUXPayloadIndex, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper)
16 + public CreateBundleExtensionManifestCommand(IntermediateSection section, WixBundleSymbol bundleSymbol, int lastUXPayloadIndex, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper)
17 {
18 this.Section = section;
19 - this.BundleTuple = bundleTuple;
19 + this.BundleSymbol = bundleSymbol;
20 this.LastUXPayloadIndex = lastUXPayloadIndex;
21 this.IntermediateFolder = intermediateFolder;
22 this.InternalBurnBackendHelper = internalBurnBackendHelper;
@@ -24,7 +24,7 @@ namespace WixToolset.Core.Burn.Bundles
24
25 private IntermediateSection Section { get; }
26
27 - private WixBundleTuple BundleTuple { get; }
27 + private WixBundleSymbol BundleSymbol { get; }
28
29 private IInternalBurnBackendHelper InternalBurnBackendHelper { get; }
30
@@ -32,7 +32,7 @@ namespace WixToolset.Core.Burn.Bundles
32
33 private string IntermediateFolder { get; }
34
35 - public WixBundlePayloadTuple BundleExtensionManifestPayloadRow { get; private set; }
35 + public WixBundlePayloadSymbol BundleExtensionManifestPayloadRow { get; private set; }
36
37 public string OutputPath { get; private set; }
38
@@ -64,11 +64,11 @@ namespace WixToolset.Core.Burn.Bundles
64 return path;
65 }
66
67 - private WixBundlePayloadTuple CreateBundleExtensionManifestPayloadRow(string bextManifestPath)
67 + private WixBundlePayloadSymbol CreateBundleExtensionManifestPayloadRow(string bextManifestPath)
68 {
69 var generatedId = Common.GenerateIdentifier("ux", BurnCommon.BundleExtensionDataFileName);
70
71 - var tuple = this.Section.AddTuple(new WixBundlePayloadTuple(this.BundleTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
71 + var symbol = this.Section.AddSymbol(new WixBundlePayloadSymbol(this.BundleSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
72 {
73 Name = BurnCommon.BundleExtensionDataFileName,
74 SourceFile = new IntermediateFieldPathValue { Path = bextManifestPath },
@@ -81,11 +81,11 @@ namespace WixToolset.Core.Burn.Bundles
81
82 var fileInfo = new FileInfo(bextManifestPath);
83
84 - tuple.FileSize = (int)fileInfo.Length;
84 + symbol.FileSize = (int)fileInfo.Length;
85
86 - tuple.Hash = BundleHashAlgorithm.Hash(fileInfo);
86 + symbol.Hash = BundleHashAlgorithm.Hash(fileInfo);
87
88 - return tuple;
88 + return symbol;
89 }
90 }
91 }
src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
+85 -85
@@ -12,20 +12,20 @@ namespace WixToolset.Core.Burn.Bundles
12 using System.Xml;
13 using WixToolset.Data;
14 using WixToolset.Data.Burn;
15 - using WixToolset.Data.Tuples;
15 + using WixToolset.Data.Symbols;
16 using WixToolset.Extensibility;
17 using WixToolset.Extensibility.Services;
18
19 internal class CreateBurnManifestCommand
20 {
21 - public CreateBurnManifestCommand(IMessaging messaging, IEnumerable<IBurnBackendExtension> backendExtensions, string executableName, IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<WixBundleContainerTuple> containers, WixChainTuple chainTuple, IEnumerable<PackageFacade> orderedPackages, IEnumerable<WixBundleRollbackBoundaryTuple> boundaries, IEnumerable<WixBundlePayloadTuple> uxPayloads, Dictionary<string, WixBundlePayloadTuple> allPayloadsById, IEnumerable<ISearchFacade> orderedSearches, IEnumerable<WixBundleCatalogTuple> catalogs, string intermediateFolder)
21 + public CreateBurnManifestCommand(IMessaging messaging, IEnumerable<IBurnBackendExtension> backendExtensions, string executableName, IntermediateSection section, WixBundleSymbol bundleSymbol, IEnumerable<WixBundleContainerSymbol> containers, WixChainSymbol chainSymbol, IEnumerable<PackageFacade> orderedPackages, IEnumerable<WixBundleRollbackBoundarySymbol> boundaries, IEnumerable<WixBundlePayloadSymbol> uxPayloads, Dictionary<string, WixBundlePayloadSymbol> allPayloadsById, IEnumerable<ISearchFacade> orderedSearches, IEnumerable<WixBundleCatalogSymbol> catalogs, string intermediateFolder)
22 {
23 this.Messaging = messaging;
24 this.BackendExtensions = backendExtensions;
25 this.ExecutableName = executableName;
26 this.Section = section;
27 - this.BundleTuple = bundleTuple;
28 - this.Chain = chainTuple;
27 + this.BundleSymbol = bundleSymbol;
28 + this.Chain = chainSymbol;
29 this.Containers = containers;
30 this.OrderedPackages = orderedPackages;
31 this.RollbackBoundaries = boundaries;
@@ -46,23 +46,23 @@ namespace WixToolset.Core.Burn.Bundles
46
47 private IntermediateSection Section { get; }
48
49 - private WixBundleTuple BundleTuple { get; }
49 + private WixBundleSymbol BundleSymbol { get; }
50
51 - private WixChainTuple Chain { get; }
51 + private WixChainSymbol Chain { get; }
52
53 - private IEnumerable<WixBundleRollbackBoundaryTuple> RollbackBoundaries { get; }
53 + private IEnumerable<WixBundleRollbackBoundarySymbol> RollbackBoundaries { get; }
54
55 private IEnumerable<PackageFacade> OrderedPackages { get; }
56
57 private IEnumerable<ISearchFacade> OrderedSearches { get; }
58
59 - private Dictionary<string, WixBundlePayloadTuple> Payloads { get; }
59 + private Dictionary<string, WixBundlePayloadSymbol> Payloads { get; }
60
61 - private IEnumerable<WixBundleContainerTuple> Containers { get; }
61 + private IEnumerable<WixBundleContainerSymbol> Containers { get; }
62
63 - private IEnumerable<WixBundlePayloadTuple> UXContainerPayloads { get; }
63 + private IEnumerable<WixBundlePayloadSymbol> UXContainerPayloads { get; }
64
65 - private IEnumerable<WixBundleCatalogTuple> Catalogs { get; }
65 + private IEnumerable<WixBundleCatalogSymbol> Catalogs { get; }
66
67 private string IntermediateFolder { get; }
68
@@ -77,32 +77,32 @@ namespace WixToolset.Core.Burn.Bundles
77 writer.WriteStartElement("BurnManifest", BurnCommon.BurnNamespace);
78
79 // Write the condition, if there is one
80 - if (null != this.BundleTuple.Condition)
80 + if (null != this.BundleSymbol.Condition)
81 {
82 - writer.WriteElementString("Condition", this.BundleTuple.Condition);
82 + writer.WriteElementString("Condition", this.BundleSymbol.Condition);
83 }
84
85 // Write the log element if default logging wasn't disabled.
86 - if (!String.IsNullOrEmpty(this.BundleTuple.LogPrefix))
86 + if (!String.IsNullOrEmpty(this.BundleSymbol.LogPrefix))
87 {
88 writer.WriteStartElement("Log");
89 - if (!String.IsNullOrEmpty(this.BundleTuple.LogPathVariable))
89 + if (!String.IsNullOrEmpty(this.BundleSymbol.LogPathVariable))
90 {
91 - writer.WriteAttributeString("PathVariable", this.BundleTuple.LogPathVariable);
91 + writer.WriteAttributeString("PathVariable", this.BundleSymbol.LogPathVariable);
92 }
93 - writer.WriteAttributeString("Prefix", this.BundleTuple.LogPrefix);
94 - writer.WriteAttributeString("Extension", this.BundleTuple.LogExtension);
93 + writer.WriteAttributeString("Prefix", this.BundleSymbol.LogPrefix);
94 + writer.WriteAttributeString("Extension", this.BundleSymbol.LogExtension);
95 writer.WriteEndElement();
96 }
97
98
99 // Get update if specified.
100 - var updateTuple = this.Section.Tuples.OfType<WixBundleUpdateTuple>().FirstOrDefault();
100 + var updateSymbol = this.Section.Symbols.OfType<WixBundleUpdateSymbol>().FirstOrDefault();
101
102 - if (null != updateTuple)
102 + if (null != updateSymbol)
103 {
104 writer.WriteStartElement("Update");
105 - writer.WriteAttributeString("Location", updateTuple.Location);
105 + writer.WriteAttributeString("Location", updateSymbol.Location);
106 writer.WriteEndElement(); // </Update>
107 }
108
@@ -110,7 +110,7 @@ namespace WixToolset.Core.Burn.Bundles
110
111 // For the related bundles with duplicated identifiers the second instance is ignored (i.e. the Duplicates
112 // enumeration in the index row list is not used).
113 - var relatedBundles = this.Section.Tuples.OfType<WixRelatedBundleTuple>();
113 + var relatedBundles = this.Section.Symbols.OfType<WixRelatedBundleSymbol>();
114 var distinctRelatedBundles = new HashSet<string>();
115
116 foreach (var relatedBundle in relatedBundles)
@@ -125,7 +125,7 @@ namespace WixToolset.Core.Burn.Bundles
125 }
126
127 // Write the variables
128 - var variables = this.Section.Tuples.OfType<WixBundleVariableTuple>();
128 + var variables = this.Section.Symbols.OfType<WixBundleVariableSymbol>();
129
130 foreach (var variable in variables)
131 {
@@ -149,7 +149,7 @@ namespace WixToolset.Core.Burn.Bundles
149
150 // write the UX element
151 writer.WriteStartElement("UX");
152 - if (!String.IsNullOrEmpty(this.BundleTuple.SplashScreenSourceFile))
152 + if (!String.IsNullOrEmpty(this.BundleSymbol.SplashScreenSourceFile))
153 {
154 writer.WriteAttributeString("SplashScreen", "yes");
155 }
@@ -214,66 +214,66 @@ namespace WixToolset.Core.Burn.Bundles
214 // Write the registration information...
215 writer.WriteStartElement("Registration");
216
217 - writer.WriteAttributeString("Id", this.BundleTuple.BundleId);
217 + writer.WriteAttributeString("Id", this.BundleSymbol.BundleId);
218 writer.WriteAttributeString("ExecutableName", this.ExecutableName);
219 - writer.WriteAttributeString("PerMachine", this.BundleTuple.PerMachine ? "yes" : "no");
220 - writer.WriteAttributeString("Tag", this.BundleTuple.Tag);
221 - writer.WriteAttributeString("Version", this.BundleTuple.Version);
222 - writer.WriteAttributeString("ProviderKey", this.BundleTuple.ProviderKey);
219 + writer.WriteAttributeString("PerMachine", this.BundleSymbol.PerMachine ? "yes" : "no");
220 + writer.WriteAttributeString("Tag", this.BundleSymbol.Tag);
221 + writer.WriteAttributeString("Version", this.BundleSymbol.Version);
222 + writer.WriteAttributeString("ProviderKey", this.BundleSymbol.ProviderKey);
223
224 writer.WriteStartElement("Arp");
225 - writer.WriteAttributeString("Register", (this.BundleTuple.DisableModify || this.BundleTuple.SingleChangeUninstallButton) && this.BundleTuple.DisableRemove ? "no" : "yes"); // do not register if disabled modify and remove.
226 - writer.WriteAttributeString("DisplayName", this.BundleTuple.Name);
227 - writer.WriteAttributeString("DisplayVersion", this.BundleTuple.Version);
225 + writer.WriteAttributeString("Register", (this.BundleSymbol.DisableModify || this.BundleSymbol.SingleChangeUninstallButton) && this.BundleSymbol.DisableRemove ? "no" : "yes"); // do not register if disabled modify and remove.
226 + writer.WriteAttributeString("DisplayName", this.BundleSymbol.Name);
227 + writer.WriteAttributeString("DisplayVersion", this.BundleSymbol.Version);
228
229 - if (!String.IsNullOrEmpty(this.BundleTuple.Manufacturer))
229 + if (!String.IsNullOrEmpty(this.BundleSymbol.Manufacturer))
230 {
231 - writer.WriteAttributeString("Publisher", this.BundleTuple.Manufacturer);
231 + writer.WriteAttributeString("Publisher", this.BundleSymbol.Manufacturer);
232 }
233
234 - if (!String.IsNullOrEmpty(this.BundleTuple.HelpUrl))
234 + if (!String.IsNullOrEmpty(this.BundleSymbol.HelpUrl))
235 {
236 - writer.WriteAttributeString("HelpLink", this.BundleTuple.HelpUrl);
236 + writer.WriteAttributeString("HelpLink", this.BundleSymbol.HelpUrl);
237 }
238
239 - if (!String.IsNullOrEmpty(this.BundleTuple.HelpTelephone))
239 + if (!String.IsNullOrEmpty(this.BundleSymbol.HelpTelephone))
240 {
241 - writer.WriteAttributeString("HelpTelephone", this.BundleTuple.HelpTelephone);
241 + writer.WriteAttributeString("HelpTelephone", this.BundleSymbol.HelpTelephone);
242 }
243
244 - if (!String.IsNullOrEmpty(this.BundleTuple.AboutUrl))
244 + if (!String.IsNullOrEmpty(this.BundleSymbol.AboutUrl))
245 {
246 - writer.WriteAttributeString("AboutUrl", this.BundleTuple.AboutUrl);
246 + writer.WriteAttributeString("AboutUrl", this.BundleSymbol.AboutUrl);
247 }
248
249 - if (!String.IsNullOrEmpty(this.BundleTuple.UpdateUrl))
249 + if (!String.IsNullOrEmpty(this.BundleSymbol.UpdateUrl))
250 {
251 - writer.WriteAttributeString("UpdateUrl", this.BundleTuple.UpdateUrl);
251 + writer.WriteAttributeString("UpdateUrl", this.BundleSymbol.UpdateUrl);
252 }
253
254 - if (!String.IsNullOrEmpty(this.BundleTuple.ParentName))
254 + if (!String.IsNullOrEmpty(this.BundleSymbol.ParentName))
255 {
256 - writer.WriteAttributeString("ParentDisplayName", this.BundleTuple.ParentName);
256 + writer.WriteAttributeString("ParentDisplayName", this.BundleSymbol.ParentName);
257 }
258
259 - if (this.BundleTuple.DisableModify)
259 + if (this.BundleSymbol.DisableModify)
260 {
261 writer.WriteAttributeString("DisableModify", "yes");
262 }
263
264 - if (this.BundleTuple.DisableRemove)
264 + if (this.BundleSymbol.DisableRemove)
265 {
266 writer.WriteAttributeString("DisableRemove", "yes");
267 }
268
269 - if (this.BundleTuple.SingleChangeUninstallButton)
269 + if (this.BundleSymbol.SingleChangeUninstallButton)
270 {
271 writer.WriteAttributeString("DisableModify", "button");
272 }
273 writer.WriteEndElement(); // </Arp>
274
275 // Get update registration if specified.
276 - var updateRegistrationInfo = this.Section.Tuples.OfType<WixUpdateRegistrationTuple>().FirstOrDefault();
276 + var updateRegistrationInfo = this.Section.Symbols.OfType<WixUpdateRegistrationSymbol>().FirstOrDefault();
277
278 if (null != updateRegistrationInfo)
279 {
@@ -327,28 +327,28 @@ namespace WixToolset.Core.Burn.Bundles
327 }
328
329 // Index a few tables by package.
330 - var targetCodesByPatch = this.Section.Tuples.OfType<WixBundlePatchTargetCodeTuple>().ToLookup(r => r.PackageRef);
331 - var msiFeaturesByPackage = this.Section.Tuples.OfType<WixBundleMsiFeatureTuple>().ToLookup(r => r.PackageRef);
332 - var msiPropertiesByPackage = this.Section.Tuples.OfType<WixBundleMsiPropertyTuple>().ToLookup(r => r.PackageRef);
330 + var targetCodesByPatch = this.Section.Symbols.OfType<WixBundlePatchTargetCodeSymbol>().ToLookup(r => r.PackageRef);
331 + var msiFeaturesByPackage = this.Section.Symbols.OfType<WixBundleMsiFeatureSymbol>().ToLookup(r => r.PackageRef);
332 + var msiPropertiesByPackage = this.Section.Symbols.OfType<WixBundleMsiPropertySymbol>().ToLookup(r => r.PackageRef);
333 var payloadsByPackage = this.Payloads.Values.ToLookup(p => p.PackageRef);
334 - var relatedPackagesByPackage = this.Section.Tuples.OfType<WixBundleRelatedPackageTuple>().ToLookup(r => r.PackageRef);
335 - var slipstreamMspsByPackage = this.Section.Tuples.OfType<WixBundleSlipstreamMspTuple>().ToLookup(r => r.MspPackageRef);
336 - var exitCodesByPackage = this.Section.Tuples.OfType<WixBundlePackageExitCodeTuple>().ToLookup(r => r.ChainPackageId);
337 - var commandLinesByPackage = this.Section.Tuples.OfType<WixBundlePackageCommandLineTuple>().ToLookup(r => r.WixBundlePackageRef);
334 + var relatedPackagesByPackage = this.Section.Symbols.OfType<WixBundleRelatedPackageSymbol>().ToLookup(r => r.PackageRef);
335 + var slipstreamMspsByPackage = this.Section.Symbols.OfType<WixBundleSlipstreamMspSymbol>().ToLookup(r => r.MspPackageRef);
336 + var exitCodesByPackage = this.Section.Symbols.OfType<WixBundlePackageExitCodeSymbol>().ToLookup(r => r.ChainPackageId);
337 + var commandLinesByPackage = this.Section.Symbols.OfType<WixBundlePackageCommandLineSymbol>().ToLookup(r => r.WixBundlePackageRef);
338
339 - var dependenciesByPackage = this.Section.Tuples.OfType<ProvidesDependencyTuple>().ToLookup(p => p.PackageRef);
339 + var dependenciesByPackage = this.Section.Symbols.OfType<ProvidesDependencySymbol>().ToLookup(p => p.PackageRef);
340
341
342 // Build up the list of target codes from all the MSPs in the chain.
343 - var targetCodes = new List<WixBundlePatchTargetCodeTuple>();
343 + var targetCodes = new List<WixBundlePatchTargetCodeSymbol>();
344
345 foreach (var package in this.OrderedPackages)
346 {
347 - writer.WriteStartElement(String.Format(CultureInfo.InvariantCulture, "{0}Package", package.PackageTuple.Type));
347 + writer.WriteStartElement(String.Format(CultureInfo.InvariantCulture, "{0}Package", package.PackageSymbol.Type));
348
349 writer.WriteAttributeString("Id", package.PackageId);
350
351 - switch (package.PackageTuple.Cache)
351 + switch (package.PackageSymbol.Cache)
352 {
353 case YesNoAlwaysType.No:
354 writer.WriteAttributeString("Cache", "no");
@@ -361,39 +361,39 @@ namespace WixToolset.Core.Burn.Bundles
361 break;
362 }
363
364 - writer.WriteAttributeString("CacheId", package.PackageTuple.CacheId);
365 - writer.WriteAttributeString("InstallSize", Convert.ToString(package.PackageTuple.InstallSize));
366 - writer.WriteAttributeString("Size", Convert.ToString(package.PackageTuple.Size));
367 - writer.WriteAttributeString("PerMachine", YesNoDefaultType.Yes == package.PackageTuple.PerMachine ? "yes" : "no");
368 - writer.WriteAttributeString("Permanent", package.PackageTuple.Permanent ? "yes" : "no");
369 - writer.WriteAttributeString("Vital", package.PackageTuple.Vital == false ? "no" : "yes");
364 + writer.WriteAttributeString("CacheId", package.PackageSymbol.CacheId);
365 + writer.WriteAttributeString("InstallSize", Convert.ToString(package.PackageSymbol.InstallSize));
366 + writer.WriteAttributeString("Size", Convert.ToString(package.PackageSymbol.Size));
367 + writer.WriteAttributeString("PerMachine", YesNoDefaultType.Yes == package.PackageSymbol.PerMachine ? "yes" : "no");
368 + writer.WriteAttributeString("Permanent", package.PackageSymbol.Permanent ? "yes" : "no");
369 + writer.WriteAttributeString("Vital", package.PackageSymbol.Vital == false ? "no" : "yes");
370
371 - if (null != package.PackageTuple.RollbackBoundaryRef)
371 + if (null != package.PackageSymbol.RollbackBoundaryRef)
372 {
373 - writer.WriteAttributeString("RollbackBoundaryForward", package.PackageTuple.RollbackBoundaryRef);
373 + writer.WriteAttributeString("RollbackBoundaryForward", package.PackageSymbol.RollbackBoundaryRef);
374 }
375
376 - if (!String.IsNullOrEmpty(package.PackageTuple.RollbackBoundaryBackwardRef))
376 + if (!String.IsNullOrEmpty(package.PackageSymbol.RollbackBoundaryBackwardRef))
377 {
378 - writer.WriteAttributeString("RollbackBoundaryBackward", package.PackageTuple.RollbackBoundaryBackwardRef);
378 + writer.WriteAttributeString("RollbackBoundaryBackward", package.PackageSymbol.RollbackBoundaryBackwardRef);
379 }
380
381 - if (!String.IsNullOrEmpty(package.PackageTuple.LogPathVariable))
381 + if (!String.IsNullOrEmpty(package.PackageSymbol.LogPathVariable))
382 {
383 - writer.WriteAttributeString("LogPathVariable", package.PackageTuple.LogPathVariable);
383 + writer.WriteAttributeString("LogPathVariable", package.PackageSymbol.LogPathVariable);
384 }
385
386 - if (!String.IsNullOrEmpty(package.PackageTuple.RollbackLogPathVariable))
386 + if (!String.IsNullOrEmpty(package.PackageSymbol.RollbackLogPathVariable))
387 {
388 - writer.WriteAttributeString("RollbackLogPathVariable", package.PackageTuple.RollbackLogPathVariable);
388 + writer.WriteAttributeString("RollbackLogPathVariable", package.PackageSymbol.RollbackLogPathVariable);
389 }
390
391 - if (!String.IsNullOrEmpty(package.PackageTuple.InstallCondition))
391 + if (!String.IsNullOrEmpty(package.PackageSymbol.InstallCondition))
392 {
393 - writer.WriteAttributeString("InstallCondition", package.PackageTuple.InstallCondition);
393 + writer.WriteAttributeString("InstallCondition", package.PackageSymbol.InstallCondition);
394 }
395
396 - if (package.SpecificPackageTuple is WixBundleExePackageTuple exePackage) // EXE
396 + if (package.SpecificPackageSymbol is WixBundleExePackageSymbol exePackage) // EXE
397 {
398 writer.WriteAttributeString("DetectCondition", exePackage.DetectCondition);
399 writer.WriteAttributeString("InstallArguments", exePackage.InstallCommand);
@@ -405,7 +405,7 @@ namespace WixToolset.Core.Burn.Bundles
405 writer.WriteAttributeString("Protocol", exePackage.ExeProtocol);
406 }
407 }
408 - else if (package.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage) // MSI
408 + else if (package.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage) // MSI
409 {
410 writer.WriteAttributeString("ProductCode", msiPackage.ProductCode);
411 writer.WriteAttributeString("Language", msiPackage.ProductLanguage.ToString(CultureInfo.InvariantCulture));
@@ -415,7 +415,7 @@ namespace WixToolset.Core.Burn.Bundles
415 writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode);
416 }
417 }
418 - else if (package.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage) // MSP
418 + else if (package.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage) // MSP
419 {
420 writer.WriteAttributeString("PatchCode", mspPackage.PatchCode);
421 writer.WriteAttributeString("PatchXml", mspPackage.PatchXml);
@@ -436,7 +436,7 @@ namespace WixToolset.Core.Burn.Bundles
436 }
437 }
438 }
439 - else if (package.SpecificPackageTuple is WixBundleMsuPackageTuple msuPackage) // MSU
439 + else if (package.SpecificPackageSymbol is WixBundleMsuPackageSymbol msuPackage) // MSU
440 {
441 writer.WriteAttributeString("DetectCondition", msuPackage.DetectCondition);
442 writer.WriteAttributeString("KB", msuPackage.MsuKB);
@@ -567,14 +567,14 @@ namespace WixToolset.Core.Burn.Bundles
567
568 // Write any contained Payloads with the PackagePayload being first
569 writer.WriteStartElement("PayloadRef");
570 - writer.WriteAttributeString("Id", package.PackageTuple.PayloadRef);
570 + writer.WriteAttributeString("Id", package.PackageSymbol.PayloadRef);
571 writer.WriteEndElement();
572
573 var packagePayloads = payloadsByPackage[package.PackageId];
574
575 foreach (var payload in packagePayloads)
576 {
577 - if (payload.Id.Id != package.PackageTuple.PayloadRef)
577 + if (payload.Id.Id != package.PackageSymbol.PayloadRef)
578 {
579 writer.WriteStartElement("PayloadRef");
580 writer.WriteAttributeString("Id", payload.Id.Id);
@@ -598,7 +598,7 @@ namespace WixToolset.Core.Burn.Bundles
598 }
599
600 // Write the ApprovedExeForElevation elements.
601 - var approvedExesForElevation = this.Section.Tuples.OfType<WixApprovedExeForElevationTuple>();
601 + var approvedExesForElevation = this.Section.Symbols.OfType<WixApprovedExeForElevationSymbol>();
602
603 foreach (var approvedExeForElevation in approvedExesForElevation)
604 {
@@ -620,7 +620,7 @@ namespace WixToolset.Core.Burn.Bundles
620 }
621
622 // Write the BundleExtension elements.
623 - var bundleExtensions = this.Section.Tuples.OfType<WixBundleExtensionTuple>();
623 + var bundleExtensions = this.Section.Symbols.OfType<WixBundleExtensionSymbol>();
624
625 foreach (var bundleExtension in bundleExtensions)
626 {
@@ -635,7 +635,7 @@ namespace WixToolset.Core.Burn.Bundles
635 }
636 }
637
638 - private void WriteBurnManifestContainerAttributes(XmlTextWriter writer, string executableName, WixBundleContainerTuple container)
638 + private void WriteBurnManifestContainerAttributes(XmlTextWriter writer, string executableName, WixBundleContainerSymbol container)
639 {
640 writer.WriteAttributeString("Id", container.Id.Id);
641 writer.WriteAttributeString("FileSize", container.Size.Value.ToString(CultureInfo.InvariantCulture));
@@ -669,7 +669,7 @@ namespace WixToolset.Core.Burn.Bundles
669 }
670 }
671
672 - private void WriteBurnManifestPayloadAttributes(XmlTextWriter writer, WixBundlePayloadTuple payload, bool embeddedOnly, Dictionary<string, WixBundlePayloadTuple> allPayloads)
672 + private void WriteBurnManifestPayloadAttributes(XmlTextWriter writer, WixBundlePayloadSymbol payload, bool embeddedOnly, Dictionary<string, WixBundlePayloadSymbol> allPayloads)
673 {
674 Debug.Assert(!embeddedOnly || PackagingType.Embedded == payload.Packaging);
675
src/WixToolset.Core.Burn/Bundles/CreateContainerCommand.cs
+4 -4
@@ -8,21 +8,21 @@ namespace WixToolset.Core.Burn.Bundles
8 using System.Linq;
9 using WixToolset.Core.Native;
10 using WixToolset.Data;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12
13 /// <summary>
14 /// Creates cabinet files.
15 /// </summary>
16 internal class CreateContainerCommand
17 {
18 - public CreateContainerCommand(IEnumerable<WixBundlePayloadTuple> payloads, string outputPath, CompressionLevel? compressionLevel)
18 + public CreateContainerCommand(IEnumerable<WixBundlePayloadSymbol> payloads, string outputPath, CompressionLevel? compressionLevel)
19 {
20 this.Payloads = payloads;
21 this.OutputPath = outputPath;
22 this.CompressionLevel = compressionLevel;
23 }
24
25 - public CreateContainerCommand(string manifestPath, IEnumerable<WixBundlePayloadTuple> payloads, string outputPath, CompressionLevel? compressionLevel)
25 + public CreateContainerCommand(string manifestPath, IEnumerable<WixBundlePayloadSymbol> payloads, string outputPath, CompressionLevel? compressionLevel)
26 {
27 this.ManifestFile = manifestPath;
28 this.Payloads = payloads;
@@ -36,7 +36,7 @@ namespace WixToolset.Core.Burn.Bundles
36
37 private string OutputPath { get; }
38
39 - private IEnumerable<WixBundlePayloadTuple> Payloads { get; }
39 + private IEnumerable<WixBundlePayloadSymbol> Payloads { get; }
40
41 public string Hash { get; private set; }
42
src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs
+19 -19
@@ -8,18 +8,18 @@ namespace WixToolset.Core.Burn.Bundles
8 using System.Linq;
9 using WixToolset.Data;
10 using WixToolset.Data.Burn;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12 using WixToolset.Extensibility.Data;
13 using WixToolset.Extensibility.Services;
14
15 internal class CreateNonUXContainers
16 {
17 - public CreateNonUXContainers(IBackendHelper backendHelper, IntermediateSection section, WixBootstrapperApplicationTuple bootstrapperApplicationTuple, Dictionary<string, WixBundlePayloadTuple> payloadTuples, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel)
17 + public CreateNonUXContainers(IBackendHelper backendHelper, IntermediateSection section, WixBootstrapperApplicationSymbol bootstrapperApplicationSymbol, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel)
18 {
19 this.BackendHelper = backendHelper;
20 this.Section = section;
21 - this.BootstrapperApplicationTuple = bootstrapperApplicationTuple;
22 - this.PayloadTuples = payloadTuples;
21 + this.BootstrapperApplicationSymbol = bootstrapperApplicationSymbol;
22 + this.PayloadSymbols = payloadSymbols;
23 this.IntermediateFolder = intermediateFolder;
24 this.LayoutFolder = layoutFolder;
25 this.DefaultCompressionLevel = defaultCompressionLevel;
@@ -29,19 +29,19 @@ namespace WixToolset.Core.Burn.Bundles
29
30 public IEnumerable<ITrackedFile> TrackedFiles { get; private set; }
31
32 - public WixBundleContainerTuple UXContainer { get; set; }
32 + public WixBundleContainerSymbol UXContainer { get; set; }
33
34 - public IEnumerable<WixBundlePayloadTuple> UXContainerPayloads { get; private set; }
34 + public IEnumerable<WixBundlePayloadSymbol> UXContainerPayloads { get; private set; }
35
36 - public IEnumerable<WixBundleContainerTuple> Containers { get; private set; }
36 + public IEnumerable<WixBundleContainerSymbol> Containers { get; private set; }
37
38 private IBackendHelper BackendHelper { get; }
39
40 private IntermediateSection Section { get; }
41
42 - private WixBootstrapperApplicationTuple BootstrapperApplicationTuple { get; }
42 + private WixBootstrapperApplicationSymbol BootstrapperApplicationSymbol { get; }
43
44 - private Dictionary<string, WixBundlePayloadTuple> PayloadTuples { get; }
44 + private Dictionary<string, WixBundlePayloadSymbol> PayloadSymbols { get; }
45
46 private string IntermediateFolder { get; }
47
@@ -53,15 +53,15 @@ namespace WixToolset.Core.Burn.Bundles
53 {
54 var fileTransfers = new List<IFileTransfer>();
55 var trackedFiles = new List<ITrackedFile>();
56 - var uxPayloadTuples = new List<WixBundlePayloadTuple>();
56 + var uxPayloadSymbols = new List<WixBundlePayloadSymbol>();
57
58 var attachedContainerIndex = 1; // count starts at one because UX container is "0".
59
60 - var containerTuples = this.Section.Tuples.OfType<WixBundleContainerTuple>().ToList();
60 + var containerSymbols = this.Section.Symbols.OfType<WixBundleContainerSymbol>().ToList();
61
62 - var payloadsByContainer = this.PayloadTuples.Values.ToLookup(p => p.ContainerRef);
62 + var payloadsByContainer = this.PayloadSymbols.Values.ToLookup(p => p.ContainerRef);
63
64 - foreach (var container in containerTuples)
64 + foreach (var container in containerSymbols)
65 {
66 var containerId = container.Id.Id;
67
@@ -83,17 +83,17 @@ namespace WixToolset.Core.Burn.Bundles
83
84 // Gather the list of UX payloads but ensure the BootstrapperApplication Payload is the first
85 // in the list since that is the Payload that Burn attempts to load.
86 - var baPayloadId = this.BootstrapperApplicationTuple.Id.Id;
86 + var baPayloadId = this.BootstrapperApplicationSymbol.Id.Id;
87
88 foreach (var uxPayload in containerPayloads)
89 {
90 if (uxPayload.Id.Id == baPayloadId)
91 {
92 - uxPayloadTuples.Insert(0, uxPayload);
92 + uxPayloadSymbols.Insert(0, uxPayload);
93 }
94 else
95 {
96 - uxPayloadTuples.Add(uxPayload);
96 + uxPayloadSymbols.Add(uxPayload);
97 }
98 }
99 }
@@ -120,13 +120,13 @@ namespace WixToolset.Core.Burn.Bundles
120 }
121 }
122
123 - this.Containers = containerTuples;
124 - this.UXContainerPayloads = uxPayloadTuples;
123 + this.Containers = containerSymbols;
124 + this.UXContainerPayloads = uxPayloadSymbols;
125 this.FileTransfers = fileTransfers;
126 this.TrackedFiles = trackedFiles;
127 }
128
129 - private void CreateContainer(WixBundleContainerTuple container, IEnumerable<WixBundlePayloadTuple> containerPayloads)
129 + private void CreateContainer(WixBundleContainerSymbol container, IEnumerable<WixBundlePayloadSymbol> containerPayloads)
130 {
131 var command = new CreateContainerCommand(containerPayloads, container.WorkingPath, this.DefaultCompressionLevel);
132 command.Execute();
src/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs
+9 -9
@@ -5,17 +5,17 @@ namespace WixToolset.Core.Burn.Bundles
5 using System.Collections.Generic;
6 using System.Linq;
7 using WixToolset.Data;
8 - using WixToolset.Data.Tuples;
8 + using WixToolset.Data.Symbols;
9
10 internal class GetPackageFacadesCommand
11 {
12 - public GetPackageFacadesCommand(IEnumerable<WixBundlePackageTuple> chainPackageTuples, IntermediateSection section)
12 + public GetPackageFacadesCommand(IEnumerable<WixBundlePackageSymbol> chainPackageSymbols, IntermediateSection section)
13 {
14 - this.ChainPackageTuples = chainPackageTuples;
14 + this.ChainPackageSymbols = chainPackageSymbols;
15 this.Section = section;
16 }
17
18 - private IEnumerable<WixBundlePackageTuple> ChainPackageTuples { get; }
18 + private IEnumerable<WixBundlePackageSymbol> ChainPackageSymbols { get; }
19
20 private IntermediateSection Section { get; }
21
@@ -23,14 +23,14 @@ namespace WixToolset.Core.Burn.Bundles
23
24 public void Execute()
25 {
26 - var exePackages = this.Section.Tuples.OfType<WixBundleExePackageTuple>().ToDictionary(t => t.Id.Id);
27 - var msiPackages = this.Section.Tuples.OfType<WixBundleMsiPackageTuple>().ToDictionary(t => t.Id.Id);
28 - var mspPackages = this.Section.Tuples.OfType<WixBundleMspPackageTuple>().ToDictionary(t => t.Id.Id);
29 - var msuPackages = this.Section.Tuples.OfType<WixBundleMsuPackageTuple>().ToDictionary(t => t.Id.Id);
26 + var exePackages = this.Section.Symbols.OfType<WixBundleExePackageSymbol>().ToDictionary(t => t.Id.Id);
27 + var msiPackages = this.Section.Symbols.OfType<WixBundleMsiPackageSymbol>().ToDictionary(t => t.Id.Id);
28 + var mspPackages = this.Section.Symbols.OfType<WixBundleMspPackageSymbol>().ToDictionary(t => t.Id.Id);
29 + var msuPackages = this.Section.Symbols.OfType<WixBundleMsuPackageSymbol>().ToDictionary(t => t.Id.Id);
30
31 var facades = new Dictionary<string, PackageFacade>();
32
33 - foreach (var package in this.ChainPackageTuples)
33 + foreach (var package in this.ChainPackageSymbols)
34 {
35 var id = package.Id.Id;
36 switch (package.Type)
src/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
+23 -23
@@ -5,35 +5,35 @@ namespace WixToolset.Core.Burn.Bundles
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8 - using WixToolset.Data.Tuples;
8 + using WixToolset.Data.Symbols;
9 using WixToolset.Extensibility.Services;
10
11 internal class OrderPackagesAndRollbackBoundariesCommand
12 {
13 - public OrderPackagesAndRollbackBoundariesCommand(IMessaging messaging, IEnumerable<WixGroupTuple> groupTuples, Dictionary<string, WixBundleRollbackBoundaryTuple> boundaryTuples, IDictionary<string, PackageFacade> packageFacades)
13 + public OrderPackagesAndRollbackBoundariesCommand(IMessaging messaging, IEnumerable<WixGroupSymbol> groupSymbols, Dictionary<string, WixBundleRollbackBoundarySymbol> boundarySymbols, IDictionary<string, PackageFacade> packageFacades)
14 {
15 this.Messaging = messaging;
16 - this.GroupTuples = groupTuples;
17 - this.Boundaries = boundaryTuples;
16 + this.GroupSymbols = groupSymbols;
17 + this.Boundaries = boundarySymbols;
18 this.PackageFacades = packageFacades;
19 }
20
21 private IMessaging Messaging { get; }
22
23 - public IEnumerable<WixGroupTuple> GroupTuples { get; }
23 + public IEnumerable<WixGroupSymbol> GroupSymbols { get; }
24
25 - public Dictionary<string, WixBundleRollbackBoundaryTuple> Boundaries { get; }
25 + public Dictionary<string, WixBundleRollbackBoundarySymbol> Boundaries { get; }
26
27 public IDictionary<string, PackageFacade> PackageFacades { get; }
28
29 public IEnumerable<PackageFacade> OrderedPackageFacades { get; private set; }
30
31 - public IEnumerable<WixBundleRollbackBoundaryTuple> UsedRollbackBoundaries { get; private set; }
31 + public IEnumerable<WixBundleRollbackBoundarySymbol> UsedRollbackBoundaries { get; private set; }
32
33 public void Execute()
34 {
35 var orderedFacades = new List<PackageFacade>();
36 - var usedBoundaries = new List<WixBundleRollbackBoundaryTuple>();
36 + var usedBoundaries = new List<WixBundleRollbackBoundarySymbol>();
37
38 // Process the chain of packages to add them in the correct order
39 // and assign the forward rollback boundaries as appropriate. Remember
@@ -44,41 +44,41 @@ namespace WixToolset.Core.Burn.Bundles
44 // We handle uninstall (aka: backwards) rollback boundaries after
45 // we get these install/repair (aka: forward) rollback boundaries
46 // defined.
47 - WixBundleRollbackBoundaryTuple previousRollbackBoundary = null;
48 - WixBundleRollbackBoundaryTuple lastRollbackBoundary = null;
47 + WixBundleRollbackBoundarySymbol previousRollbackBoundary = null;
48 + WixBundleRollbackBoundarySymbol lastRollbackBoundary = null;
49 var boundaryHadX86Package = false;
50
51 - foreach (var groupTuple in this.GroupTuples)
51 + foreach (var groupSymbol in this.GroupSymbols)
52 {
53 - if (ComplexReferenceChildType.Package == groupTuple.ChildType && ComplexReferenceParentType.PackageGroup == groupTuple.ParentType && "WixChain" == groupTuple.ParentId)
53 + if (ComplexReferenceChildType.Package == groupSymbol.ChildType && ComplexReferenceParentType.PackageGroup == groupSymbol.ParentType && "WixChain" == groupSymbol.ParentId)
54 {
55 - if (this.PackageFacades.TryGetValue(groupTuple.ChildId, out var facade))
55 + if (this.PackageFacades.TryGetValue(groupSymbol.ChildId, out var facade))
56 {
57 if (null != previousRollbackBoundary)
58 {
59 usedBoundaries.Add(previousRollbackBoundary);
60 - facade.PackageTuple.RollbackBoundaryRef = previousRollbackBoundary.Id.Id;
60 + facade.PackageSymbol.RollbackBoundaryRef = previousRollbackBoundary.Id.Id;
61 previousRollbackBoundary = null;
62
63 - boundaryHadX86Package = facade.PackageTuple.Win64;
63 + boundaryHadX86Package = facade.PackageSymbol.Win64;
64 }
65
66 // Error if MSI transaction has x86 package preceding x64 packages
67 if ((lastRollbackBoundary != null)
68 && lastRollbackBoundary.Transaction == true
69 - && boundaryHadX86Package
70 - && facade.PackageTuple.Win64)
69 + && boundaryHadX86Package
70 + && facade.PackageSymbol.Win64)
71 {
72 this.Messaging.Write(ErrorMessages.MsiTransactionX86BeforeX64(lastRollbackBoundary.SourceLineNumbers));
73 }
74 - boundaryHadX86Package |= facade.PackageTuple.Win64;
74 + boundaryHadX86Package |= facade.PackageSymbol.Win64;
75
76 orderedFacades.Add(facade);
77 }
78 else // must be a rollback boundary.
79 {
80 // Discard the next rollback boundary if we have a previously defined boundary.
81 - var nextRollbackBoundary = this.Boundaries[groupTuple.ChildId];
81 + var nextRollbackBoundary = this.Boundaries[groupSymbol.ChildId];
82 if (null != previousRollbackBoundary)
83 {
84 this.Messaging.Write(WarningMessages.DiscardedRollbackBoundary(nextRollbackBoundary.SourceLineNumbers, nextRollbackBoundary.Id.Id));
@@ -131,14 +131,14 @@ namespace WixToolset.Core.Burn.Bundles
131
132 foreach (PackageFacade package in orderedFacades)
133 {
134 - if (null != package.PackageTuple.RollbackBoundaryRef)
134 + if (null != package.PackageSymbol.RollbackBoundaryRef)
135 {
136 if (null != previousFacade)
137 {
138 - previousFacade.PackageTuple.RollbackBoundaryBackwardRef = previousRollbackBoundaryId;
138 + previousFacade.PackageSymbol.RollbackBoundaryBackwardRef = previousRollbackBoundaryId;
139 }
140
141 - previousRollbackBoundaryId = package.PackageTuple.RollbackBoundaryRef;
141 + previousRollbackBoundaryId = package.PackageSymbol.RollbackBoundaryRef;
142 }
143
144 previousFacade = package;
@@ -146,7 +146,7 @@ namespace WixToolset.Core.Burn.Bundles
146
147 if (!String.IsNullOrEmpty(previousRollbackBoundaryId) && null != previousFacade)
148 {
149 - previousFacade.PackageTuple.RollbackBoundaryBackwardRef = previousRollbackBoundaryId;
149 + previousFacade.PackageSymbol.RollbackBoundaryBackwardRef = previousRollbackBoundaryId;
150 }
151
152 this.OrderedPackageFacades = orderedFacades;
src/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs
+34 -34
@@ -8,7 +8,7 @@ namespace WixToolset.Core.Burn.Bundles
8 using System.Linq;
9 using WixToolset.Data;
10 using WixToolset.Data.Burn;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12 using WixToolset.Extensibility.Services;
13
14 internal class OrderSearchesCommand
@@ -23,32 +23,32 @@ namespace WixToolset.Core.Burn.Bundles
23
24 private IntermediateSection Section { get; }
25
26 - public IDictionary<string, IList<IntermediateTuple>> ExtensionSearchTuplesByExtensionId { get; private set; }
26 + public IDictionary<string, IList<IntermediateSymbol>> ExtensionSearchSymbolsByExtensionId { get; private set; }
27
28 public IList<ISearchFacade> OrderedSearchFacades { get; private set; }
29
30 public void Execute()
31 {
32 - this.ExtensionSearchTuplesByExtensionId = new Dictionary<string, IList<IntermediateTuple>>();
32 + this.ExtensionSearchSymbolsByExtensionId = new Dictionary<string, IList<IntermediateSymbol>>();
33 this.OrderedSearchFacades = new List<ISearchFacade>();
34
35 - var searchRelationTuples = this.Section.Tuples.OfType<WixSearchRelationTuple>().ToList();
36 - var searchTuples = this.Section.Tuples.OfType<WixSearchTuple>().ToList();
37 - if (searchTuples.Count == 0)
35 + var searchRelationSymbols = this.Section.Symbols.OfType<WixSearchRelationSymbol>().ToList();
36 + var searchSymbols = this.Section.Symbols.OfType<WixSearchSymbol>().ToList();
37 + if (searchSymbols.Count == 0)
38 {
39 // nothing to do!
40 return;
41 }
42
43 - var tupleDictionary = searchTuples.ToDictionary(t => t.Id.Id);
43 + var symbolDictionary = searchSymbols.ToDictionary(t => t.Id.Id);
44
45 var constraints = new Constraints();
46 - if (searchRelationTuples.Count > 0)
46 + if (searchRelationSymbols.Count > 0)
47 {
48 // add relational info to our data...
49 - foreach (var searchRelationTuple in searchRelationTuples)
49 + foreach (var searchRelationSymbol in searchRelationSymbols)
50 {
51 - constraints.AddConstraint(searchRelationTuple.Id.Id, searchRelationTuple.ParentSearchRef);
51 + constraints.AddConstraint(searchRelationSymbol.Id.Id, searchRelationSymbol.ParentSearchRef);
52 }
53 }
54
@@ -67,10 +67,10 @@ namespace WixToolset.Core.Burn.Bundles
67 // lexicographically at each step to ensure a deterministic ordering
68 // based on 'after' dependencies and ID.
69 var sorter = new TopologicalSort();
70 - var sortedIds = sorter.Sort(tupleDictionary.Keys, constraints);
70 + var sortedIds = sorter.Sort(symbolDictionary.Keys, constraints);
71
72 // Now, create the search facades with the searches in order...
73 - this.OrderSearches(sortedIds, tupleDictionary);
73 + this.OrderSearches(sortedIds, symbolDictionary);
74 }
75
76 /// <summary>
@@ -313,49 +313,49 @@ namespace WixToolset.Core.Burn.Bundles
313 }
314 }
315
316 - private void OrderSearches(List<string> sortedIds, Dictionary<string, WixSearchTuple> searchTupleDictionary)
316 + private void OrderSearches(List<string> sortedIds, Dictionary<string, WixSearchSymbol> searchSymbolDictionary)
317 {
318 // TODO: Although the WixSearch tables are defined in the Util extension,
319 // the Bundle Binder has to know all about them. We hope to revisit all
320 // of this in the 4.0 timeframe.
321 - var legacySearchesById = this.Section.Tuples
322 - .Where(t => t.Definition.Type == TupleDefinitionType.WixComponentSearch ||
323 - t.Definition.Type == TupleDefinitionType.WixFileSearch ||
324 - t.Definition.Type == TupleDefinitionType.WixProductSearch ||
325 - t.Definition.Type == TupleDefinitionType.WixRegistrySearch)
321 + var legacySearchesById = this.Section.Symbols
322 + .Where(t => t.Definition.Type == SymbolDefinitionType.WixComponentSearch ||
323 + t.Definition.Type == SymbolDefinitionType.WixFileSearch ||
324 + t.Definition.Type == SymbolDefinitionType.WixProductSearch ||
325 + t.Definition.Type == SymbolDefinitionType.WixRegistrySearch)
326 .ToDictionary(t => t.Id.Id);
327 - var setVariablesById = this.Section.Tuples
328 - .OfType<WixSetVariableTuple>()
327 + var setVariablesById = this.Section.Symbols
328 + .OfType<WixSetVariableSymbol>()
329 .ToDictionary(t => t.Id.Id);
330 - var extensionSearchesById = this.Section.Tuples
331 - .Where(t => t.Definition.HasTag(BurnConstants.BundleExtensionSearchTupleDefinitionTag))
330 + var extensionSearchesById = this.Section.Symbols
331 + .Where(t => t.Definition.HasTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag))
332 .ToDictionary(t => t.Id.Id);
333
334 foreach (var searchId in sortedIds)
335 {
336 - var searchTuple = searchTupleDictionary[searchId];
337 - if (legacySearchesById.TryGetValue(searchId, out var specificSearchTuple))
336 + var searchSymbol = searchSymbolDictionary[searchId];
337 + if (legacySearchesById.TryGetValue(searchId, out var specificSearchSymbol))
338 {
339 - this.OrderedSearchFacades.Add(new LegacySearchFacade(searchTuple, specificSearchTuple));
339 + this.OrderedSearchFacades.Add(new LegacySearchFacade(searchSymbol, specificSearchSymbol));
340 }
341 - else if (setVariablesById.TryGetValue(searchId, out var setVariableTuple))
341 + else if (setVariablesById.TryGetValue(searchId, out var setVariableSymbol))
342 {
343 - this.OrderedSearchFacades.Add(new SetVariableSearchFacade(searchTuple, setVariableTuple));
343 + this.OrderedSearchFacades.Add(new SetVariableSearchFacade(searchSymbol, setVariableSymbol));
344 }
345 - else if (extensionSearchesById.TryGetValue(searchId, out var extensionSearchTuple))
345 + else if (extensionSearchesById.TryGetValue(searchId, out var extensionSearchSymbol))
346 {
347 - this.OrderedSearchFacades.Add(new ExtensionSearchFacade(searchTuple));
347 + this.OrderedSearchFacades.Add(new ExtensionSearchFacade(searchSymbol));
348
349 - if (!this.ExtensionSearchTuplesByExtensionId.TryGetValue(searchTuple.BundleExtensionRef, out var extensionSearchTuples))
349 + if (!this.ExtensionSearchSymbolsByExtensionId.TryGetValue(searchSymbol.BundleExtensionRef, out var extensionSearchSymbols))
350 {
351 - extensionSearchTuples = new List<IntermediateTuple>();
352 - this.ExtensionSearchTuplesByExtensionId[searchTuple.BundleExtensionRef] = extensionSearchTuples;
351 + extensionSearchSymbols = new List<IntermediateSymbol>();
352 + this.ExtensionSearchSymbolsByExtensionId[searchSymbol.BundleExtensionRef] = extensionSearchSymbols;
353 }
354 - extensionSearchTuples.Add(extensionSearchTuple);
354 + extensionSearchSymbols.Add(extensionSearchSymbol);
355 }
356 else
357 {
358 - this.Messaging.Write(ErrorMessages.MissingBundleSearch(searchTuple.SourceLineNumbers, searchId));
358 + this.Messaging.Write(ErrorMessages.MissingBundleSearch(searchSymbol.SourceLineNumbers, searchId));
359 }
360 }
361 }
src/WixToolset.Core.Burn/Bundles/PackageFacade.cs
+8 -8
@@ -4,22 +4,22 @@ namespace WixToolset.Core.Burn.Bundles
4 {
5 using System.Diagnostics;
6 using WixToolset.Data;
7 - using WixToolset.Data.Tuples;
7 + using WixToolset.Data.Symbols;
8
9 internal class PackageFacade
10 {
11 - public PackageFacade(WixBundlePackageTuple packageTuple, IntermediateTuple specificPackageTuple)
11 + public PackageFacade(WixBundlePackageSymbol packageSymbol, IntermediateSymbol specificPackageSymbol)
12 {
13 - Debug.Assert(packageTuple.Id.Id == specificPackageTuple.Id.Id);
13 + Debug.Assert(packageSymbol.Id.Id == specificPackageSymbol.Id.Id);
14
15 - this.PackageTuple = packageTuple;
16 - this.SpecificPackageTuple = specificPackageTuple;
15 + this.PackageSymbol = packageSymbol;
16 + this.SpecificPackageSymbol = specificPackageSymbol;
17 }
18
19 - public string PackageId => this.PackageTuple.Id.Id;
19 + public string PackageId => this.PackageSymbol.Id.Id;
20
21 - public WixBundlePackageTuple PackageTuple { get; }
21 + public WixBundlePackageSymbol PackageSymbol { get; }
22
23 - public IntermediateTuple SpecificPackageTuple { get; }
23 + public IntermediateSymbol SpecificPackageSymbol { get; }
24 }
25 }
src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs
+8 -8
@@ -4,20 +4,20 @@ namespace WixToolset.Core.Burn.Bundles
4 {
5 using System;
6 using System.Collections.Generic;
7 - using WixToolset.Data.Tuples;
7 + using WixToolset.Data.Symbols;
8
9 /// <summary>
10 /// Initializes package state from the Exe contents.
11 /// </summary>
12 internal class ProcessExePackageCommand
13 {
14 - public ProcessExePackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples)
14 + public ProcessExePackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols)
15 {
16 - this.AuthoredPayloads = payloadTuples;
16 + this.AuthoredPayloads = payloadSymbols;
17 this.Facade = facade;
18 }
19
20 - public Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { get; }
20 + public Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { get; }
21
22 public PackageFacade Facade { get; }
23
@@ -26,14 +26,14 @@ namespace WixToolset.Core.Burn.Bundles
26 /// </summary>
27 public void Execute()
28 {
29 - var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef];
29 + var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef];
30
31 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId))
31 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId))
32 {
33 - this.Facade.PackageTuple.CacheId = packagePayload.Hash;
33 + this.Facade.PackageSymbol.CacheId = packagePayload.Hash;
34 }
35
36 - this.Facade.PackageTuple.Version = packagePayload.Version;
36 + this.Facade.PackageSymbol.Version = packagePayload.Version;
37 }
38 }
39 }
src/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
+48 -48
@@ -12,7 +12,7 @@ namespace WixToolset.Core.Burn.Bundles
12 using WixToolset.Extensibility;
13 using Dtf = WixToolset.Dtf.WindowsInstaller;
14 using WixToolset.Extensibility.Services;
15 - using WixToolset.Data.Tuples;
15 + using WixToolset.Data.Symbols;
16 using WixToolset.Data.WindowsInstaller;
17 using WixToolset.Extensibility.Data;
18
@@ -23,7 +23,7 @@ namespace WixToolset.Core.Burn.Bundles
23 {
24 private const string PropertySqlFormat = "SELECT `Value` FROM `Property` WHERE `Property` = '{0}'";
25
26 - public ProcessMsiPackageCommand(IWixToolsetServiceProvider serviceProvider, IEnumerable<IBurnBackendExtension> backendExtensions, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples)
26 + public ProcessMsiPackageCommand(IWixToolsetServiceProvider serviceProvider, IEnumerable<IBurnBackendExtension> backendExtensions, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols)
27 {
28 this.Messaging = serviceProvider.GetService<IMessaging>();
29 this.BackendHelper = serviceProvider.GetService<IBackendHelper>();
@@ -31,7 +31,7 @@ namespace WixToolset.Core.Burn.Bundles
31
32 this.BackendExtensions = backendExtensions;
33
34 - this.AuthoredPayloads = payloadTuples;
34 + this.AuthoredPayloads = payloadSymbols;
35 this.Section = section;
36 this.Facade = facade;
37 }
@@ -44,7 +44,7 @@ namespace WixToolset.Core.Burn.Bundles
44
45 private IEnumerable<IBurnBackendExtension> BackendExtensions { get; }
46
47 - private Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { get; }
47 + private Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { get; }
48
49 private PackageFacade Facade { get; }
50
@@ -55,9 +55,9 @@ namespace WixToolset.Core.Burn.Bundles
55 /// </summary>
56 public void Execute()
57 {
58 - var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef];
58 + var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef];
59
60 - var msiPackage = (WixBundleMsiPackageTuple)this.Facade.SpecificPackageTuple;
60 + var msiPackage = (WixBundleMsiPackageSymbol)this.Facade.SpecificPackageSymbol;
61
62 var sourcePath = packagePayload.SourceFile.Path;
63 var longNamesInImage = false;
@@ -82,8 +82,8 @@ namespace WixToolset.Core.Burn.Bundles
82 var perMachine = (0 == (sumInfo.WordCount & 8));
83 var x64 = (sumInfo.Template.Contains("x64") || sumInfo.Template.Contains("Intel64"));
84
85 - this.Facade.PackageTuple.PerMachine = perMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No;
86 - this.Facade.PackageTuple.Win64 = x64;
85 + this.Facade.PackageSymbol.PerMachine = perMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No;
86 + this.Facade.PackageSymbol.Win64 = x64;
87 }
88
89 using (var db = new Dtf.Database(sourcePath))
@@ -111,33 +111,33 @@ namespace WixToolset.Core.Burn.Bundles
111
112 if (!String.IsNullOrEmpty(version) && Common.IsValidModuleOrBundleVersion(version))
113 {
114 - this.Messaging.Write(WarningMessages.VersionTruncated(this.Facade.PackageTuple.SourceLineNumbers, msiPackage.ProductVersion, sourcePath, version));
114 + this.Messaging.Write(WarningMessages.VersionTruncated(this.Facade.PackageSymbol.SourceLineNumbers, msiPackage.ProductVersion, sourcePath, version));
115 msiPackage.ProductVersion = version;
116 }
117 else
118 {
119 - this.Messaging.Write(ErrorMessages.InvalidProductVersion(this.Facade.PackageTuple.SourceLineNumbers, msiPackage.ProductVersion, sourcePath));
119 + this.Messaging.Write(ErrorMessages.InvalidProductVersion(this.Facade.PackageSymbol.SourceLineNumbers, msiPackage.ProductVersion, sourcePath));
120 }
121 }
122
123 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId))
123 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId))
124 {
125 - this.Facade.PackageTuple.CacheId = String.Format("{0}v{1}", msiPackage.ProductCode, msiPackage.ProductVersion);
125 + this.Facade.PackageSymbol.CacheId = String.Format("{0}v{1}", msiPackage.ProductCode, msiPackage.ProductVersion);
126 }
127
128 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.DisplayName))
128 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.DisplayName))
129 {
130 - this.Facade.PackageTuple.DisplayName = ProcessMsiPackageCommand.GetProperty(db, "ProductName");
130 + this.Facade.PackageSymbol.DisplayName = ProcessMsiPackageCommand.GetProperty(db, "ProductName");
131 }
132
133 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.Description))
133 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.Description))
134 {
135 - this.Facade.PackageTuple.Description = ProcessMsiPackageCommand.GetProperty(db, "ARPCOMMENTS");
135 + this.Facade.PackageSymbol.Description = ProcessMsiPackageCommand.GetProperty(db, "ARPCOMMENTS");
136 }
137
138 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.Version))
138 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.Version))
139 {
140 - this.Facade.PackageTuple.Version = msiPackage.ProductVersion;
140 + this.Facade.PackageSymbol.Version = msiPackage.ProductVersion;
141 }
142
143 var payloadNames = this.GetPayloadTargetNames(packagePayload.Id.Id);
@@ -168,7 +168,7 @@ namespace WixToolset.Core.Burn.Bundles
168
169 // Add all external files as package payloads and calculate the total install size as the rollup of
170 // File table's sizes.
171 - this.Facade.PackageTuple.InstallSize = this.ImportExternalFileAsPayloadsAndReturnInstallSize(db, packagePayload, longNamesInImage, compressed, payloadNames);
171 + this.Facade.PackageSymbol.InstallSize = this.ImportExternalFileAsPayloadsAndReturnInstallSize(db, packagePayload, longNamesInImage, compressed, payloadNames);
172
173 // Add all dependency providers from the MSI.
174 this.ImportDependencyProviders(msiPackage, db);
@@ -176,13 +176,13 @@ namespace WixToolset.Core.Burn.Bundles
176 }
177 catch (Dtf.InstallerException e)
178 {
179 - this.Messaging.Write(ErrorMessages.UnableToReadPackageInformation(this.Facade.PackageTuple.SourceLineNumbers, sourcePath, e.Message));
179 + this.Messaging.Write(ErrorMessages.UnableToReadPackageInformation(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath, e.Message));
180 }
181 }
182
183 private ISet<string> GetPayloadTargetNames(string packageId)
184 {
185 - var payloadNames = this.Section.Tuples.OfType<WixBundlePayloadTuple>()
185 + var payloadNames = this.Section.Symbols.OfType<WixBundlePayloadSymbol>()
186 .Where(p => p.PackageRef == packageId)
187 .Select(p => p.Name);
188
@@ -191,21 +191,21 @@ namespace WixToolset.Core.Burn.Bundles
191
192 private ISet<string> GetMsiPropertyNames(string packageId)
193 {
194 - var properties = this.Section.Tuples.OfType<WixBundleMsiPropertyTuple>()
194 + var properties = this.Section.Symbols.OfType<WixBundleMsiPropertySymbol>()
195 .Where(p => p.Id.Id == packageId)
196 .Select(p => p.Name);
197
198 return new HashSet<string>(properties, StringComparer.Ordinal);
199 }
200
201 - private void SetPerMachineAppropriately(Dtf.Database db, WixBundleMsiPackageTuple msiPackage, string sourcePath)
201 + private void SetPerMachineAppropriately(Dtf.Database db, WixBundleMsiPackageSymbol msiPackage, string sourcePath)
202 {
203 if (msiPackage.ForcePerMachine)
204 {
205 - if (YesNoDefaultType.No == this.Facade.PackageTuple.PerMachine)
205 + if (YesNoDefaultType.No == this.Facade.PackageSymbol.PerMachine)
206 {
207 - this.Messaging.Write(WarningMessages.PerUserButForcingPerMachine(this.Facade.PackageTuple.SourceLineNumbers, sourcePath));
208 - this.Facade.PackageTuple.PerMachine = YesNoDefaultType.Yes; // ensure that we think the package is per-machine.
207 + this.Messaging.Write(WarningMessages.PerUserButForcingPerMachine(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath));
208 + this.Facade.PackageSymbol.PerMachine = YesNoDefaultType.Yes; // ensure that we think the package is per-machine.
209 }
210
211 // Force ALLUSERS=1 via the MSI command-line.
@@ -218,34 +218,34 @@ namespace WixToolset.Core.Burn.Bundles
218 if (String.IsNullOrEmpty(allusers))
219 {
220 // Not forced per-machine and no ALLUSERS property, flip back to per-user.
221 - if (YesNoDefaultType.Yes == this.Facade.PackageTuple.PerMachine)
221 + if (YesNoDefaultType.Yes == this.Facade.PackageSymbol.PerMachine)
222 {
223 - this.Messaging.Write(WarningMessages.ImplicitlyPerUser(this.Facade.PackageTuple.SourceLineNumbers, sourcePath));
224 - this.Facade.PackageTuple.PerMachine = YesNoDefaultType.No;
223 + this.Messaging.Write(WarningMessages.ImplicitlyPerUser(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath));
224 + this.Facade.PackageSymbol.PerMachine = YesNoDefaultType.No;
225 }
226 }
227 else if (allusers.Equals("1", StringComparison.Ordinal))
228 {
229 - if (YesNoDefaultType.No == this.Facade.PackageTuple.PerMachine)
229 + if (YesNoDefaultType.No == this.Facade.PackageSymbol.PerMachine)
230 {
231 - this.Messaging.Write(ErrorMessages.PerUserButAllUsersEquals1(this.Facade.PackageTuple.SourceLineNumbers, sourcePath));
231 + this.Messaging.Write(ErrorMessages.PerUserButAllUsersEquals1(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath));
232 }
233 }
234 else if (allusers.Equals("2", StringComparison.Ordinal))
235 {
236 - this.Messaging.Write(WarningMessages.DiscouragedAllUsersValue(this.Facade.PackageTuple.SourceLineNumbers, sourcePath, (YesNoDefaultType.Yes == this.Facade.PackageTuple.PerMachine) ? "machine" : "user"));
236 + this.Messaging.Write(WarningMessages.DiscouragedAllUsersValue(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath, (YesNoDefaultType.Yes == this.Facade.PackageSymbol.PerMachine) ? "machine" : "user"));
237 }
238 else
239 {
240 - this.Messaging.Write(ErrorMessages.UnsupportedAllUsersValue(this.Facade.PackageTuple.SourceLineNumbers, sourcePath, allusers));
240 + this.Messaging.Write(ErrorMessages.UnsupportedAllUsersValue(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath, allusers));
241 }
242 }
243 }
244
245 - private void SetPackageVisibility(Dtf.Database db, WixBundleMsiPackageTuple msiPackage, ISet<string> msiPropertyNames)
245 + private void SetPackageVisibility(Dtf.Database db, WixBundleMsiPackageSymbol msiPackage, ISet<string> msiPropertyNames)
246 {
247 var alreadyVisible = !ProcessMsiPackageCommand.HasProperty(db, "ARPSYSTEMCOMPONENT");
248 - var visible = (this.Facade.PackageTuple.Attributes & WixBundlePackageAttributes.Visible) == WixBundlePackageAttributes.Visible;
248 + var visible = (this.Facade.PackageSymbol.Attributes & WixBundlePackageAttributes.Visible) == WixBundlePackageAttributes.Visible;
249
250 // If not already set to the correct visibility.
251 if (alreadyVisible != visible)
@@ -283,7 +283,7 @@ namespace WixToolset.Core.Burn.Bundles
283 attributes |= (recordAttributes & WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive) == WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive ? WixBundleRelatedPackageAttributes.MaxInclusive : 0;
284 attributes |= (recordAttributes & WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive) == WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive ? WixBundleRelatedPackageAttributes.LangInclusive : 0;
285
286 - this.Section.AddTuple(new WixBundleRelatedPackageTuple(this.Facade.PackageTuple.SourceLineNumbers)
286 + this.Section.AddSymbol(new WixBundleRelatedPackageSymbol(this.Facade.PackageSymbol.SourceLineNumbers)
287 {
288 PackageRef = this.Facade.PackageId,
289 RelatedId = record.GetString(1),
@@ -358,7 +358,7 @@ namespace WixToolset.Core.Burn.Bundles
358 }
359 }
360
361 - this.Section.AddTuple(new WixBundleMsiFeatureTuple(this.Facade.PackageTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, this.Facade.PackageId, featureName))
361 + this.Section.AddSymbol(new WixBundleMsiFeatureSymbol(this.Facade.PackageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, this.Facade.PackageId, featureName))
362 {
363 PackageRef = this.Facade.PackageId,
364 Name = featureName,
@@ -379,7 +379,7 @@ namespace WixToolset.Core.Burn.Bundles
379 }
380 }
381
382 - private void ImportExternalCabinetAsPayloads(Dtf.Database db, WixBundlePayloadTuple packagePayload, ISet<string> payloadNames)
382 + private void ImportExternalCabinetAsPayloads(Dtf.Database db, WixBundlePayloadSymbol packagePayload, ISet<string> payloadNames)
383 {
384 if (db.Tables.Contains("Media"))
385 {
@@ -395,9 +395,9 @@ namespace WixToolset.Core.Burn.Bundles
395 if (!payloadNames.Contains(cabinetName))
396 {
397 var generatedId = Common.GenerateIdentifier("cab", packagePayload.Id.Id, cabinet);
398 - var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, cabinet, "Cabinet", this.Facade.PackageTuple.SourceLineNumbers, BindStage.Normal);
398 + var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, cabinet, "Cabinet", this.Facade.PackageSymbol.SourceLineNumbers, BindStage.Normal);
399
400 - this.Section.AddTuple(new WixBundlePayloadTuple(this.Facade.PackageTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
400 + this.Section.AddSymbol(new WixBundlePayloadSymbol(this.Facade.PackageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
401 {
402 Name = cabinetName,
403 SourceFile = new IntermediateFieldPathValue { Path = payloadSourceFile },
@@ -416,7 +416,7 @@ namespace WixToolset.Core.Burn.Bundles
416 }
417 }
418
419 - private long ImportExternalFileAsPayloadsAndReturnInstallSize(Dtf.Database db, WixBundlePayloadTuple packagePayload, bool longNamesInImage, bool compressed, ISet<string> payloadNames)
419 + private long ImportExternalFileAsPayloadsAndReturnInstallSize(Dtf.Database db, WixBundlePayloadSymbol packagePayload, bool longNamesInImage, bool compressed, ISet<string> payloadNames)
420 {
421 long size = 0;
422
@@ -473,9 +473,9 @@ namespace WixToolset.Core.Burn.Bundles
473 if (!payloadNames.Contains(name))
474 {
475 var generatedId = Common.GenerateIdentifier("f", packagePayload.Id.Id, record.GetString(2));
476 - var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, fileSourcePath, "File", this.Facade.PackageTuple.SourceLineNumbers, BindStage.Normal);
476 + var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, fileSourcePath, "File", this.Facade.PackageSymbol.SourceLineNumbers, BindStage.Normal);
477
478 - this.Section.AddTuple(new WixBundlePayloadTuple(this.Facade.PackageTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
478 + this.Section.AddSymbol(new WixBundlePayloadSymbol(this.Facade.PackageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId))
479 {
480 Name = name,
481 SourceFile = new IntermediateFieldPathValue { Path = payloadSourceFile },
@@ -500,9 +500,9 @@ namespace WixToolset.Core.Burn.Bundles
500 return size;
501 }
502
503 - private void AddMsiProperty(WixBundleMsiPackageTuple msiPackage, string name, string value)
503 + private void AddMsiProperty(WixBundleMsiPackageSymbol msiPackage, string name, string value)
504 {
505 - this.Section.AddTuple(new WixBundleMsiPropertyTuple(msiPackage.SourceLineNumbers, new Identifier(AccessModifier.Private, msiPackage.Id.Id, name))
505 + this.Section.AddSymbol(new WixBundleMsiPropertySymbol(msiPackage.SourceLineNumbers, new Identifier(AccessModifier.Private, msiPackage.Id.Id, name))
506 {
507 PackageRef = msiPackage.Id.Id,
508 Name = name,
@@ -510,7 +510,7 @@ namespace WixToolset.Core.Burn.Bundles
510 });
511 }
512
513 - private void ImportDependencyProviders(WixBundleMsiPackageTuple msiPackage, Dtf.Database db)
513 + private void ImportDependencyProviders(WixBundleMsiPackageSymbol msiPackage, Dtf.Database db)
514 {
515 if (db.Tables.Contains("WixDependencyProvider"))
516 {
@@ -529,12 +529,12 @@ namespace WixToolset.Core.Burn.Bundles
529 }
530
531 // Import the provider key and attributes.
532 - this.Section.AddTuple(new ProvidesDependencyTuple(msiPackage.SourceLineNumbers)
532 + this.Section.AddSymbol(new ProvidesDependencySymbol(msiPackage.SourceLineNumbers)
533 {
534 PackageRef = msiPackage.Id.Id,
535 Key = record.GetString(1),
536 Version = record.GetString(2) ?? msiPackage.ProductVersion,
537 - DisplayName = record.GetString(3) ?? this.Facade.PackageTuple.DisplayName,
537 + DisplayName = record.GetString(3) ?? this.Facade.PackageSymbol.DisplayName,
538 Attributes = record.GetInteger(4),
539 Imported = true
540 });
src/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs
+14 -14
@@ -10,7 +10,7 @@ namespace WixToolset.Core.Burn.Bundles
10 using System.Text;
11 using System.Xml;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Extensibility.Services;
15 using Dtf = WixToolset.Dtf.WindowsInstaller;
16
@@ -22,18 +22,18 @@ namespace WixToolset.Core.Burn.Bundles
22 private const string PatchMetadataFormat = "SELECT `Value` FROM `MsiPatchMetadata` WHERE `Property` = '{0}'";
23 private static readonly Encoding XmlOutputEncoding = new UTF8Encoding(false);
24
25 - public ProcessMspPackageCommand(IMessaging messaging, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples)
25 + public ProcessMspPackageCommand(IMessaging messaging, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols)
26 {
27 this.Messaging = messaging;
28
29 - this.AuthoredPayloads = payloadTuples;
29 + this.AuthoredPayloads = payloadSymbols;
30 this.Section = section;
31 this.Facade = facade;
32 }
33
34 public IMessaging Messaging { get; }
35
36 - public Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { private get; set; }
36 + public Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { private get; set; }
37
38 public PackageFacade Facade { private get; set; }
39
@@ -44,9 +44,9 @@ namespace WixToolset.Core.Burn.Bundles
44 /// </summary>
45 public void Execute()
46 {
47 - var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef];
47 + var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef];
48
49 - var mspPackage = (WixBundleMspPackageTuple)this.Facade.SpecificPackageTuple;
49 + var mspPackage = (WixBundleMspPackageSymbol)this.Facade.SpecificPackageSymbol;
50
51 var sourcePath = packagePayload.SourceFile.Path;
52
@@ -60,14 +60,14 @@ namespace WixToolset.Core.Burn.Bundles
60
61 using (var db = new Dtf.Database(sourcePath))
62 {
63 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.DisplayName))
63 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.DisplayName))
64 {
65 - this.Facade.PackageTuple.DisplayName = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "DisplayName");
65 + this.Facade.PackageSymbol.DisplayName = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "DisplayName");
66 }
67
68 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.Description))
68 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.Description))
69 {
70 - this.Facade.PackageTuple.Description = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "Description");
70 + this.Facade.PackageSymbol.Description = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "Description");
71 }
72
73 mspPackage.Manufacturer = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "ManufacturerName");
@@ -81,13 +81,13 @@ namespace WixToolset.Core.Burn.Bundles
81 return;
82 }
83
84 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId))
84 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId))
85 {
86 - this.Facade.PackageTuple.CacheId = mspPackage.PatchCode;
86 + this.Facade.PackageSymbol.CacheId = mspPackage.PatchCode;
87 }
88 }
89
90 - private void ProcessPatchXml(WixBundlePayloadTuple packagePayload, WixBundleMspPackageTuple mspPackage, string sourcePath)
90 + private void ProcessPatchXml(WixBundlePayloadSymbol packagePayload, WixBundleMspPackageSymbol mspPackage, string sourcePath)
91 {
92 var uniqueTargetCodes = new HashSet<string>();
93
@@ -127,7 +127,7 @@ namespace WixToolset.Core.Burn.Bundles
127
128 if (uniqueTargetCodes.Add(targetCode))
129 {
130 - this.Section.AddTuple(new WixBundlePatchTargetCodeTuple(packagePayload.SourceLineNumbers)
130 + this.Section.AddSymbol(new WixBundlePatchTargetCodeSymbol(packagePayload.SourceLineNumbers)
131 {
132 PackageRef = packagePayload.Id.Id,
133 TargetCode = targetCode,
src/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs
+8 -8
@@ -5,33 +5,33 @@ namespace WixToolset.Core.Burn.Bundles
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8 - using WixToolset.Data.Tuples;
8 + using WixToolset.Data.Symbols;
9
10 /// <summary>
11 /// Processes the Msu packages to add properties and payloads from the Msu packages.
12 /// </summary>
13 internal class ProcessMsuPackageCommand
14 {
15 - public ProcessMsuPackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples)
15 + public ProcessMsuPackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols)
16 {
17 - this.AuthoredPayloads = payloadTuples;
17 + this.AuthoredPayloads = payloadSymbols;
18 this.Facade = facade;
19 }
20
21 - public Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { private get; set; }
21 + public Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { private get; set; }
22
23 public PackageFacade Facade { private get; set; }
24
25 public void Execute()
26 {
27 - var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef];
27 + var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef];
28
29 - if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId))
29 + if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId))
30 {
31 - this.Facade.PackageTuple.CacheId = packagePayload.Hash;
31 + this.Facade.PackageSymbol.CacheId = packagePayload.Hash;
32 }
33
34 - this.Facade.PackageTuple.PerMachine = YesNoDefaultType.Yes; // MSUs are always per-machine.
34 + this.Facade.PackageSymbol.PerMachine = YesNoDefaultType.Yes; // MSUs are always per-machine.
35 }
36 }
37 }
src/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs
+6 -6
@@ -11,7 +11,7 @@ namespace WixToolset.Core.Burn.Bundles
11 using System.Text;
12 using WixToolset.Data;
13 using WixToolset.Data.Burn;
14 - using WixToolset.Data.Tuples;
14 + using WixToolset.Data.Symbols;
15 using WixToolset.Extensibility.Data;
16 using WixToolset.Extensibility.Services;
17
@@ -19,7 +19,7 @@ namespace WixToolset.Core.Burn.Bundles
19 {
20 private static readonly Version EmptyVersion = new Version(0, 0, 0, 0);
21
22 - public ProcessPayloadsCommand(IWixToolsetServiceProvider serviceProvider, IBackendHelper backendHelper, IEnumerable<WixBundlePayloadTuple> payloads, PackagingType defaultPackaging, string layoutDirectory)
22 + public ProcessPayloadsCommand(IWixToolsetServiceProvider serviceProvider, IBackendHelper backendHelper, IEnumerable<WixBundlePayloadSymbol> payloads, PackagingType defaultPackaging, string layoutDirectory)
23 {
24 this.Messaging = serviceProvider.GetService<IMessaging>();
25
@@ -37,7 +37,7 @@ namespace WixToolset.Core.Burn.Bundles
37
38 private IBackendHelper BackendHelper { get; }
39
40 - private IEnumerable<WixBundlePayloadTuple> Payloads { get; }
40 + private IEnumerable<WixBundlePayloadSymbol> Payloads { get; }
41
42 private PackagingType DefaultPackaging { get; }
43
@@ -92,7 +92,7 @@ namespace WixToolset.Core.Burn.Bundles
92 this.TrackedFiles = trackedFiles;
93 }
94
95 - private void UpdatePayloadPackagingType(WixBundlePayloadTuple payload)
95 + private void UpdatePayloadPackagingType(WixBundlePayloadSymbol payload)
96 {
97 if (!payload.Packaging.HasValue || PackagingType.Unknown == payload.Packaging)
98 {
@@ -118,7 +118,7 @@ namespace WixToolset.Core.Burn.Bundles
118 }
119 }
120
121 - private void UpdatePayloadFileInformation(WixBundlePayloadTuple payload, IntermediateFieldPathValue sourceFile)
121 + private void UpdatePayloadFileInformation(WixBundlePayloadSymbol payload, IntermediateFieldPathValue sourceFile)
122 {
123 var fileInfo = new FileInfo(sourceFile.Path);
124
@@ -165,7 +165,7 @@ namespace WixToolset.Core.Burn.Bundles
165 }
166 }
167
168 - private void UpdatePayloadVersionInformation(WixBundlePayloadTuple payload, IntermediateFieldPathValue sourceFile)
168 + private void UpdatePayloadVersionInformation(WixBundlePayloadSymbol payload, IntermediateFieldPathValue sourceFile)
169 {
170 var versionInfo = FileVersionInfo.GetVersionInfo(sourceFile.Path);
171
src/WixToolset.Core.Burn/Bundles/VerifyPayloadsWithCatalogCommand.cs
+4 -4
@@ -9,12 +9,12 @@ namespace WixToolset.Core.Burn.Bundles
9 using System.Runtime.InteropServices;
10 using System.Text;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using WixToolset.Extensibility.Services;
14
15 internal class VerifyPayloadsWithCatalogCommand
16 {
17 - public VerifyPayloadsWithCatalogCommand(IMessaging messaging, IEnumerable<WixBundleCatalogTuple> catalogs, IEnumerable<WixBundlePayloadTuple> payloads)
17 + public VerifyPayloadsWithCatalogCommand(IMessaging messaging, IEnumerable<WixBundleCatalogSymbol> catalogs, IEnumerable<WixBundlePayloadSymbol> payloads)
18 {
19 this.Messaging = messaging;
20 this.Catalogs = catalogs;
@@ -23,9 +23,9 @@ namespace WixToolset.Core.Burn.Bundles
23
24 private IMessaging Messaging { get; }
25
26 - private IEnumerable<WixBundleCatalogTuple> Catalogs { get; }
26 + private IEnumerable<WixBundleCatalogSymbol> Catalogs { get; }
27
28 - private IEnumerable<WixBundlePayloadTuple> Payloads { get; }
28 + private IEnumerable<WixBundlePayloadSymbol> Payloads { get; }
29
30 public void Execute()
31 {
src/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs
+9 -9
@@ -24,9 +24,9 @@ namespace WixToolset.Core.Burn.ExtensibilityServices
24 this.BootstrapperApplicationManifestData.AddXml(xml);
25 }
26
27 - public void AddBootstrapperApplicationData(IntermediateTuple tuple, bool tupleIdIsIdAttribute = false)
27 + public void AddBootstrapperApplicationData(IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false)
28 {
29 - this.BootstrapperApplicationManifestData.AddTuple(tuple, tupleIdIsIdAttribute, BurnCommon.BADataNamespace);
29 + this.BootstrapperApplicationManifestData.AddSymbol(symbol, symbolIdIsIdAttribute, BurnCommon.BADataNamespace);
30 }
31
32 public void AddBundleExtensionData(string extensionId, string xml)
@@ -35,10 +35,10 @@ namespace WixToolset.Core.Burn.ExtensibilityServices
35 manifestData.AddXml(xml);
36 }
37
38 - public void AddBundleExtensionData(string extensionId, IntermediateTuple tuple, bool tupleIdIsIdAttribute = false)
38 + public void AddBundleExtensionData(string extensionId, IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false)
39 {
40 var manifestData = this.GetBundleExtensionManifestData(extensionId);
41 - manifestData.AddTuple(tuple, tupleIdIsIdAttribute, BurnCommon.BundleExtensionDataNamespace);
41 + manifestData.AddSymbol(symbol, symbolIdIsIdAttribute, BurnCommon.BundleExtensionDataNamespace);
42 }
43
44 public void WriteBootstrapperApplicationData(XmlWriter writer)
@@ -90,21 +90,21 @@ namespace WixToolset.Core.Burn.ExtensibilityServices
90
91 private StringBuilder Builder { get; }
92
93 - public void AddTuple(IntermediateTuple tuple, bool tupleIdIsIdAttribute, string ns)
93 + public void AddSymbol(IntermediateSymbol symbol, bool symbolIdIsIdAttribute, string ns)
94 {
95 // There might be a more efficient way to do this,
96 // but this is an easy way to ensure we're creating valid XML.
97 var sb = new StringBuilder();
98 using (var writer = XmlWriter.Create(sb, WriterSettings))
99 {
100 - writer.WriteStartElement(tuple.Definition.Name, ns);
100 + writer.WriteStartElement(symbol.Definition.Name, ns);
101
102 - if (tupleIdIsIdAttribute && tuple.Id != null)
102 + if (symbolIdIsIdAttribute && symbol.Id != null)
103 {
104 - writer.WriteAttributeString("Id", tuple.Id.Id);
104 + writer.WriteAttributeString("Id", symbol.Id.Id);
105 }
106
107 - foreach (var field in tuple.Fields)
107 + foreach (var field in symbol.Fields)
108 {
109 if (!field.IsNull())
110 {
src/WixToolset.Core.WindowsInstaller/Bind/AddBackSuppressedSequenceTablesCommand.cs
+1 -1
@@ -4,7 +4,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
4 {
5 using System;
6 using System.Collections.Generic;
7 - using WixToolset.Data.Tuples;
7 + using WixToolset.Data.Symbols;
8 using WixToolset.Data.WindowsInstaller;
9
10 /// <summary>
src/WixToolset.Core.WindowsInstaller/Bind/AddCreateFoldersCommand.cs
+8 -8
@@ -5,10 +5,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
5 using System.Collections.Generic;
6 using System.Linq;
7 using WixToolset.Data;
8 - using WixToolset.Data.Tuples;
8 + using WixToolset.Data.Symbols;
9
10 /// <summary>
11 - /// Add CreateFolder tuples, if not already present, for null-keypath components.
11 + /// Add CreateFolder symbols, if not already present, for null-keypath components.
12 /// </summary>
13 internal class AddCreateFoldersCommand
14 {
@@ -21,15 +21,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
21
22 public void Execute()
23 {
24 - var createFolderTuplesByComponentRef = new HashSet<string>(this.Section.Tuples.OfType<CreateFolderTuple>().Select(t => t.ComponentRef));
25 - foreach (var componentTuple in this.Section.Tuples.OfType<ComponentTuple>().Where(t => t.KeyPathType == ComponentKeyPathType.Directory).ToList())
24 + var createFolderSymbolsByComponentRef = new HashSet<string>(this.Section.Symbols.OfType<CreateFolderSymbol>().Select(t => t.ComponentRef));
25 + foreach (var componentSymbol in this.Section.Symbols.OfType<ComponentSymbol>().Where(t => t.KeyPathType == ComponentKeyPathType.Directory).ToList())
26 {
27 - if (!createFolderTuplesByComponentRef.Contains(componentTuple.Id.Id))
27 + if (!createFolderSymbolsByComponentRef.Contains(componentSymbol.Id.Id))
28 {
29 - this.Section.AddTuple(new CreateFolderTuple(componentTuple.SourceLineNumbers)
29 + this.Section.AddSymbol(new CreateFolderSymbol(componentSymbol.SourceLineNumbers)
30 {
31 - DirectoryRef = componentTuple.DirectoryRef,
32 - ComponentRef = componentTuple.Id.Id,
31 + DirectoryRef = componentSymbol.DirectoryRef,
32 + ComponentRef = componentSymbol.Id.Id,
33 });
34 }
35 }
src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs
+50 -50
@@ -8,7 +8,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
8 using System.Linq;
9 using WixToolset.Core.Bind;
10 using WixToolset.Data;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12 using WixToolset.Extensibility.Services;
13
14 /// <summary>
@@ -40,7 +40,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
40 /// <summary>
41 /// Gets cabinets with their file rows.
42 /// </summary>
43 - public Dictionary<MediaTuple, IEnumerable<FileFacade>> FileFacadesByCabinetMedia { get; private set; }
43 + public Dictionary<MediaSymbol, IEnumerable<FileFacade>> FileFacadesByCabinetMedia { get; private set; }
44
45 /// <summary>
46 /// Get uncompressed file rows. This will contain file rows of File elements that are marked with compression=no.
@@ -50,49 +50,49 @@ namespace WixToolset.Core.WindowsInstaller.Bind
50
51 public void Execute()
52 {
53 - var mediaTuples = this.Section.Tuples.OfType<MediaTuple>().ToList();
54 - var mediaTemplateTuples = this.Section.Tuples.OfType<WixMediaTemplateTuple>().ToList();
53 + var mediaSymbols = this.Section.Symbols.OfType<MediaSymbol>().ToList();
54 + var mediaTemplateSymbols = this.Section.Symbols.OfType<WixMediaTemplateSymbol>().ToList();
55
56 - // If both tuples are authored, it is an error.
57 - if (mediaTemplateTuples.Count > 0 && mediaTuples.Count > 1)
56 + // If both symbols are authored, it is an error.
57 + if (mediaTemplateSymbols.Count > 0 && mediaSymbols.Count > 1)
58 {
59 throw new WixException(ErrorMessages.MediaTableCollision(null));
60 }
61
62 - // If neither tuple is authored, default to a media template.
63 - if (SectionType.Product == this.Section.Type && mediaTemplateTuples.Count == 0 && mediaTuples.Count == 0)
62 + // If neither symbol is authored, default to a media template.
63 + if (SectionType.Product == this.Section.Type && mediaTemplateSymbols.Count == 0 && mediaSymbols.Count == 0)
64 {
65 - var mediaTemplate = new WixMediaTemplateTuple()
65 + var mediaTemplate = new WixMediaTemplateSymbol()
66 {
67 CabinetTemplate = "cab{0}.cab",
68 };
69
70 - this.Section.AddTuple(mediaTemplate);
71 - mediaTemplateTuples.Add(mediaTemplate);
70 + this.Section.AddSymbol(mediaTemplate);
71 + mediaTemplateSymbols.Add(mediaTemplate);
72 }
73
74 // When building merge module, all the files go to "#MergeModule.CABinet".
75 if (SectionType.Module == this.Section.Type)
76 {
77 - var mergeModuleMediaTuple = this.Section.AddTuple(new MediaTuple
77 + var mergeModuleMediaSymbol = this.Section.AddSymbol(new MediaSymbol
78 {
79 Cabinet = "#MergeModule.CABinet",
80 });
81
82 - this.FileFacadesByCabinetMedia = new Dictionary<MediaTuple, IEnumerable<FileFacade>>
82 + this.FileFacadesByCabinetMedia = new Dictionary<MediaSymbol, IEnumerable<FileFacade>>
83 {
84 - { mergeModuleMediaTuple, this.FileFacades }
84 + { mergeModuleMediaSymbol, this.FileFacades }
85 };
86
87 this.UncompressedFileFacades = Array.Empty<FileFacade>();
88 }
89 - else if (mediaTemplateTuples.Count == 0)
89 + else if (mediaTemplateSymbols.Count == 0)
90 {
91 - var filesByCabinetMedia = new Dictionary<MediaTuple, List<FileFacade>>();
91 + var filesByCabinetMedia = new Dictionary<MediaSymbol, List<FileFacade>>();
92
93 var uncompressedFiles = new List<FileFacade>();
94
95 - this.ManuallyAssignFiles(mediaTuples, filesByCabinetMedia, uncompressedFiles);
95 + this.ManuallyAssignFiles(mediaSymbols, filesByCabinetMedia, uncompressedFiles);
96
97 this.FileFacadesByCabinetMedia = filesByCabinetMedia.ToDictionary(kvp => kvp.Key, kvp => (IEnumerable<FileFacade>)kvp.Value);
98
@@ -100,11 +100,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
100 }
101 else
102 {
103 - var filesByCabinetMedia = new Dictionary<MediaTuple, List<FileFacade>>();
103 + var filesByCabinetMedia = new Dictionary<MediaSymbol, List<FileFacade>>();
104
105 var uncompressedFiles = new List<FileFacade>();
106
107 - this.AutoAssignFiles(mediaTuples, filesByCabinetMedia, uncompressedFiles);
107 + this.AutoAssignFiles(mediaSymbols, filesByCabinetMedia, uncompressedFiles);
108
109 this.FileFacadesByCabinetMedia = filesByCabinetMedia.ToDictionary(kvp => kvp.Key, kvp => (IEnumerable<FileFacade>)kvp.Value);
110
@@ -116,7 +116,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
116 /// Assign files to cabinets based on MediaTemplate authoring.
117 /// </summary>
118 /// <param name="fileFacades">FileRowCollection</param>
119 - private void AutoAssignFiles(List<MediaTuple> mediaTable, Dictionary<MediaTuple, List<FileFacade>> filesByCabinetMedia, List<FileFacade> uncompressedFiles)
119 + private void AutoAssignFiles(List<MediaSymbol> mediaTable, Dictionary<MediaSymbol, List<FileFacade>> filesByCabinetMedia, List<FileFacade> uncompressedFiles)
120 {
121 const int MaxCabIndex = 999;
122
@@ -125,15 +125,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
125 var maxPreCabSizeInMB = 0;
126 var currentCabIndex = 0;
127
128 - MediaTuple currentMediaRow = null;
128 + MediaSymbol currentMediaRow = null;
129
130 - var mediaTemplateTable = this.Section.Tuples.OfType<WixMediaTemplateTuple>();
130 + var mediaTemplateTable = this.Section.Symbols.OfType<WixMediaTemplateSymbol>();
131
132 - // Remove all previous media tuples since they will be replaced with
132 + // Remove all previous media symbols since they will be replaced with
133 // media template.
134 - foreach (var mediaTuple in mediaTable)
134 + foreach (var mediaSymbol in mediaTable)
135 {
136 - this.Section.Tuples.Remove(mediaTuple);
136 + this.Section.Symbols.Remove(mediaSymbol);
137 }
138
139 // Auto assign files to cabinets based on maximum uncompressed media size
@@ -169,7 +169,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
169 throw new WixException(ErrorMessages.MaximumUncompressedMediaSizeTooLarge(null, maxPreCabSizeInMB));
170 }
171
172 - var mediaTuplesByDiskId = new Dictionary<int, MediaTuple>();
172 + var mediaSymbolsByDiskId = new Dictionary<int, MediaSymbol>();
173
174 foreach (var facade in this.FileFacades)
175 {
@@ -193,8 +193,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
193 // Overflow due to current file
194 if (currentPreCabSize > maxPreCabSizeInBytes)
195 {
196 - currentMediaRow = this.AddMediaTuple(mediaTemplateRow, ++currentCabIndex);
197 - mediaTuplesByDiskId.Add(currentMediaRow.DiskId, currentMediaRow);
196 + currentMediaRow = this.AddMediaSymbol(mediaTemplateRow, ++currentCabIndex);
197 + mediaSymbolsByDiskId.Add(currentMediaRow.DiskId, currentMediaRow);
198 filesByCabinetMedia.Add(currentMediaRow, new List<FileFacade>());
199
200 // Now files larger than MaxUncompressedMediaSize will be the only file in its cabinet so as to respect MaxUncompressedMediaSize
@@ -205,8 +205,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
205 if (currentMediaRow == null)
206 {
207 // Create new cab and MediaRow
208 - currentMediaRow = this.AddMediaTuple(mediaTemplateRow, ++currentCabIndex);
209 - mediaTuplesByDiskId.Add(currentMediaRow.DiskId, currentMediaRow);
208 + currentMediaRow = this.AddMediaSymbol(mediaTemplateRow, ++currentCabIndex);
209 + mediaSymbolsByDiskId.Add(currentMediaRow.DiskId, currentMediaRow);
210 filesByCabinetMedia.Add(currentMediaRow, new List<FileFacade>());
211 }
212 }
@@ -219,52 +219,52 @@ namespace WixToolset.Core.WindowsInstaller.Bind
219 }
220
221 // If there are uncompressed files and no MediaRow, create a default one.
222 - if (uncompressedFiles.Count > 0 && !this.Section.Tuples.OfType<MediaTuple>().Any())
222 + if (uncompressedFiles.Count > 0 && !this.Section.Symbols.OfType<MediaSymbol>().Any())
223 {
224 - var defaultMediaRow = this.Section.AddTuple(new MediaTuple(null, new Identifier(AccessModifier.Private, 1))
224 + var defaultMediaRow = this.Section.AddSymbol(new MediaSymbol(null, new Identifier(AccessModifier.Private, 1))
225 {
226 DiskId = 1,
227 });
228
229 - mediaTuplesByDiskId.Add(1, defaultMediaRow);
229 + mediaSymbolsByDiskId.Add(1, defaultMediaRow);
230 }
231 }
232
233 /// <summary>
234 /// Assign files to cabinets based on Media authoring.
235 /// </summary>
236 - private void ManuallyAssignFiles(List<MediaTuple> mediaTuples, Dictionary<MediaTuple, List<FileFacade>> filesByCabinetMedia, List<FileFacade> uncompressedFiles)
236 + private void ManuallyAssignFiles(List<MediaSymbol> mediaSymbols, Dictionary<MediaSymbol, List<FileFacade>> filesByCabinetMedia, List<FileFacade> uncompressedFiles)
237 {
238 - var mediaTuplesByDiskId = new Dictionary<int, MediaTuple>();
238 + var mediaSymbolsByDiskId = new Dictionary<int, MediaSymbol>();
239
240 - if (mediaTuples.Any())
240 + if (mediaSymbols.Any())
241 {
242 - var cabinetMediaTuples = new Dictionary<string, MediaTuple>(StringComparer.OrdinalIgnoreCase);
243 - foreach (var mediaTuple in mediaTuples)
242 + var cabinetMediaSymbols = new Dictionary<string, MediaSymbol>(StringComparer.OrdinalIgnoreCase);
243 + foreach (var mediaSymbol in mediaSymbols)
244 {
245 // If the Media row has a cabinet, make sure it is unique across all Media rows.
246 - if (!String.IsNullOrEmpty(mediaTuple.Cabinet))
246 + if (!String.IsNullOrEmpty(mediaSymbol.Cabinet))
247 {
248 - if (cabinetMediaTuples.TryGetValue(mediaTuple.Cabinet, out var existingRow))
248 + if (cabinetMediaSymbols.TryGetValue(mediaSymbol.Cabinet, out var existingRow))
249 {
250 - this.Messaging.Write(ErrorMessages.DuplicateCabinetName(mediaTuple.SourceLineNumbers, mediaTuple.Cabinet));
250 + this.Messaging.Write(ErrorMessages.DuplicateCabinetName(mediaSymbol.SourceLineNumbers, mediaSymbol.Cabinet));
251 this.Messaging.Write(ErrorMessages.DuplicateCabinetName2(existingRow.SourceLineNumbers, existingRow.Cabinet));
252 }
253 else
254 {
255 - cabinetMediaTuples.Add(mediaTuple.Cabinet, mediaTuple);
255 + cabinetMediaSymbols.Add(mediaSymbol.Cabinet, mediaSymbol);
256 }
257
258 - filesByCabinetMedia.Add(mediaTuple, new List<FileFacade>());
258 + filesByCabinetMedia.Add(mediaSymbol, new List<FileFacade>());
259 }
260
261 - mediaTuplesByDiskId.Add(mediaTuple.DiskId, mediaTuple);
261 + mediaSymbolsByDiskId.Add(mediaSymbol.DiskId, mediaSymbol);
262 }
263 }
264
265 foreach (var facade in this.FileFacades)
266 {
267 - if (!mediaTuplesByDiskId.TryGetValue(facade.DiskId, out var mediaTuple))
267 + if (!mediaSymbolsByDiskId.TryGetValue(facade.DiskId, out var mediaSymbol))
268 {
269 this.Messaging.Write(ErrorMessages.MissingMedia(facade.SourceLineNumber, facade.DiskId));
270 continue;
@@ -280,7 +280,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
280 }
281 else // file is marked compressed.
282 {
283 - if (filesByCabinetMedia.TryGetValue(mediaTuple, out var cabinetFiles))
283 + if (filesByCabinetMedia.TryGetValue(mediaSymbol, out var cabinetFiles))
284 {
285 cabinetFiles.Add(facade);
286 }
@@ -293,18 +293,18 @@ namespace WixToolset.Core.WindowsInstaller.Bind
293 }
294
295 /// <summary>
296 - /// Adds a tuple to the section with cab name template filled in.
296 + /// Adds a symbol to the section with cab name template filled in.
297 /// </summary>
298 /// <param name="mediaTable"></param>
299 /// <param name="cabIndex"></param>
300 /// <returns></returns>
301 - private MediaTuple AddMediaTuple(WixMediaTemplateTuple mediaTemplateTuple, int cabIndex)
301 + private MediaSymbol AddMediaSymbol(WixMediaTemplateSymbol mediaTemplateSymbol, int cabIndex)
302 {
303 - return this.Section.AddTuple(new MediaTuple(mediaTemplateTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, cabIndex))
303 + return this.Section.AddSymbol(new MediaSymbol(mediaTemplateSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, cabIndex))
304 {
305 DiskId = cabIndex,
306 Cabinet = String.Format(CultureInfo.InvariantCulture, this.CabinetNameTemplate, cabIndex),
307 - CompressionLevel = mediaTemplateTuple.CompressionLevel,
307 + CompressionLevel = mediaTemplateSymbol.CompressionLevel,
308 });
309 }
310 }
src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs
+85 -85
@@ -9,7 +9,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
9 using System.Text.RegularExpressions;
10 using WixToolset.Core.WindowsInstaller.Msi;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using WixToolset.Data.WindowsInstaller;
14 using WixToolset.Data.WindowsInstaller.Rows;
15 using WixToolset.Extensibility.Services;
@@ -85,25 +85,25 @@ namespace WixToolset.Core.WindowsInstaller.Bind
85
86 var section = this.Intermediate.Sections.First();
87
88 - var tuples = this.Intermediate.Sections.SelectMany(s => s.Tuples).ToList();
88 + var symbols = this.Intermediate.Sections.SelectMany(s => s.Symbols).ToList();
89
90 - // Get the patch id from the WixPatchId tuple.
91 - var patchIdTuple = tuples.OfType<WixPatchIdTuple>().FirstOrDefault();
90 + // Get the patch id from the WixPatchId symbol.
91 + var patchIdSymbol = symbols.OfType<WixPatchIdSymbol>().FirstOrDefault();
92
93 - if (String.IsNullOrEmpty(patchIdTuple.Id?.Id))
93 + if (String.IsNullOrEmpty(patchIdSymbol.Id?.Id))
94 {
95 this.Messaging.Write(ErrorMessages.ExpectedPatchIdInWixMsp());
96 return subStorages;
97 }
98
99 - if (String.IsNullOrEmpty(patchIdTuple.ClientPatchId))
99 + if (String.IsNullOrEmpty(patchIdSymbol.ClientPatchId))
100 {
101 this.Messaging.Write(ErrorMessages.ExpectedClientPatchIdInWixMsp());
102 return subStorages;
103 }
104
105 // enumerate patch.Media to map diskId to Media row
106 - var patchMediaByDiskId = tuples.OfType<MediaTuple>().ToDictionary(t => t.DiskId);
106 + var patchMediaByDiskId = symbols.OfType<MediaSymbol>().ToDictionary(t => t.DiskId);
107
108 if (patchMediaByDiskId.Count == 0)
109 {
@@ -112,23 +112,23 @@ namespace WixToolset.Core.WindowsInstaller.Bind
112 }
113
114 // populate MSP summary information
115 - var patchMetadata = this.PopulateSummaryInformation(summaryInfo, tuples, patchIdTuple, section.Codepage);
115 + var patchMetadata = this.PopulateSummaryInformation(summaryInfo, symbols, patchIdSymbol, section.Codepage);
116
117 // enumerate transforms
118 var productCodes = new SortedSet<string>();
119 var transformNames = new List<string>();
120 var validTransform = new List<Tuple<string, WindowsInstallerData>>();
121
122 - var baselineTuplesById = tuples.OfType<WixPatchBaselineTuple>().ToDictionary(t => t.Id.Id);
122 + var baselineSymbolsById = symbols.OfType<WixPatchBaselineSymbol>().ToDictionary(t => t.Id.Id);
123
124 foreach (var mainTransform in this.Transforms)
125 {
126 - var baselineTuple = baselineTuplesById[mainTransform.Baseline];
126 + var baselineSymbol = baselineSymbolsById[mainTransform.Baseline];
127
128 - var patchRefTuples = tuples.OfType<WixPatchRefTuple>().ToList();
129 - if (patchRefTuples.Count > 0)
128 + var patchRefSymbols = symbols.OfType<WixPatchRefSymbol>().ToList();
129 + if (patchRefSymbols.Count > 0)
130 {
131 - if (!this.ReduceTransform(mainTransform.Transform, patchRefTuples))
131 + if (!this.ReduceTransform(mainTransform.Transform, patchRefSymbols))
132 {
133 // transform has none of the content authored into this patch
134 continue;
@@ -139,7 +139,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
139 this.Validate(mainTransform);
140
141 // ensure consistent File.Sequence within each Media
142 - var mediaTuple = patchMediaByDiskId[baselineTuple.DiskId];
142 + var mediaSymbol = patchMediaByDiskId[baselineSymbol.DiskId];
143
144 // Ensure that files are sequenced after the last file in any transform.
145 var transformMediaTable = mainTransform.Transform.Tables["Media"];
@@ -147,25 +147,25 @@ namespace WixToolset.Core.WindowsInstaller.Bind
147 {
148 foreach (MediaRow transformMediaRow in transformMediaTable.Rows)
149 {
150 - if (!mediaTuple.LastSequence.HasValue || mediaTuple.LastSequence < transformMediaRow.LastSequence)
150 + if (!mediaSymbol.LastSequence.HasValue || mediaSymbol.LastSequence < transformMediaRow.LastSequence)
151 {
152 // The Binder will pre-increment the sequence.
153 - mediaTuple.LastSequence = transformMediaRow.LastSequence;
153 + mediaSymbol.LastSequence = transformMediaRow.LastSequence;
154 }
155 }
156 }
157
158 // Use the Media/@DiskId if greater than the last sequence for backward compatibility.
159 - if (!mediaTuple.LastSequence.HasValue || mediaTuple.LastSequence < mediaTuple.DiskId)
159 + if (!mediaSymbol.LastSequence.HasValue || mediaSymbol.LastSequence < mediaSymbol.DiskId)
160 {
161 - mediaTuple.LastSequence = mediaTuple.DiskId;
161 + mediaSymbol.LastSequence = mediaSymbol.DiskId;
162 }
163
164 // Ignore media table in the transform.
165 mainTransform.Transform.Tables.Remove("Media");
166 mainTransform.Transform.Tables.Remove("MsiDigitalSignature");
167
168 - var pairedTransform = this.BuildPairedTransform(summaryInfo, patchMetadata, patchIdTuple, mainTransform.Transform, mediaTuple, baselineTuple, out var productCode);
168 + var pairedTransform = this.BuildPairedTransform(summaryInfo, patchMetadata, patchIdSymbol, mainTransform.Transform, mediaSymbol, baselineSymbol, out var productCode);
169
170 productCode = productCode.ToUpperInvariant();
171 productCodes.Add(productCode);
@@ -205,17 +205,17 @@ namespace WixToolset.Core.WindowsInstaller.Bind
205 }
206
207 // Finish filling tables with transform-dependent data.
208 - productCodes = FinalizePatchProductCodes(tuples, productCodes);
208 + productCodes = FinalizePatchProductCodes(symbols, productCodes);
209
210 // Semicolon delimited list of the product codes that can accept the patch.
211 - summaryInfo.Add(SummaryInformationType.PatchProductCodes, new SummaryInformationTuple(patchIdTuple.SourceLineNumbers)
211 + summaryInfo.Add(SummaryInformationType.PatchProductCodes, new SummaryInformationSymbol(patchIdSymbol.SourceLineNumbers)
212 {
213 PropertyId = SummaryInformationType.PatchProductCodes,
214 Value = String.Join(";", productCodes)
215 });
216
217 // Semicolon delimited list of transform substorage names in the order they are applied.
218 - summaryInfo.Add(SummaryInformationType.TransformNames, new SummaryInformationTuple(patchIdTuple.SourceLineNumbers)
218 + summaryInfo.Add(SummaryInformationType.TransformNames, new SummaryInformationSymbol(patchIdSymbol.SourceLineNumbers)
219 {
220 PropertyId = SummaryInformationType.TransformNames,
221 Value = String.Join(";", transformNames)
@@ -224,7 +224,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
224 // Put the summary information that was extracted back in now that it is updated.
225 foreach (var readSummaryInfo in summaryInfo.Values.OrderBy(s => s.PropertyId))
226 {
227 - section.AddTuple(readSummaryInfo);
227 + section.AddSymbol(readSummaryInfo);
228 }
229
230 this.SubStorages = subStorages;
@@ -232,19 +232,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind
232 return subStorages;
233 }
234
235 - private Dictionary<SummaryInformationType, SummaryInformationTuple> ExtractPatchSummaryInfo()
235 + private Dictionary<SummaryInformationType, SummaryInformationSymbol> ExtractPatchSummaryInfo()
236 {
237 - var result = new Dictionary<SummaryInformationType, SummaryInformationTuple>();
237 + var result = new Dictionary<SummaryInformationType, SummaryInformationSymbol>();
238
239 foreach (var section in this.Intermediate.Sections)
240 {
241 - for (var i = section.Tuples.Count - 1; i >= 0; i--)
241 + for (var i = section.Symbols.Count - 1; i >= 0; i--)
242 {
243 - if (section.Tuples[i] is SummaryInformationTuple patchSummaryInfo)
243 + if (section.Symbols[i] is SummaryInformationSymbol patchSummaryInfo)
244 {
245 - // Remove all summary information from the tuples and remember those that
245 + // Remove all summary information from the symbols and remember those that
246 // are not calculated or reserved.
247 - section.Tuples.RemoveAt(i);
247 + section.Symbols.RemoveAt(i);
248
249 if (patchSummaryInfo.PropertyId != SummaryInformationType.PatchProductCodes &&
250 patchSummaryInfo.PropertyId != SummaryInformationType.PatchCode &&
@@ -262,39 +262,39 @@ namespace WixToolset.Core.WindowsInstaller.Bind
262 return result;
263 }
264
265 - private Dictionary<string, MsiPatchMetadataTuple> PopulateSummaryInformation(Dictionary<SummaryInformationType, SummaryInformationTuple> summaryInfo, List<IntermediateTuple> tuples, WixPatchIdTuple patchIdTuple, int codepage)
265 + private Dictionary<string, MsiPatchMetadataSymbol> PopulateSummaryInformation(Dictionary<SummaryInformationType, SummaryInformationSymbol> summaryInfo, List<IntermediateSymbol> symbols, WixPatchIdSymbol patchIdSymbol, int codepage)
266 {
267 // PID_CODEPAGE
268 if (!summaryInfo.ContainsKey(SummaryInformationType.Codepage))
269 {
270 // Set the code page by default to the same code page for the
271 // string pool in the database.
272 - AddSummaryInformation(SummaryInformationType.Codepage, codepage.ToString(CultureInfo.InvariantCulture), patchIdTuple.SourceLineNumbers);
272 + AddSummaryInformation(SummaryInformationType.Codepage, codepage.ToString(CultureInfo.InvariantCulture), patchIdSymbol.SourceLineNumbers);
273 }
274
275 // GUID patch code for the patch.
276 - AddSummaryInformation(SummaryInformationType.PatchCode, patchIdTuple.Id.Id, patchIdTuple.SourceLineNumbers);
276 + AddSummaryInformation(SummaryInformationType.PatchCode, patchIdSymbol.Id.Id, patchIdSymbol.SourceLineNumbers);
277
278 // Indicates the minimum Windows Installer version that is required to install the patch.
279 - AddSummaryInformation(SummaryInformationType.PatchInstallerRequirement, ((int)SummaryInformation.InstallerRequirement.Version31).ToString(CultureInfo.InvariantCulture), patchIdTuple.SourceLineNumbers);
279 + AddSummaryInformation(SummaryInformationType.PatchInstallerRequirement, ((int)SummaryInformation.InstallerRequirement.Version31).ToString(CultureInfo.InvariantCulture), patchIdSymbol.SourceLineNumbers);
280
281 if (!summaryInfo.ContainsKey(SummaryInformationType.Security))
282 {
283 - AddSummaryInformation(SummaryInformationType.Security, "4", patchIdTuple.SourceLineNumbers); // Read-only enforced;
283 + AddSummaryInformation(SummaryInformationType.Security, "4", patchIdSymbol.SourceLineNumbers); // Read-only enforced;
284 }
285
286 // Use authored comments or default to display name.
287 - MsiPatchMetadataTuple commentsTuple = null;
287 + MsiPatchMetadataSymbol commentsSymbol = null;
288
289 - var metadataTuples = tuples.OfType<MsiPatchMetadataTuple>().Where(t => String.IsNullOrEmpty(t.Company)).ToDictionary(t => t.Property);
289 + var metadataSymbols = symbols.OfType<MsiPatchMetadataSymbol>().Where(t => String.IsNullOrEmpty(t.Company)).ToDictionary(t => t.Property);
290
291 if (!summaryInfo.ContainsKey(SummaryInformationType.Title) &&
292 - metadataTuples.TryGetValue("DisplayName", out var displayName))
292 + metadataSymbols.TryGetValue("DisplayName", out var displayName))
293 {
294 AddSummaryInformation(SummaryInformationType.Title, displayName.Value, displayName.SourceLineNumbers);
295
296 // Default comments to use display name as-is.
297 - commentsTuple = displayName;
297 + commentsSymbol = displayName;
298 }
299
300 // TODO: This code below seems unnecessary given the codepage is set at the top of this method.
@@ -305,38 +305,38 @@ namespace WixToolset.Core.WindowsInstaller.Bind
305 //}
306
307 if (!summaryInfo.ContainsKey(SummaryInformationType.PatchPackageName) &&
308 - metadataTuples.TryGetValue("Description", out var description))
308 + metadataSymbols.TryGetValue("Description", out var description))
309 {
310 AddSummaryInformation(SummaryInformationType.PatchPackageName, description.Value, description.SourceLineNumbers);
311 }
312
313 if (!summaryInfo.ContainsKey(SummaryInformationType.Author) &&
314 - metadataTuples.TryGetValue("ManufacturerName", out var manufacturer))
314 + metadataSymbols.TryGetValue("ManufacturerName", out var manufacturer))
315 {
316 AddSummaryInformation(SummaryInformationType.Author, manufacturer.Value, manufacturer.SourceLineNumbers);
317 }
318
319 // Special metadata marshalled through the build.
320 - //var wixMetadataValues = tuples.OfType<WixPatchMetadataTuple>().ToDictionary(t => t.Id.Id, t => t.Value);
320 + //var wixMetadataValues = symbols.OfType<WixPatchMetadataSymbol>().ToDictionary(t => t.Id.Id, t => t.Value);
321
322 //if (wixMetadataValues.TryGetValue("Comments", out var wixComments))
323 - if (metadataTuples.TryGetValue("Comments", out var wixComments))
323 + if (metadataSymbols.TryGetValue("Comments", out var wixComments))
324 {
325 - commentsTuple = wixComments;
325 + commentsSymbol = wixComments;
326 }
327
328 // Write the package comments to summary info.
329 if (!summaryInfo.ContainsKey(SummaryInformationType.Comments) &&
330 - commentsTuple != null)
330 + commentsSymbol != null)
331 {
332 - AddSummaryInformation(SummaryInformationType.Comments, commentsTuple.Value, commentsTuple.SourceLineNumbers);
332 + AddSummaryInformation(SummaryInformationType.Comments, commentsSymbol.Value, commentsSymbol.SourceLineNumbers);
333 }
334
335 - return metadataTuples;
335 + return metadataSymbols;
336
337 void AddSummaryInformation(SummaryInformationType type, string value, SourceLineNumber sourceLineNumber)
338 {
339 - summaryInfo.Add(type, new SummaryInformationTuple(sourceLineNumber)
339 + summaryInfo.Add(type, new SummaryInformationSymbol(sourceLineNumber)
340 {
341 PropertyId = type,
342 Value = value
@@ -379,9 +379,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
379 /// Reduce the transform according to the patch references.
380 /// </summary>
381 /// <param name="transform">transform generated by torch.</param>
382 - /// <param name="patchRefTuples">Table contains patch family filter.</param>
382 + /// <param name="patchRefSymbols">Table contains patch family filter.</param>
383 /// <returns>true if the transform is not empty</returns>
384 - private bool ReduceTransform(WindowsInstallerData transform, IEnumerable<WixPatchRefTuple> patchRefTuples)
384 + private bool ReduceTransform(WindowsInstallerData transform, IEnumerable<WixPatchRefSymbol> patchRefSymbols)
385 {
386 // identify sections to keep
387 var oldSections = new Dictionary<string, Row>();
@@ -402,10 +402,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
402 var directoryLockPermissionsIndex = new Dictionary<string, List<Row>>();
403 var directoryMsiLockPermissionsExIndex = new Dictionary<string, List<Row>>();
404
405 - foreach (var patchRefTuple in patchRefTuples)
405 + foreach (var patchRefSymbol in patchRefSymbols)
406 {
407 - var tableName = patchRefTuple.Table;
408 - var key = patchRefTuple.PrimaryKeys;
407 + var tableName = patchRefSymbol.Table;
408 + var key = patchRefSymbol.PrimaryKeys;
409
410 // Short circuit filtering if all changes should be included.
411 if ("*" == tableName && "*" == key)
@@ -1090,7 +1090,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1090 /// <summary>
1091 /// Create the #transform for the given main transform.
1092 /// </summary>
1093 - private WindowsInstallerData BuildPairedTransform(Dictionary<SummaryInformationType, SummaryInformationTuple> summaryInfo, Dictionary<string, MsiPatchMetadataTuple> patchMetadata, WixPatchIdTuple patchIdTuple, WindowsInstallerData mainTransform, MediaTuple mediaTuple, WixPatchBaselineTuple baselineTuple, out string productCode)
1093 + private WindowsInstallerData BuildPairedTransform(Dictionary<SummaryInformationType, SummaryInformationSymbol> summaryInfo, Dictionary<string, MsiPatchMetadataSymbol> patchMetadata, WixPatchIdSymbol patchIdSymbol, WindowsInstallerData mainTransform, MediaSymbol mediaSymbol, WixPatchBaselineSymbol baselineSymbol, out string productCode)
1094 {
1095 productCode = null;
1096
@@ -1106,11 +1106,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1106 var mainSummaryTable = mainTransform.Tables["_SummaryInformation"];
1107 var mainSummaryRows = mainSummaryTable.Rows.ToDictionary(r => r.FieldAsInteger(0));
1108
1109 - var baselineValidationFlags = ((int)baselineTuple.ValidationFlags).ToString(CultureInfo.InvariantCulture);
1109 + var baselineValidationFlags = ((int)baselineSymbol.ValidationFlags).ToString(CultureInfo.InvariantCulture);
1110
1111 if (!mainSummaryRows.ContainsKey((int)SummaryInformationType.TransformValidationFlags))
1112 {
1113 - var mainSummaryRow = mainSummaryTable.CreateRow(baselineTuple.SourceLineNumbers);
1113 + var mainSummaryRow = mainSummaryTable.CreateRow(baselineSymbol.SourceLineNumbers);
1114 mainSummaryRow[0] = (int)SummaryInformationType.TransformValidationFlags;
1115 mainSummaryRow[1] = baselineValidationFlags;
1116 }
@@ -1177,7 +1177,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1177 mainFileRow.CopyTo(pairedFileRow);
1178
1179 // Override authored media for patch bind.
1180 - mainFileRow.DiskId = mediaTuple.DiskId;
1180 + mainFileRow.DiskId = mediaSymbol.DiskId;
1181
1182 // Suppress any change to File.Sequence to avoid bloat.
1183 mainFileRow.Fields[7].Modified = false;
@@ -1200,78 +1200,78 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1200
1201 // Add Media row to pairedTransform
1202 var pairedMediaTable = pairedTransform.EnsureTable(this.tableDefinitions["Media"]);
1203 - var pairedMediaRow = (MediaRow)pairedMediaTable.CreateRow(mediaTuple.SourceLineNumbers);
1203 + var pairedMediaRow = (MediaRow)pairedMediaTable.CreateRow(mediaSymbol.SourceLineNumbers);
1204 pairedMediaRow.Operation = RowOperation.Add;
1205 - pairedMediaRow.DiskId = mediaTuple.DiskId;
1206 - pairedMediaRow.LastSequence = mediaTuple.LastSequence ?? 0;
1207 - pairedMediaRow.DiskPrompt = mediaTuple.DiskPrompt;
1208 - pairedMediaRow.Cabinet = mediaTuple.Cabinet;
1209 - pairedMediaRow.VolumeLabel = mediaTuple.VolumeLabel;
1210 - pairedMediaRow.Source = mediaTuple.Source;
1205 + pairedMediaRow.DiskId = mediaSymbol.DiskId;
1206 + pairedMediaRow.LastSequence = mediaSymbol.LastSequence ?? 0;
1207 + pairedMediaRow.DiskPrompt = mediaSymbol.DiskPrompt;
1208 + pairedMediaRow.Cabinet = mediaSymbol.Cabinet;
1209 + pairedMediaRow.VolumeLabel = mediaSymbol.VolumeLabel;
1210 + pairedMediaRow.Source = mediaSymbol.Source;
1211
1212 // Add PatchPackage for this Media
1213 var pairedPackageTable = pairedTransform.EnsureTable(this.tableDefinitions["PatchPackage"]);
1214 pairedPackageTable.Operation = TableOperation.Add;
1215 - var pairedPackageRow = pairedPackageTable.CreateRow(mediaTuple.SourceLineNumbers);
1215 + var pairedPackageRow = pairedPackageTable.CreateRow(mediaSymbol.SourceLineNumbers);
1216 pairedPackageRow.Operation = RowOperation.Add;
1217 - pairedPackageRow[0] = patchIdTuple.Id.Id;
1218 - pairedPackageRow[1] = mediaTuple.DiskId;
1217 + pairedPackageRow[0] = patchIdSymbol.Id.Id;
1218 + pairedPackageRow[1] = mediaSymbol.DiskId;
1219
1220 // Add the property to the patch transform's Property table.
1221 var pairedPropertyTable = pairedTransform.EnsureTable(this.tableDefinitions["Property"]);
1222 pairedPropertyTable.Operation = TableOperation.Add;
1223
1224 // Add property to both identify client patches and whether those patches are removable or not
1225 - patchMetadata.TryGetValue("AllowRemoval", out var allowRemovalTuple);
1225 + patchMetadata.TryGetValue("AllowRemoval", out var allowRemovalSymbol);
1226
1227 - var pairedPropertyRow = pairedPropertyTable.CreateRow(allowRemovalTuple?.SourceLineNumbers);
1227 + var pairedPropertyRow = pairedPropertyTable.CreateRow(allowRemovalSymbol?.SourceLineNumbers);
1228 pairedPropertyRow.Operation = RowOperation.Add;
1229 - pairedPropertyRow[0] = String.Concat(patchIdTuple.ClientPatchId, ".AllowRemoval");
1230 - pairedPropertyRow[1] = allowRemovalTuple?.Value ?? "0";
1229 + pairedPropertyRow[0] = String.Concat(patchIdSymbol.ClientPatchId, ".AllowRemoval");
1230 + pairedPropertyRow[1] = allowRemovalSymbol?.Value ?? "0";
1231
1232 // Add this patch code GUID to the patch transform to identify
1233 // which patches are installed, including in multi-patch
1234 // installations.
1235 - pairedPropertyRow = pairedPropertyTable.CreateRow(patchIdTuple.SourceLineNumbers);
1235 + pairedPropertyRow = pairedPropertyTable.CreateRow(patchIdSymbol.SourceLineNumbers);
1236 pairedPropertyRow.Operation = RowOperation.Add;
1237 - pairedPropertyRow[0] = String.Concat(patchIdTuple.ClientPatchId, ".PatchCode");
1238 - pairedPropertyRow[1] = patchIdTuple.Id.Id;
1237 + pairedPropertyRow[0] = String.Concat(patchIdSymbol.ClientPatchId, ".PatchCode");
1238 + pairedPropertyRow[1] = patchIdSymbol.Id.Id;
1239
1240 // Add PATCHNEWPACKAGECODE to apply to admin layouts.
1241 - pairedPropertyRow = pairedPropertyTable.CreateRow(patchIdTuple.SourceLineNumbers);
1241 + pairedPropertyRow = pairedPropertyTable.CreateRow(patchIdSymbol.SourceLineNumbers);
1242 pairedPropertyRow.Operation = RowOperation.Add;
1243 pairedPropertyRow[0] = "PATCHNEWPACKAGECODE";
1244 - pairedPropertyRow[1] = patchIdTuple.Id.Id;
1244 + pairedPropertyRow[1] = patchIdSymbol.Id.Id;
1245
1246 // Add PATCHNEWSUMMARYCOMMENTS and PATCHNEWSUMMARYSUBJECT to apply to admin layouts.
1247 - if (summaryInfo.TryGetValue(SummaryInformationType.Subject, out var subjectTuple))
1247 + if (summaryInfo.TryGetValue(SummaryInformationType.Subject, out var subjectSymbol))
1248 {
1249 - pairedPropertyRow = pairedPropertyTable.CreateRow(subjectTuple.SourceLineNumbers);
1249 + pairedPropertyRow = pairedPropertyTable.CreateRow(subjectSymbol.SourceLineNumbers);
1250 pairedPropertyRow.Operation = RowOperation.Add;
1251 pairedPropertyRow[0] = "PATCHNEWSUMMARYSUBJECT";
1252 - pairedPropertyRow[1] = subjectTuple.Value;
1252 + pairedPropertyRow[1] = subjectSymbol.Value;
1253 }
1254
1255 - if (summaryInfo.TryGetValue(SummaryInformationType.Comments, out var commentsTuple))
1255 + if (summaryInfo.TryGetValue(SummaryInformationType.Comments, out var commentsSymbol))
1256 {
1257 - pairedPropertyRow = pairedPropertyTable.CreateRow(commentsTuple.SourceLineNumbers);
1257 + pairedPropertyRow = pairedPropertyTable.CreateRow(commentsSymbol.SourceLineNumbers);
1258 pairedPropertyRow.Operation = RowOperation.Add;
1259 pairedPropertyRow[0] = "PATCHNEWSUMMARYCOMMENTS";
1260 - pairedPropertyRow[1] = commentsTuple.Value;
1260 + pairedPropertyRow[1] = commentsSymbol.Value;
1261 }
1262
1263 return pairedTransform;
1264 }
1265
1266 - private static SortedSet<string> FinalizePatchProductCodes(List<IntermediateTuple> tuples, SortedSet<string> productCodes)
1266 + private static SortedSet<string> FinalizePatchProductCodes(List<IntermediateSymbol> symbols, SortedSet<string> productCodes)
1267 {
1268 - var patchTargetTuples = tuples.OfType<WixPatchTargetTuple>().ToList();
1268 + var patchTargetSymbols = symbols.OfType<WixPatchTargetSymbol>().ToList();
1269
1270 - if (patchTargetTuples.Any())
1270 + if (patchTargetSymbols.Any())
1271 {
1272 var targets = new SortedSet<string>();
1273 var replace = true;
1274 - foreach (var wixPatchTargetRow in patchTargetTuples)
1274 + foreach (var wixPatchTargetRow in patchTargetSymbols)
1275 {
1276 var target = wixPatchTargetRow.ProductCode.ToUpperInvariant();
1277 if (target == "*")
src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+13 -13
@@ -8,7 +8,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
8 using System.Linq;
9 using WixToolset.Core.Bind;
10 using WixToolset.Data;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12 using WixToolset.Data.WindowsInstaller;
13 using WixToolset.Extensibility;
14 using WixToolset.Extensibility.Data;
@@ -147,7 +147,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
147 // Add binder variables for all properties.
148 if (SectionType.Product == section.Type || variableCache != null)
149 {
150 - foreach (var propertyRow in section.Tuples.OfType<PropertyTuple>())
150 + foreach (var propertyRow in section.Symbols.OfType<PropertySymbol>())
151 {
152 // Set the ProductCode if it is to be generated.
153 if ("ProductCode".Equals(propertyRow.Id.Id, StringComparison.Ordinal) && "*".Equals(propertyRow.Value, StringComparison.Ordinal))
@@ -256,13 +256,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
256 // Retrieve file information from merge modules.
257 if (SectionType.Product == section.Type)
258 {
259 - var wixMergeTuples = section.Tuples.OfType<WixMergeTuple>().ToList();
259 + var wixMergeSymbols = section.Symbols.OfType<WixMergeSymbol>().ToList();
260
261 - if (wixMergeTuples.Any())
261 + if (wixMergeSymbols.Any())
262 {
263 containsMergeModules = true;
264
265 - var command = new ExtractMergeModuleFilesCommand(this.Messaging, wixMergeTuples, fileFacades, installerVersion, this.IntermediateFolder, this.SuppressLayout);
265 + var command = new ExtractMergeModuleFilesCommand(this.Messaging, wixMergeSymbols, fileFacades, installerVersion, this.IntermediateFolder, this.SuppressLayout);
266 command.Execute();
267
268 fileFacades.AddRange(command.MergeModulesFileFacades);
@@ -294,7 +294,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
294 command.Execute();
295 }
296
297 -#if TODO_FINISH_UPDATE // use tuples instead of rows
297 +#if TODO_FINISH_UPDATE // use symbols instead of rows
298 // Extended binder extensions can be called now that fields are resolved.
299 {
300 Table updatedFiles = this.Output.EnsureTable(this.TableDefinitions["WixBindUpdatedFiles"]);
@@ -341,20 +341,20 @@ namespace WixToolset.Core.WindowsInstaller.Bind
341 command.Execute();
342 }
343
344 - // Add missing CreateFolder tuples to null-keypath components.
344 + // Add missing CreateFolder symbols to null-keypath components.
345 {
346 var command = new AddCreateFoldersCommand(section);
347 command.Execute();
348 }
349
350 - // Update tuples that reference text files on disk.
350 + // Update symbols that reference text files on disk.
351 {
352 var command = new UpdateFromTextFilesCommand(this.Messaging, section);
353 command.Execute();
354 }
355
356 // Assign files to media and update file sequences.
357 - Dictionary<MediaTuple, IEnumerable<FileFacade>> filesByCabinetMedia;
357 + Dictionary<MediaSymbol, IEnumerable<FileFacade>> filesByCabinetMedia;
358 IEnumerable<FileFacade> uncompressedFiles;
359 {
360 var order = new OptimizeFileFacadesOrderCommand(fileFacades);
@@ -391,7 +391,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
391 if (output.Type == OutputType.Module)
392 {
393 // Modularize identifiers.
394 - var modularize = new ModularizeCommand(output, modularizationSuffix, section.Tuples.OfType<WixSuppressModularizationTuple>());
394 + var modularize = new ModularizeCommand(output, modularizationSuffix, section.Symbols.OfType<WixSuppressModularizationSymbol>());
395 modularize.Execute();
396
397 // Ensure all sequence tables in place because, mergemod.dll requires them.
@@ -418,7 +418,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
418
419 if (SectionType.Patch == section.Type && this.DeltaBinaryPatch)
420 {
421 - var command = new CreateDeltaPatchesCommand(fileFacades, this.IntermediateFolder, section.Tuples.OfType<WixPatchIdTuple>().FirstOrDefault());
421 + var command = new CreateDeltaPatchesCommand(fileFacades, this.IntermediateFolder, section.Symbols.OfType<WixPatchIdSymbol>().FirstOrDefault());
422 command.Execute();
423 }
424
@@ -428,7 +428,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
428 {
429 this.Messaging.Write(VerboseMessages.CreatingCabinetFiles());
430
431 - var mediaTemplate = section.Tuples.OfType<WixMediaTemplateTuple>().FirstOrDefault();
431 + var mediaTemplate = section.Symbols.OfType<WixMediaTemplateSymbol>().FirstOrDefault();
432
433 var command = new CreateCabinetsCommand(this.ServiceProvider, this.BackendHelper, mediaTemplate);
434 command.CabbingThreadCount = this.CabbingThreadCount;
@@ -578,7 +578,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
578 return wixout;
579 }
580
581 - private string ResolveMedia(MediaTuple media, string mediaLayoutDirectory, string layoutDirectory)
581 + private string ResolveMedia(MediaSymbol media, string mediaLayoutDirectory, string layoutDirectory)
582 {
583 string layout = null;
584
src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
+12 -12
@@ -6,7 +6,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
6 using System.Globalization;
7 using System.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10
11 /// <summary>
12 /// Binds the summary information table of a database.
@@ -49,13 +49,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
49 var foundCreatingApplication = false;
50 var now = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture);
51
52 - foreach (var summaryInformationTuple in this.Section.Tuples.OfType<SummaryInformationTuple>())
52 + foreach (var summaryInformationSymbol in this.Section.Symbols.OfType<SummaryInformationSymbol>())
53 {
54 - switch (summaryInformationTuple.PropertyId)
54 + switch (summaryInformationSymbol.PropertyId)
55 {
56 case SummaryInformationType.Codepage: // PID_CODEPAGE
57 // make sure the code page is an int and not a web name or null
58 - var codepage = summaryInformationTuple.Value;
58 + var codepage = summaryInformationSymbol.Value;
59
60 if (String.IsNullOrEmpty(codepage))
61 {
@@ -63,11 +63,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
63 }
64 else
65 {
66 - summaryInformationTuple.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationTuple.SourceLineNumbers).ToString(CultureInfo.InvariantCulture);
66 + summaryInformationSymbol.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationSymbol.SourceLineNumbers).ToString(CultureInfo.InvariantCulture);
67 }
68 break;
69 case SummaryInformationType.PackageCode: // PID_REVNUMBER
70 - var packageCode = summaryInformationTuple.Value;
70 + var packageCode = summaryInformationSymbol.Value;
71
72 if (SectionType.Module == this.Section.Type)
73 {
@@ -76,7 +76,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
76 else if ("*" == packageCode)
77 {
78 // set the revision number (package/patch code) if it should be automatically generated
79 - summaryInformationTuple.Value = Common.GenerateGuid();
79 + summaryInformationSymbol.Value = Common.GenerateGuid();
80 }
81 break;
82 case SummaryInformationType.Created:
@@ -86,7 +86,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
86 foundLastSaveDataTime = true;
87 break;
88 case SummaryInformationType.WindowsInstallerVersion:
89 - this.InstallerVersion = summaryInformationTuple[SummaryInformationTupleFields.Value].AsNumber();
89 + this.InstallerVersion = summaryInformationSymbol[SummaryInformationSymbolFields.Value].AsNumber();
90 break;
91 case SummaryInformationType.WordCount:
92 if (SectionType.Patch == this.Section.Type)
@@ -96,7 +96,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
96 }
97 else
98 {
99 - var attributes = summaryInformationTuple[SummaryInformationTupleFields.Value].AsNumber();
99 + var attributes = summaryInformationSymbol[SummaryInformationSymbolFields.Value].AsNumber();
100 this.LongNames = (0 == (attributes & 1));
101 this.Compressed = (2 == (attributes & 2));
102 }
@@ -110,7 +110,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
110 // add a summary information row for the create time/date property if its not already set
111 if (!foundCreateDataTime)
112 {
113 - this.Section.AddTuple(new SummaryInformationTuple(null)
113 + this.Section.AddSymbol(new SummaryInformationSymbol(null)
114 {
115 PropertyId = SummaryInformationType.Created,
116 Value = now,
@@ -120,7 +120,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
120 // add a summary information row for the last save time/date property if its not already set
121 if (!foundLastSaveDataTime)
122 {
123 - this.Section.AddTuple(new SummaryInformationTuple(null)
123 + this.Section.AddSymbol(new SummaryInformationSymbol(null)
124 {
125 PropertyId = SummaryInformationType.LastSaved,
126 Value = now,
@@ -130,7 +130,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
130 // add a summary information row for the creating application property if its not already set
131 if (!foundCreatingApplication)
132 {
133 - this.Section.AddTuple(new SummaryInformationTuple(null)
133 + this.Section.AddSymbol(new SummaryInformationSymbol(null)
134 {
135 PropertyId = SummaryInformationType.CreatingApplication,
136 Value = String.Format(CultureInfo.InvariantCulture, AppCommon.GetCreatingApplicationString()),
src/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs
+1 -1
@@ -7,7 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.IO;
8 using WixToolset.Core.WindowsInstaller.Msi;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Data.WindowsInstaller;
12 using WixToolset.Extensibility.Services;
13
src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs
+26 -26
@@ -7,7 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.IO;
8 using System.Linq;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
13
@@ -34,38 +34,38 @@ namespace WixToolset.Core.WindowsInstaller.Bind
34
35 public void Execute()
36 {
37 - Dictionary<string, RegistryTuple> registryKeyRows = null;
37 + Dictionary<string, RegistrySymbol> registryKeyRows = null;
38 Dictionary<string, IResolvedDirectory> targetPathsByDirectoryId = null;
39 Dictionary<string, string> componentIdGenSeeds = null;
40 - Dictionary<string, List<FileTuple>> filesByComponentId = null;
40 + Dictionary<string, List<FileSymbol>> filesByComponentId = null;
41
42 // Find components with generatable guids.
43 - foreach (var componentTuple in this.Section.Tuples.OfType<ComponentTuple>())
43 + foreach (var componentSymbol in this.Section.Symbols.OfType<ComponentSymbol>())
44 {
45 // Skip components that do not specify generate guid.
46 - if (componentTuple.ComponentId != "*")
46 + if (componentSymbol.ComponentId != "*")
47 {
48 continue;
49 }
50
51 - if (String.IsNullOrEmpty(componentTuple.KeyPath) || ComponentKeyPathType.OdbcDataSource == componentTuple.KeyPathType)
51 + if (String.IsNullOrEmpty(componentSymbol.KeyPath) || ComponentKeyPathType.OdbcDataSource == componentSymbol.KeyPathType)
52 {
53 - this.Messaging.Write(ErrorMessages.IllegalComponentWithAutoGeneratedGuid(componentTuple.SourceLineNumbers));
53 + this.Messaging.Write(ErrorMessages.IllegalComponentWithAutoGeneratedGuid(componentSymbol.SourceLineNumbers));
54 continue;
55 }
56
57 - if (ComponentKeyPathType.Registry == componentTuple.KeyPathType)
57 + if (ComponentKeyPathType.Registry == componentSymbol.KeyPathType)
58 {
59 if (registryKeyRows is null)
60 {
61 - registryKeyRows = this.Section.Tuples.OfType<RegistryTuple>().ToDictionary(t => t.Id.Id);
61 + registryKeyRows = this.Section.Symbols.OfType<RegistrySymbol>().ToDictionary(t => t.Id.Id);
62 }
63
64 - if (registryKeyRows.TryGetValue(componentTuple.KeyPath, out var foundRow))
64 + if (registryKeyRows.TryGetValue(componentSymbol.KeyPath, out var foundRow))
65 {
66 - var bitness = componentTuple.Win64 ? "64" : String.Empty;
66 + var bitness = componentSymbol.Win64 ? "64" : String.Empty;
67 var regkey = String.Concat(bitness, foundRow.AsString(1), "\\", foundRow.AsString(2), "\\", foundRow.AsString(3));
68 - componentTuple.ComponentId = this.BackendHelper.CreateGuid(BindDatabaseCommand.WixComponentGuidNamespace, regkey.ToLowerInvariant());
68 + componentSymbol.ComponentId = this.BackendHelper.CreateGuid(BindDatabaseCommand.WixComponentGuidNamespace, regkey.ToLowerInvariant());
69 }
70 }
71 else // must be a File KeyPath.
@@ -74,7 +74,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
74 // of directory ids to target names do that now.
75 if (targetPathsByDirectoryId is null)
76 {
77 - var directories = this.Section.Tuples.OfType<DirectoryTuple>().ToList();
77 + var directories = this.Section.Symbols.OfType<DirectorySymbol>().ToList();
78
79 targetPathsByDirectoryId = new Dictionary<string, IResolvedDirectory>(directories.Count);
80
@@ -95,12 +95,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind
95 }
96
97 // If the component id generation seeds have not been indexed
98 - // from the Directory tuples do that now.
98 + // from the Directory symbols do that now.
99 if (componentIdGenSeeds is null)
100 {
101 - // If there are any Directory tuples, build up the Component Guid
101 + // If there are any Directory symbols, build up the Component Guid
102 // generation seeds indexed by Directory/@Id.
103 - componentIdGenSeeds = this.Section.Tuples.OfType<DirectoryTuple>()
103 + componentIdGenSeeds = this.Section.Symbols.OfType<DirectorySymbol>()
104 .Where(t => !String.IsNullOrEmpty(t.ComponentGuidGenerationSeed))
105 .ToDictionary(t => t.Id.Id, t => t.ComponentGuidGenerationSeed);
106 }
@@ -109,15 +109,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
109 // then do that now
110 if (filesByComponentId is null)
111 {
112 - var files = this.Section.Tuples.OfType<FileTuple>().ToList();
112 + var files = this.Section.Symbols.OfType<FileSymbol>().ToList();
113
114 - filesByComponentId = new Dictionary<string, List<FileTuple>>(files.Count);
114 + filesByComponentId = new Dictionary<string, List<FileSymbol>>(files.Count);
115
116 foreach (var file in files)
117 {
118 if (!filesByComponentId.TryGetValue(file.ComponentRef, out var componentFiles))
119 {
120 - componentFiles = new List<FileTuple>();
120 + componentFiles = new List<FileSymbol>();
121 filesByComponentId.Add(file.ComponentRef, componentFiles);
122 }
123
@@ -126,16 +126,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind
126 }
127
128 // validate component meets all the conditions to have a generated guid
129 - var currentComponentFiles = filesByComponentId[componentTuple.Id.Id];
129 + var currentComponentFiles = filesByComponentId[componentSymbol.Id.Id];
130 var numFilesInComponent = currentComponentFiles.Count;
131 string path = null;
132
133 foreach (var fileRow in currentComponentFiles)
134 {
135 - if (fileRow.Id.Id == componentTuple.KeyPath)
135 + if (fileRow.Id.Id == componentSymbol.KeyPath)
136 {
137 // calculate the key file's canonical target path
138 - string directoryPath = this.PathResolver.GetDirectoryPath(targetPathsByDirectoryId, componentIdGenSeeds, componentTuple.DirectoryRef, true);
138 + string directoryPath = this.PathResolver.GetDirectoryPath(targetPathsByDirectoryId, componentIdGenSeeds, componentSymbol.DirectoryRef, true);
139 string fileName = Common.GetName(fileRow.Name, false, true).ToLowerInvariant();
140 path = Path.Combine(directoryPath, fileName);
141
@@ -147,13 +147,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
147 path.StartsWith(@"StartMenuFolder\programs", StringComparison.Ordinal) ||
148 path.StartsWith(@"WindowsFolder\fonts", StringComparison.Ordinal))
149 {
150 - this.Messaging.Write(ErrorMessages.IllegalPathForGeneratedComponentGuid(componentTuple.SourceLineNumbers, fileRow.ComponentRef, path));
150 + this.Messaging.Write(ErrorMessages.IllegalPathForGeneratedComponentGuid(componentSymbol.SourceLineNumbers, fileRow.ComponentRef, path));
151 }
152
153 // if component has more than one file, the key path must be versioned
154 if (1 < numFilesInComponent && String.IsNullOrEmpty(fileRow.Version))
155 {
156 - this.Messaging.Write(ErrorMessages.IllegalGeneratedGuidComponentUnversionedKeypath(componentTuple.SourceLineNumbers));
156 + this.Messaging.Write(ErrorMessages.IllegalGeneratedGuidComponentUnversionedKeypath(componentSymbol.SourceLineNumbers));
157 }
158 }
159 else
@@ -161,7 +161,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
161 // not a key path, so it must be an unversioned file if component has more than one file
162 if (1 < numFilesInComponent && !String.IsNullOrEmpty(fileRow.Version))
163 {
164 - this.Messaging.Write(ErrorMessages.IllegalGeneratedGuidComponentVersionedNonkeypath(componentTuple.SourceLineNumbers));
164 + this.Messaging.Write(ErrorMessages.IllegalGeneratedGuidComponentVersionedNonkeypath(componentSymbol.SourceLineNumbers));
165 }
166 }
167 }
@@ -169,7 +169,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
169 // if the rules were followed, reward with a generated guid
170 if (!this.Messaging.EncounteredError)
171 {
172 - componentTuple.ComponentId = this.BackendHelper.CreateGuid(BindDatabaseCommand.WixComponentGuidNamespace, path);
172 + componentSymbol.ComponentId = this.BackendHelper.CreateGuid(BindDatabaseCommand.WixComponentGuidNamespace, path);
173 }
174 }
175 }
src/WixToolset.Core.WindowsInstaller/Bind/CopyTransformDataCommand.cs
+7 -7
@@ -11,7 +11,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
11 using System.Linq;
12 using WixToolset.Core.Bind;
13 using WixToolset.Data;
14 - using WixToolset.Data.Tuples;
14 + using WixToolset.Data.Symbols;
15 using WixToolset.Data.WindowsInstaller;
16 using WixToolset.Data.WindowsInstaller.Rows;
17 using WixToolset.Extensibility;
@@ -463,9 +463,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
463 ref duplicateFilesSequence);
464 if (!hasPatchFilesAction)
465 {
466 - WindowsInstallerStandard.TryGetStandardAction(tableName, "PatchFiles", out var patchFilesActionTuple);
466 + WindowsInstallerStandard.TryGetStandardAction(tableName, "PatchFiles", out var patchFilesActionSymbol);
467
468 - var sequence = patchFilesActionTuple.Sequence;
468 + var sequence = patchFilesActionSymbol.Sequence;
469
470 // Test for default sequence value's appropriateness
471 if (installFilesSequence >= sequence || (0 != duplicateFilesSequence && duplicateFilesSequence <= sequence))
@@ -474,14 +474,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind
474 {
475 if (duplicateFilesSequence < installFilesSequence)
476 {
477 - throw new WixException(ErrorMessages.InsertInvalidSequenceActionOrder(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionTuple.Action));
477 + throw new WixException(ErrorMessages.InsertInvalidSequenceActionOrder(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action));
478 }
479 else
480 {
481 sequence = (duplicateFilesSequence + installFilesSequence) / 2;
482 if (installFilesSequence == sequence || duplicateFilesSequence == sequence)
483 {
484 - throw new WixException(ErrorMessages.InsertSequenceNoSpace(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionTuple.Action));
484 + throw new WixException(ErrorMessages.InsertSequenceNoSpace(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action));
485 }
486 }
487 }
@@ -498,8 +498,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
498 }
499
500 var patchAction = sequenceTable.CreateRow(null);
501 - patchAction[0] = patchFilesActionTuple.Action;
502 - patchAction[1] = patchFilesActionTuple.Condition;
501 + patchAction[0] = patchFilesActionSymbol.Action;
502 + patchAction[1] = patchFilesActionSymbol.Condition;
503 patchAction[2] = sequence;
504 patchAction.Operation = RowOperation.Add;
505 }
src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
+24 -24
@@ -10,7 +10,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
10 using System.Runtime.InteropServices;
11 using WixToolset.Core.Bind;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Data.WindowsInstaller;
15 using WixToolset.Extensibility;
16 using WixToolset.Extensibility.Data;
@@ -32,7 +32,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
32
33 private Dictionary<string, string> lastCabinetAddedToMediaTable; // Key is First Cabinet Name, Value is Last Cabinet Added in the Split Sequence
34
35 - public CreateCabinetsCommand(IWixToolsetServiceProvider serviceProvider, IBackendHelper backendHelper, WixMediaTemplateTuple mediaTemplate)
35 + public CreateCabinetsCommand(IWixToolsetServiceProvider serviceProvider, IBackendHelper backendHelper, WixMediaTemplateSymbol mediaTemplate)
36 {
37 this.fileTransfers = new List<IFileTransfer>();
38
@@ -51,7 +51,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
51
52 private IBackendHelper BackendHelper { get; }
53
54 - private WixMediaTemplateTuple MediaTemplate { get; }
54 + private WixMediaTemplateSymbol MediaTemplate { get; }
55
56 /// <summary>
57 /// Sets the number of threads to use for cabinet creation.
@@ -80,9 +80,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
80
81 public string ModularizationSuffix { private get; set; }
82
83 - public Dictionary<MediaTuple, IEnumerable<FileFacade>> FileFacadesByCabinet { private get; set; }
83 + public Dictionary<MediaSymbol, IEnumerable<FileFacade>> FileFacadesByCabinet { private get; set; }
84
85 - public Func<MediaTuple, string, string, string> ResolveMedia { private get; set; }
85 + public Func<MediaSymbol, string, string, string> ResolveMedia { private get; set; }
86
87 public TableDefinitionCollection TableDefinitions { private get; set; }
88
@@ -113,12 +113,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind
113
114 foreach (var entry in this.FileFacadesByCabinet)
115 {
116 - var mediaTuple = entry.Key;
116 + var mediaSymbol = entry.Key;
117 var files = entry.Value;
118 - var compressionLevel = mediaTuple.CompressionLevel ?? this.DefaultCompressionLevel ?? CompressionLevel.Medium;
119 - var cabinetDir = this.ResolveMedia(mediaTuple, mediaTuple.Layout, this.LayoutDirectory);
118 + var compressionLevel = mediaSymbol.CompressionLevel ?? this.DefaultCompressionLevel ?? CompressionLevel.Medium;
119 + var cabinetDir = this.ResolveMedia(mediaSymbol, mediaSymbol.Layout, this.LayoutDirectory);
120
121 - var cabinetWorkItem = this.CreateCabinetWorkItem(this.Output, cabinetDir, mediaTuple, compressionLevel, files);
121 + var cabinetWorkItem = this.CreateCabinetWorkItem(this.Output, cabinetDir, mediaSymbol, compressionLevel, files);
122 if (null != cabinetWorkItem)
123 {
124 cabinetBuilder.Enqueue(cabinetWorkItem);
@@ -176,28 +176,28 @@ namespace WixToolset.Core.WindowsInstaller.Bind
176 /// </summary>
177 /// <param name="output">Output for the current database.</param>
178 /// <param name="cabinetDir">Directory to create cabinet in.</param>
179 - /// <param name="mediaTuple">Media tuple containing information about the cabinet.</param>
179 + /// <param name="mediaSymbol">Media symbol containing information about the cabinet.</param>
180 /// <param name="fileFacades">Collection of files in this cabinet.</param>
181 /// <returns>created CabinetWorkItem object</returns>
182 - private CabinetWorkItem CreateCabinetWorkItem(WindowsInstallerData output, string cabinetDir, MediaTuple mediaTuple, CompressionLevel compressionLevel, IEnumerable<FileFacade> fileFacades)
182 + private CabinetWorkItem CreateCabinetWorkItem(WindowsInstallerData output, string cabinetDir, MediaSymbol mediaSymbol, CompressionLevel compressionLevel, IEnumerable<FileFacade> fileFacades)
183 {
184 CabinetWorkItem cabinetWorkItem = null;
185 - var tempCabinetFileX = Path.Combine(this.IntermediateFolder, mediaTuple.Cabinet);
185 + var tempCabinetFileX = Path.Combine(this.IntermediateFolder, mediaSymbol.Cabinet);
186
187 // check for an empty cabinet
188 if (!fileFacades.Any())
189 {
190 // Remove the leading '#' from the embedded cabinet name to make the warning easier to understand
191 - var cabinetName = mediaTuple.Cabinet.TrimStart('#');
191 + var cabinetName = mediaSymbol.Cabinet.TrimStart('#');
192
193 // If building a patch, remind them to run -p for torch.
194 if (OutputType.Patch == output.Type)
195 {
196 - this.Messaging.Write(WarningMessages.EmptyCabinet(mediaTuple.SourceLineNumbers, cabinetName, true));
196 + this.Messaging.Write(WarningMessages.EmptyCabinet(mediaSymbol.SourceLineNumbers, cabinetName, true));
197 }
198 else
199 {
200 - this.Messaging.Write(WarningMessages.EmptyCabinet(mediaTuple.SourceLineNumbers, cabinetName));
200 + this.Messaging.Write(WarningMessages.EmptyCabinet(mediaSymbol.SourceLineNumbers, cabinetName));
201 }
202 }
203
@@ -213,7 +213,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
213 }
214 else // reuse the cabinet from the cabinet cache.
215 {
216 - this.Messaging.Write(VerboseMessages.ReusingCabCache(mediaTuple.SourceLineNumbers, mediaTuple.Cabinet, resolvedCabinet.Path));
216 + this.Messaging.Write(VerboseMessages.ReusingCabCache(mediaSymbol.SourceLineNumbers, mediaSymbol.Cabinet, resolvedCabinet.Path));
217
218 try
219 {
@@ -227,27 +227,27 @@ namespace WixToolset.Core.WindowsInstaller.Bind
227 }
228 catch (Exception e)
229 {
230 - this.Messaging.Write(WarningMessages.CannotUpdateCabCache(mediaTuple.SourceLineNumbers, resolvedCabinet.Path, e.Message));
230 + this.Messaging.Write(WarningMessages.CannotUpdateCabCache(mediaSymbol.SourceLineNumbers, resolvedCabinet.Path, e.Message));
231 }
232 }
233
234 - var trackResolvedCabinet = this.BackendHelper.TrackFile(resolvedCabinet.Path, TrackedFileType.Intermediate, mediaTuple.SourceLineNumbers);
234 + var trackResolvedCabinet = this.BackendHelper.TrackFile(resolvedCabinet.Path, TrackedFileType.Intermediate, mediaSymbol.SourceLineNumbers);
235 this.trackedFiles.Add(trackResolvedCabinet);
236
237 - if (mediaTuple.Cabinet.StartsWith("#", StringComparison.Ordinal))
237 + if (mediaSymbol.Cabinet.StartsWith("#", StringComparison.Ordinal))
238 {
239 var streamsTable = output.EnsureTable(this.TableDefinitions["_Streams"]);
240
241 - var streamRow = streamsTable.CreateRow(mediaTuple.SourceLineNumbers);
242 - streamRow[0] = mediaTuple.Cabinet.Substring(1);
241 + var streamRow = streamsTable.CreateRow(mediaSymbol.SourceLineNumbers);
242 + streamRow[0] = mediaSymbol.Cabinet.Substring(1);
243 streamRow[1] = resolvedCabinet.Path;
244 }
245 else
246 {
247 - var trackDestination = this.BackendHelper.TrackFile(Path.Combine(cabinetDir, mediaTuple.Cabinet), TrackedFileType.Final, mediaTuple.SourceLineNumbers);
247 + var trackDestination = this.BackendHelper.TrackFile(Path.Combine(cabinetDir, mediaSymbol.Cabinet), TrackedFileType.Final, mediaSymbol.SourceLineNumbers);
248 this.trackedFiles.Add(trackDestination);
249
250 - var transfer = this.BackendHelper.CreateFileTransfer(resolvedCabinet.Path, trackDestination.Path, resolvedCabinet.BuildOption == CabinetBuildOption.BuildAndMove, mediaTuple.SourceLineNumbers);
250 + var transfer = this.BackendHelper.CreateFileTransfer(resolvedCabinet.Path, trackDestination.Path, resolvedCabinet.BuildOption == CabinetBuildOption.BuildAndMove, mediaSymbol.SourceLineNumbers);
251 this.fileTransfers.Add(transfer);
252 }
253
@@ -372,7 +372,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
372 }
373
374 // The new Row has to be inserted just after the last cab in this cabinet split chain according to DiskID Sort
375 - // This is because the FDI Extract requires DiskID of Split Cabinets to be continuous. It Fails otherwise with
375 + // This is because the FDI Extract requires DiskID of Split Cabinets to be continuous. It Fails otherwise with
376 // Error 2350 (FDI Server Error) as next DiskID did not have the right split cabinet during extraction
377 MediaRow newMediaRow = (MediaRow)mediaTable.CreateRow(null);
378 newMediaRow.Cabinet = newCabinetName;
src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs
+4 -4
@@ -8,14 +8,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind
8 using System.IO;
9 using WixToolset.Core.Bind;
10 using WixToolset.Data;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12
13 /// <summary>
14 /// Creates delta patches and updates the appropriate rows to point to the newly generated patches.
15 /// </summary>
16 internal class CreateDeltaPatchesCommand
17 {
18 - public CreateDeltaPatchesCommand(List<FileFacade> fileFacades, string intermediateFolder, WixPatchIdTuple wixPatchId)
18 + public CreateDeltaPatchesCommand(List<FileFacade> fileFacades, string intermediateFolder, WixPatchIdSymbol wixPatchId)
19 {
20 this.FileFacades = fileFacades;
21 this.IntermediateFolder = intermediateFolder;
@@ -24,7 +24,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
24
25 private IEnumerable<FileFacade> FileFacades { get; }
26
27 - private WixPatchIdTuple WixPatchId { get; }
27 + private WixPatchIdSymbol WixPatchId { get; }
28
29 private string IntermediateFolder { get; }
30
@@ -73,7 +73,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
73 }
74 }
75 }
76 -#endif
76 +#endif
77
78 throw new NotImplementedException();
79 }
src/WixToolset.Core.WindowsInstaller/Bind/CreateInstanceTransformsCommand.cs
+21 -21
@@ -7,7 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.Linq;
8 using WixToolset.Core.WindowsInstaller.Msi;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Data.WindowsInstaller;
12 using WixToolset.Data.WindowsInstaller.Rows;
13 using WixToolset.Extensibility.Services;
@@ -33,9 +33,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
33 public void Execute()
34 {
35 // Create and add substorages for instance transforms.
36 - var wixInstanceTransformsTuples = this.Section.Tuples.OfType<WixInstanceTransformsTuple>();
36 + var wixInstanceTransformsSymbols = this.Section.Symbols.OfType<WixInstanceTransformsSymbol>();
37
38 - if (wixInstanceTransformsTuples.Any())
38 + if (wixInstanceTransformsSymbols.Any())
39 {
40 string targetProductCode = null;
41 string targetUpgradeCode = null;
@@ -62,7 +62,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
62 }
63
64 // Index the Instance Component Rows, we'll get the Components rows from the real Component table.
65 - var targetInstanceComponentTable = this.Section.Tuples.OfType<WixInstanceComponentTuple>();
65 + var targetInstanceComponentTable = this.Section.Symbols.OfType<WixInstanceComponentSymbol>();
66 var instanceComponentGuids = targetInstanceComponentTable.ToDictionary(t => t.Id.Id, t => (ComponentRow)null);
67
68 if (instanceComponentGuids.Any())
@@ -79,11 +79,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
79 }
80
81 // Generate the instance transforms
82 - foreach (var instanceTuple in wixInstanceTransformsTuples)
82 + foreach (var instanceSymbol in wixInstanceTransformsSymbols)
83 {
84 - var instanceId = instanceTuple.Id.Id;
84 + var instanceId = instanceSymbol.Id.Id;
85
86 - var instanceTransform = new WindowsInstallerData(instanceTuple.SourceLineNumbers);
86 + var instanceTransform = new WindowsInstallerData(instanceSymbol.SourceLineNumbers);
87 instanceTransform.Type = OutputType.Transform;
88 instanceTransform.Codepage = this.Output.Codepage;
89
@@ -107,49 +107,49 @@ namespace WixToolset.Core.WindowsInstaller.Bind
107 var propertyTable = instanceTransform.EnsureTable(this.TableDefinitions["Property"]);
108
109 // Change the ProductCode property
110 - var productCode = instanceTuple.ProductCode;
110 + var productCode = instanceSymbol.ProductCode;
111 if ("*" == productCode)
112 {
113 productCode = Common.GenerateGuid();
114 }
115
116 - var productCodeRow = propertyTable.CreateRow(instanceTuple.SourceLineNumbers);
116 + var productCodeRow = propertyTable.CreateRow(instanceSymbol.SourceLineNumbers);
117 productCodeRow.Operation = RowOperation.Modify;
118 productCodeRow.Fields[1].Modified = true;
119 productCodeRow[0] = "ProductCode";
120 productCodeRow[1] = productCode;
121
122 // Change the instance property
123 - var instanceIdRow = propertyTable.CreateRow(instanceTuple.SourceLineNumbers);
123 + var instanceIdRow = propertyTable.CreateRow(instanceSymbol.SourceLineNumbers);
124 instanceIdRow.Operation = RowOperation.Modify;
125 instanceIdRow.Fields[1].Modified = true;
126 - instanceIdRow[0] = instanceTuple.PropertyId;
126 + instanceIdRow[0] = instanceSymbol.PropertyId;
127 instanceIdRow[1] = instanceId;
128
129 - if (!String.IsNullOrEmpty(instanceTuple.ProductName))
129 + if (!String.IsNullOrEmpty(instanceSymbol.ProductName))
130 {
131 // Change the ProductName property
132 - var productNameRow = propertyTable.CreateRow(instanceTuple.SourceLineNumbers);
132 + var productNameRow = propertyTable.CreateRow(instanceSymbol.SourceLineNumbers);
133 productNameRow.Operation = RowOperation.Modify;
134 productNameRow.Fields[1].Modified = true;
135 productNameRow[0] = "ProductName";
136 - productNameRow[1] = instanceTuple.ProductName;
136 + productNameRow[1] = instanceSymbol.ProductName;
137 }
138
139 - if (!String.IsNullOrEmpty(instanceTuple.UpgradeCode))
139 + if (!String.IsNullOrEmpty(instanceSymbol.UpgradeCode))
140 {
141 // Change the UpgradeCode property
142 - var upgradeCodeRow = propertyTable.CreateRow(instanceTuple.SourceLineNumbers);
142 + var upgradeCodeRow = propertyTable.CreateRow(instanceSymbol.SourceLineNumbers);
143 upgradeCodeRow.Operation = RowOperation.Modify;
144 upgradeCodeRow.Fields[1].Modified = true;
145 upgradeCodeRow[0] = "UpgradeCode";
146 - upgradeCodeRow[1] = instanceTuple.UpgradeCode;
146 + upgradeCodeRow[1] = instanceSymbol.UpgradeCode;
147
148 // Change the Upgrade table
149 var targetUpgradeTable = this.Output.Tables["Upgrade"];
150 if (null != targetUpgradeTable && 0 <= targetUpgradeTable.Rows.Count)
151 {
152 - var upgradeId = instanceTuple.UpgradeCode;
152 + var upgradeId = instanceSymbol.UpgradeCode;
153 var upgradeTable = instanceTransform.EnsureTable(this.TableDefinitions["Upgrade"]);
154 foreach (var row in targetUpgradeTable.Rows)
155 {
@@ -235,19 +235,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind
235
236 if (!summaryRows.ContainsKey((int)SummaryInformation.Transform.UpdatedPlatformAndLanguage))
237 {
238 - var summaryRow = instanceSummaryInformationTable.CreateRow(instanceTuple.SourceLineNumbers);
238 + var summaryRow = instanceSummaryInformationTable.CreateRow(instanceSymbol.SourceLineNumbers);
239 summaryRow[0] = (int)SummaryInformation.Transform.UpdatedPlatformAndLanguage;
240 summaryRow[1] = targetPlatformAndLanguage;
241 }
242 else if (!summaryRows.ContainsKey((int)SummaryInformation.Transform.ValidationFlags))
243 {
244 - var summaryRow = instanceSummaryInformationTable.CreateRow(instanceTuple.SourceLineNumbers);
244 + var summaryRow = instanceSummaryInformationTable.CreateRow(instanceSymbol.SourceLineNumbers);
245 summaryRow[0] = (int)SummaryInformation.Transform.ValidationFlags;
246 summaryRow[1] = "0";
247 }
248 else if (!summaryRows.ContainsKey((int)SummaryInformation.Transform.Security))
249 {
250 - var summaryRow = instanceSummaryInformationTable.CreateRow(instanceTuple.SourceLineNumbers);
250 + var summaryRow = instanceSummaryInformationTable.CreateRow(instanceSymbol.SourceLineNumbers);
251 summaryRow[0] = (int)SummaryInformation.Transform.Security;
252 summaryRow[1] = "4";
253 }
src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
+537 -537
@@ -7,7 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.Globalization;
8 using System.Linq;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Data.WindowsInstaller;
12 using WixToolset.Data.WindowsInstaller.Rows;
13 using WixToolset.Extensibility;
@@ -38,7 +38,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
38
39 public void Execute()
40 {
41 - this.Output = new WindowsInstallerData(this.Section.Tuples.First().SourceLineNumbers)
41 + this.Output = new WindowsInstallerData(this.Section.Symbols.First().SourceLineNumbers)
42 {
43 Codepage = this.Section.Codepage,
44 Type = SectionTypeToOutputType(this.Section.Type)
@@ -49,388 +49,388 @@ namespace WixToolset.Core.WindowsInstaller.Bind
49
50 private void AddSectionToOutput()
51 {
52 - var cellsByTableAndRowId = new Dictionary<string, List<WixCustomTableCellTuple>>();
52 + var cellsByTableAndRowId = new Dictionary<string, List<WixCustomTableCellSymbol>>();
53
54 - foreach (var tuple in this.Section.Tuples)
54 + foreach (var symbol in this.Section.Symbols)
55 {
56 - var unknownTuple = false;
57 - switch (tuple.Definition.Type)
56 + var unknownSymbol = false;
57 + switch (symbol.Definition.Type)
58 {
59 - case TupleDefinitionType.AppSearch:
60 - this.AddTupleDefaultly(tuple);
59 + case SymbolDefinitionType.AppSearch:
60 + this.AddSymbolDefaultly(symbol);
61 this.Output.EnsureTable(this.TableDefinitions["Signature"]);
62 break;
63
64 - case TupleDefinitionType.Assembly:
65 - this.AddAssemblyTuple((AssemblyTuple)tuple);
64 + case SymbolDefinitionType.Assembly:
65 + this.AddAssemblySymbol((AssemblySymbol)symbol);
66 break;
67
68 - case TupleDefinitionType.BBControl:
69 - this.AddBBControlTuple((BBControlTuple)tuple);
68 + case SymbolDefinitionType.BBControl:
69 + this.AddBBControlSymbol((BBControlSymbol)symbol);
70 break;
71
72 - case TupleDefinitionType.Class:
73 - this.AddClassTuple((ClassTuple)tuple);
72 + case SymbolDefinitionType.Class:
73 + this.AddClassSymbol((ClassSymbol)symbol);
74 break;
75
76 - case TupleDefinitionType.Control:
77 - this.AddControlTuple((ControlTuple)tuple);
76 + case SymbolDefinitionType.Control:
77 + this.AddControlSymbol((ControlSymbol)symbol);
78 break;
79
80 - case TupleDefinitionType.Component:
81 - this.AddComponentTuple((ComponentTuple)tuple);
80 + case SymbolDefinitionType.Component:
81 + this.AddComponentSymbol((ComponentSymbol)symbol);
82 break;
83
84 - case TupleDefinitionType.CustomAction:
85 - this.AddCustomActionTuple((CustomActionTuple)tuple);
84 + case SymbolDefinitionType.CustomAction:
85 + this.AddCustomActionSymbol((CustomActionSymbol)symbol);
86 break;
87
88 - case TupleDefinitionType.Dialog:
89 - this.AddDialogTuple((DialogTuple)tuple);
88 + case SymbolDefinitionType.Dialog:
89 + this.AddDialogSymbol((DialogSymbol)symbol);
90 break;
91
92 - case TupleDefinitionType.Directory:
93 - this.AddDirectoryTuple((DirectoryTuple)tuple);
92 + case SymbolDefinitionType.Directory:
93 + this.AddDirectorySymbol((DirectorySymbol)symbol);
94 break;
95
96 - case TupleDefinitionType.Environment:
97 - this.AddEnvironmentTuple((EnvironmentTuple)tuple);
96 + case SymbolDefinitionType.Environment:
97 + this.AddEnvironmentSymbol((EnvironmentSymbol)symbol);
98 break;
99
100 - case TupleDefinitionType.Error:
101 - this.AddErrorTuple((ErrorTuple)tuple);
100 + case SymbolDefinitionType.Error:
101 + this.AddErrorSymbol((ErrorSymbol)symbol);
102 break;
103
104 - case TupleDefinitionType.Feature:
105 - this.AddFeatureTuple((FeatureTuple)tuple);
104 + case SymbolDefinitionType.Feature:
105 + this.AddFeatureSymbol((FeatureSymbol)symbol);
106 break;
107
108 - case TupleDefinitionType.File:
109 - this.AddFileTuple((FileTuple)tuple);
108 + case SymbolDefinitionType.File:
109 + this.AddFileSymbol((FileSymbol)symbol);
110 break;
111
112 - case TupleDefinitionType.IniFile:
113 - this.AddIniFileTuple((IniFileTuple)tuple);
112 + case SymbolDefinitionType.IniFile:
113 + this.AddIniFileSymbol((IniFileSymbol)symbol);
114 break;
115
116 - case TupleDefinitionType.Media:
117 - this.AddMediaTuple((MediaTuple)tuple);
116 + case SymbolDefinitionType.Media:
117 + this.AddMediaSymbol((MediaSymbol)symbol);
118 break;
119
120 - case TupleDefinitionType.ModuleConfiguration:
121 - this.AddModuleConfigurationTuple((ModuleConfigurationTuple)tuple);
120 + case SymbolDefinitionType.ModuleConfiguration:
121 + this.AddModuleConfigurationSymbol((ModuleConfigurationSymbol)symbol);
122 break;
123
124 - case TupleDefinitionType.MsiEmbeddedUI:
125 - this.AddMsiEmbeddedUITuple((MsiEmbeddedUITuple)tuple);
124 + case SymbolDefinitionType.MsiEmbeddedUI:
125 + this.AddMsiEmbeddedUISymbol((MsiEmbeddedUISymbol)symbol);
126 break;
127
128 - case TupleDefinitionType.MsiServiceConfig:
129 - this.AddMsiServiceConfigTuple((MsiServiceConfigTuple)tuple);
128 + case SymbolDefinitionType.MsiServiceConfig:
129 + this.AddMsiServiceConfigSymbol((MsiServiceConfigSymbol)symbol);
130 break;
131
132 - case TupleDefinitionType.MsiServiceConfigFailureActions:
133 - this.AddMsiServiceConfigFailureActionsTuple((MsiServiceConfigFailureActionsTuple)tuple);
132 + case SymbolDefinitionType.MsiServiceConfigFailureActions:
133 + this.AddMsiServiceConfigFailureActionsSymbol((MsiServiceConfigFailureActionsSymbol)symbol);
134 break;
135
136 - case TupleDefinitionType.MoveFile:
137 - this.AddMoveFileTuple((MoveFileTuple)tuple);
136 + case SymbolDefinitionType.MoveFile:
137 + this.AddMoveFileSymbol((MoveFileSymbol)symbol);
138 break;
139
140 - case TupleDefinitionType.ProgId:
141 - this.AddTupleDefaultly(tuple);
140 + case SymbolDefinitionType.ProgId:
141 + this.AddSymbolDefaultly(symbol);
142 this.Output.EnsureTable(this.TableDefinitions["Extension"]);
143 break;
144
145 - case TupleDefinitionType.Property:
146 - this.AddPropertyTuple((PropertyTuple)tuple);
145 + case SymbolDefinitionType.Property:
146 + this.AddPropertySymbol((PropertySymbol)symbol);
147 break;
148
149 - case TupleDefinitionType.RemoveFile:
150 - this.AddRemoveFileTuple((RemoveFileTuple)tuple);
149 + case SymbolDefinitionType.RemoveFile:
150 + this.AddRemoveFileSymbol((RemoveFileSymbol)symbol);
151 break;
152
153 - case TupleDefinitionType.Registry:
154 - this.AddRegistryTuple((RegistryTuple)tuple);
153 + case SymbolDefinitionType.Registry:
154 + this.AddRegistrySymbol((RegistrySymbol)symbol);
155 break;
156
157 - case TupleDefinitionType.RegLocator:
158 - this.AddRegLocatorTuple((RegLocatorTuple)tuple);
157 + case SymbolDefinitionType.RegLocator:
158 + this.AddRegLocatorSymbol((RegLocatorSymbol)symbol);
159 break;
160
161 - case TupleDefinitionType.RemoveRegistry:
162 - this.AddRemoveRegistryTuple((RemoveRegistryTuple)tuple);
161 + case SymbolDefinitionType.RemoveRegistry:
162 + this.AddRemoveRegistrySymbol((RemoveRegistrySymbol)symbol);
163 break;
164
165 - case TupleDefinitionType.ServiceControl:
166 - this.AddServiceControlTuple((ServiceControlTuple)tuple);
165 + case SymbolDefinitionType.ServiceControl:
166 + this.AddServiceControlSymbol((ServiceControlSymbol)symbol);
167 break;
168
169 - case TupleDefinitionType.ServiceInstall:
170 - this.AddServiceInstallTuple((ServiceInstallTuple)tuple);
169 + case SymbolDefinitionType.ServiceInstall:
170 + this.AddServiceInstallSymbol((ServiceInstallSymbol)symbol);
171 break;
172
173 - case TupleDefinitionType.Shortcut:
174 - this.AddShortcutTuple((ShortcutTuple)tuple);
173 + case SymbolDefinitionType.Shortcut:
174 + this.AddShortcutSymbol((ShortcutSymbol)symbol);
175 break;
176
177 - case TupleDefinitionType.TextStyle:
178 - this.AddTextStyleTuple((TextStyleTuple)tuple);
177 + case SymbolDefinitionType.TextStyle:
178 + this.AddTextStyleSymbol((TextStyleSymbol)symbol);
179 break;
180
181 - case TupleDefinitionType.Upgrade:
182 - this.AddUpgradeTuple((UpgradeTuple)tuple);
181 + case SymbolDefinitionType.Upgrade:
182 + this.AddUpgradeSymbol((UpgradeSymbol)symbol);
183 break;
184
185 - case TupleDefinitionType.WixAction:
186 - this.AddWixActionTuple((WixActionTuple)tuple);
185 + case SymbolDefinitionType.WixAction:
186 + this.AddWixActionSymbol((WixActionSymbol)symbol);
187 break;
188
189 - case TupleDefinitionType.WixCustomTableCell:
190 - this.IndexCustomTableCellTuple((WixCustomTableCellTuple)tuple, cellsByTableAndRowId);
189 + case SymbolDefinitionType.WixCustomTableCell:
190 + this.IndexCustomTableCellSymbol((WixCustomTableCellSymbol)symbol, cellsByTableAndRowId);
191 break;
192
193 - case TupleDefinitionType.WixEnsureTable:
194 - this.AddWixEnsureTableTuple((WixEnsureTableTuple)tuple);
193 + case SymbolDefinitionType.WixEnsureTable:
194 + this.AddWixEnsureTableSymbol((WixEnsureTableSymbol)symbol);
195 break;
196
197 - // Tuples used internally and are not added to the output.
198 - case TupleDefinitionType.WixBuildInfo:
199 - case TupleDefinitionType.WixBindUpdatedFiles:
200 - case TupleDefinitionType.WixComponentGroup:
201 - case TupleDefinitionType.WixComplexReference:
202 - case TupleDefinitionType.WixDeltaPatchFile:
203 - case TupleDefinitionType.WixDeltaPatchSymbolPaths:
204 - case TupleDefinitionType.WixFragment:
205 - case TupleDefinitionType.WixFeatureGroup:
206 - case TupleDefinitionType.WixInstanceComponent:
207 - case TupleDefinitionType.WixInstanceTransforms:
208 - case TupleDefinitionType.WixFeatureModules:
209 - case TupleDefinitionType.WixGroup:
210 - case TupleDefinitionType.WixMediaTemplate:
211 - case TupleDefinitionType.WixMerge:
212 - case TupleDefinitionType.WixOrdering:
213 - case TupleDefinitionType.WixPatchBaseline:
214 - case TupleDefinitionType.WixPatchFamilyGroup:
215 - case TupleDefinitionType.WixPatchId:
216 - case TupleDefinitionType.WixPatchRef:
217 - case TupleDefinitionType.WixPatchTarget:
218 - case TupleDefinitionType.WixProperty:
219 - case TupleDefinitionType.WixSimpleReference:
220 - case TupleDefinitionType.WixSuppressAction:
221 - case TupleDefinitionType.WixSuppressModularization:
222 - case TupleDefinitionType.WixUI:
223 - case TupleDefinitionType.WixVariable:
197 + // Symbols used internally and are not added to the output.
198 + case SymbolDefinitionType.WixBuildInfo:
199 + case SymbolDefinitionType.WixBindUpdatedFiles:
200 + case SymbolDefinitionType.WixComponentGroup:
201 + case SymbolDefinitionType.WixComplexReference:
202 + case SymbolDefinitionType.WixDeltaPatchFile:
203 + case SymbolDefinitionType.WixDeltaPatchSymbolPaths:
204 + case SymbolDefinitionType.WixFragment:
205 + case SymbolDefinitionType.WixFeatureGroup:
206 + case SymbolDefinitionType.WixInstanceComponent:
207 + case SymbolDefinitionType.WixInstanceTransforms:
208 + case SymbolDefinitionType.WixFeatureModules:
209 + case SymbolDefinitionType.WixGroup:
210 + case SymbolDefinitionType.WixMediaTemplate:
211 + case SymbolDefinitionType.WixMerge:
212 + case SymbolDefinitionType.WixOrdering:
213 + case SymbolDefinitionType.WixPatchBaseline:
214 + case SymbolDefinitionType.WixPatchFamilyGroup:
215 + case SymbolDefinitionType.WixPatchId:
216 + case SymbolDefinitionType.WixPatchRef:
217 + case SymbolDefinitionType.WixPatchTarget:
218 + case SymbolDefinitionType.WixProperty:
219 + case SymbolDefinitionType.WixSimpleReference:
220 + case SymbolDefinitionType.WixSuppressAction:
221 + case SymbolDefinitionType.WixSuppressModularization:
222 + case SymbolDefinitionType.WixUI:
223 + case SymbolDefinitionType.WixVariable:
224 break;
225
226 // Already processed by LoadTableDefinitions.
227 - case TupleDefinitionType.WixCustomTable:
228 - case TupleDefinitionType.WixCustomTableColumn:
227 + case SymbolDefinitionType.WixCustomTable:
228 + case SymbolDefinitionType.WixCustomTableColumn:
229 break;
230
231 - case TupleDefinitionType.MustBeFromAnExtension:
232 - unknownTuple = !this.AddTupleFromExtension(tuple);
231 + case SymbolDefinitionType.MustBeFromAnExtension:
232 + unknownSymbol = !this.AddSymbolFromExtension(symbol);
233 break;
234
235 default:
236 - unknownTuple = !this.AddTupleDefaultly(tuple);
236 + unknownSymbol = !this.AddSymbolDefaultly(symbol);
237 break;
238 }
239
240 - if (unknownTuple)
240 + if (unknownSymbol)
241 {
242 - this.Messaging.Write(WarningMessages.TupleNotTranslatedToOutput(tuple));
242 + this.Messaging.Write(WarningMessages.SymbolNotTranslatedToOutput(symbol));
243 }
244 }
245
246 - this.AddIndexedCellTuples(cellsByTableAndRowId);
246 + this.AddIndexedCellSymbols(cellsByTableAndRowId);
247 }
248
249 - private void AddAssemblyTuple(AssemblyTuple tuple)
249 + private void AddAssemblySymbol(AssemblySymbol symbol)
250 {
251 - var attributes = tuple.Type == AssemblyType.Win32Assembly ? 1 : (int?)null;
251 + var attributes = symbol.Type == AssemblyType.Win32Assembly ? 1 : (int?)null;
252
253 - var row = this.CreateRow(tuple, "MsiAssembly");
254 - row[0] = tuple.ComponentRef;
255 - row[1] = tuple.FeatureRef;
256 - row[2] = tuple.ManifestFileRef;
257 - row[3] = tuple.ApplicationFileRef;
253 + var row = this.CreateRow(symbol, "MsiAssembly");
254 + row[0] = symbol.ComponentRef;
255 + row[1] = symbol.FeatureRef;
256 + row[2] = symbol.ManifestFileRef;
257 + row[3] = symbol.ApplicationFileRef;
258 row[4] = attributes;
259 }
260
261 - private void AddBBControlTuple(BBControlTuple tuple)
261 + private void AddBBControlSymbol(BBControlSymbol symbol)
262 {
263 - var attributes = tuple.Attributes;
264 - attributes |= tuple.Enabled ? WindowsInstallerConstants.MsidbControlAttributesEnabled : 0;
265 - attributes |= tuple.Indirect ? WindowsInstallerConstants.MsidbControlAttributesIndirect : 0;
266 - attributes |= tuple.Integer ? WindowsInstallerConstants.MsidbControlAttributesInteger : 0;
267 - attributes |= tuple.LeftScroll ? WindowsInstallerConstants.MsidbControlAttributesLeftScroll : 0;
268 - attributes |= tuple.RightAligned ? WindowsInstallerConstants.MsidbControlAttributesRightAligned : 0;
269 - attributes |= tuple.RightToLeft ? WindowsInstallerConstants.MsidbControlAttributesRTLRO : 0;
270 - attributes |= tuple.Sunken ? WindowsInstallerConstants.MsidbControlAttributesSunken : 0;
271 - attributes |= tuple.Visible ? WindowsInstallerConstants.MsidbControlAttributesVisible : 0;
272 -
273 - var row = this.CreateRow(tuple, "BBControl");
274 - row[0] = tuple.BillboardRef;
275 - row[1] = tuple.BBControl;
276 - row[2] = tuple.Type;
277 - row[3] = tuple.X;
278 - row[4] = tuple.Y;
279 - row[5] = tuple.Width;
280 - row[6] = tuple.Height;
263 + var attributes = symbol.Attributes;
264 + attributes |= symbol.Enabled ? WindowsInstallerConstants.MsidbControlAttributesEnabled : 0;
265 + attributes |= symbol.Indirect ? WindowsInstallerConstants.MsidbControlAttributesIndirect : 0;
266 + attributes |= symbol.Integer ? WindowsInstallerConstants.MsidbControlAttributesInteger : 0;
267 + attributes |= symbol.LeftScroll ? WindowsInstallerConstants.MsidbControlAttributesLeftScroll : 0;
268 + attributes |= symbol.RightAligned ? WindowsInstallerConstants.MsidbControlAttributesRightAligned : 0;
269 + attributes |= symbol.RightToLeft ? WindowsInstallerConstants.MsidbControlAttributesRTLRO : 0;
270 + attributes |= symbol.Sunken ? WindowsInstallerConstants.MsidbControlAttributesSunken : 0;
271 + attributes |= symbol.Visible ? WindowsInstallerConstants.MsidbControlAttributesVisible : 0;
272 +
273 + var row = this.CreateRow(symbol, "BBControl");
274 + row[0] = symbol.BillboardRef;
275 + row[1] = symbol.BBControl;
276 + row[2] = symbol.Type;
277 + row[3] = symbol.X;
278 + row[4] = symbol.Y;
279 + row[5] = symbol.Width;
280 + row[6] = symbol.Height;
281 row[7] = attributes;
282 - row[8] = tuple.Text;
282 + row[8] = symbol.Text;
283 }
284
285 - private void AddClassTuple(ClassTuple tuple)
285 + private void AddClassSymbol(ClassSymbol symbol)
286 {
287 - var row = this.CreateRow(tuple, "Class");
288 - row[0] = tuple.CLSID;
289 - row[1] = tuple.Context;
290 - row[2] = tuple.ComponentRef;
291 - row[3] = tuple.DefaultProgIdRef;
292 - row[4] = tuple.Description;
293 - row[5] = tuple.AppIdRef;
294 - row[6] = tuple.FileTypeMask;
295 - row[7] = tuple.IconRef;
296 - row[8] = tuple.IconIndex;
297 - row[9] = tuple.DefInprocHandler;
298 - row[10] = tuple.Argument;
299 - row[11] = tuple.FeatureRef;
300 - row[12] = tuple.RelativePath ? (int?)1 : null;
287 + var row = this.CreateRow(symbol, "Class");
288 + row[0] = symbol.CLSID;
289 + row[1] = symbol.Context;
290 + row[2] = symbol.ComponentRef;
291 + row[3] = symbol.DefaultProgIdRef;
292 + row[4] = symbol.Description;
293 + row[5] = symbol.AppIdRef;
294 + row[6] = symbol.FileTypeMask;
295 + row[7] = symbol.IconRef;
296 + row[8] = symbol.IconIndex;
297 + row[9] = symbol.DefInprocHandler;
298 + row[10] = symbol.Argument;
299 + row[11] = symbol.FeatureRef;
300 + row[12] = symbol.RelativePath ? (int?)1 : null;
301 }
302
303 - private void AddControlTuple(ControlTuple tuple)
303 + private void AddControlSymbol(ControlSymbol symbol)
304 {
305 - var text = tuple.Text;
306 - var attributes = tuple.Attributes;
307 - attributes |= tuple.Enabled ? WindowsInstallerConstants.MsidbControlAttributesEnabled : 0;
308 - attributes |= tuple.Indirect ? WindowsInstallerConstants.MsidbControlAttributesIndirect : 0;
309 - attributes |= tuple.Integer ? WindowsInstallerConstants.MsidbControlAttributesInteger : 0;
310 - attributes |= tuple.LeftScroll ? WindowsInstallerConstants.MsidbControlAttributesLeftScroll : 0;
311 - attributes |= tuple.RightAligned ? WindowsInstallerConstants.MsidbControlAttributesRightAligned : 0;
312 - attributes |= tuple.RightToLeft ? WindowsInstallerConstants.MsidbControlAttributesRTLRO : 0;
313 - attributes |= tuple.Sunken ? WindowsInstallerConstants.MsidbControlAttributesSunken : 0;
314 - attributes |= tuple.Visible ? WindowsInstallerConstants.MsidbControlAttributesVisible : 0;
305 + var text = symbol.Text;
306 + var attributes = symbol.Attributes;
307 + attributes |= symbol.Enabled ? WindowsInstallerConstants.MsidbControlAttributesEnabled : 0;
308 + attributes |= symbol.Indirect ? WindowsInstallerConstants.MsidbControlAttributesIndirect : 0;
309 + attributes |= symbol.Integer ? WindowsInstallerConstants.MsidbControlAttributesInteger : 0;
310 + attributes |= symbol.LeftScroll ? WindowsInstallerConstants.MsidbControlAttributesLeftScroll : 0;
311 + attributes |= symbol.RightAligned ? WindowsInstallerConstants.MsidbControlAttributesRightAligned : 0;
312 + attributes |= symbol.RightToLeft ? WindowsInstallerConstants.MsidbControlAttributesRTLRO : 0;
313 + attributes |= symbol.Sunken ? WindowsInstallerConstants.MsidbControlAttributesSunken : 0;
314 + attributes |= symbol.Visible ? WindowsInstallerConstants.MsidbControlAttributesVisible : 0;
315
316 // If we're tracking disk space, and this is a non-FormatSize Text control,
317 // and the text attribute starts with '[' and ends with ']', add a space.
318 // It is not necessary for the whole string to be a property, just those
319 // two characters matter.
320 - if (tuple.TrackDiskSpace &&
321 - "Text" == tuple.Type &&
320 + if (symbol.TrackDiskSpace &&
321 + "Text" == symbol.Type &&
322 WindowsInstallerConstants.MsidbControlAttributesFormatSize != (attributes & WindowsInstallerConstants.MsidbControlAttributesFormatSize) &&
323 null != text && text.StartsWith("[", StringComparison.Ordinal) && text.EndsWith("]", StringComparison.Ordinal))
324 {
325 text = String.Concat(text, " ");
326 }
327
328 - var row = this.CreateRow(tuple, "Control");
329 - row[0] = tuple.DialogRef;
330 - row[1] = tuple.Control;
331 - row[2] = tuple.Type;
332 - row[3] = tuple.X;
333 - row[4] = tuple.Y;
334 - row[5] = tuple.Width;
335 - row[6] = tuple.Height;
328 + var row = this.CreateRow(symbol, "Control");
329 + row[0] = symbol.DialogRef;
330 + row[1] = symbol.Control;
331 + row[2] = symbol.Type;
332 + row[3] = symbol.X;
333 + row[4] = symbol.Y;
334 + row[5] = symbol.Width;
335 + row[6] = symbol.Height;
336 row[7] = attributes;
337 row[8] = text;
338 - row[9] = tuple.NextControlRef;
339 - row[10] = tuple.Help;
338 + row[9] = symbol.NextControlRef;
339 + row[10] = symbol.Help;
340 }
341
342 - private void AddComponentTuple(ComponentTuple tuple)
342 + private void AddComponentSymbol(ComponentSymbol symbol)
343 {
344 - var attributes = ComponentLocation.Either == tuple.Location ? WindowsInstallerConstants.MsidbComponentAttributesOptional : 0;
345 - attributes |= ComponentLocation.SourceOnly == tuple.Location ? WindowsInstallerConstants.MsidbComponentAttributesSourceOnly : 0;
346 - attributes |= ComponentKeyPathType.Registry == tuple.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesRegistryKeyPath : 0;
347 - attributes |= ComponentKeyPathType.OdbcDataSource == tuple.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesODBCDataSource : 0;
348 - attributes |= tuple.DisableRegistryReflection ? WindowsInstallerConstants.MsidbComponentAttributesDisableRegistryReflection : 0;
349 - attributes |= tuple.NeverOverwrite ? WindowsInstallerConstants.MsidbComponentAttributesNeverOverwrite : 0;
350 - attributes |= tuple.Permanent ? WindowsInstallerConstants.MsidbComponentAttributesPermanent : 0;
351 - attributes |= tuple.SharedDllRefCount ? WindowsInstallerConstants.MsidbComponentAttributesSharedDllRefCount : 0;
352 - attributes |= tuple.Shared ? WindowsInstallerConstants.MsidbComponentAttributesShared : 0;
353 - attributes |= tuple.Transitive ? WindowsInstallerConstants.MsidbComponentAttributesTransitive : 0;
354 - attributes |= tuple.UninstallWhenSuperseded ? WindowsInstallerConstants.MsidbComponentAttributesUninstallOnSupersedence : 0;
355 - attributes |= tuple.Win64 ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0;
356 -
357 - var row = this.CreateRow(tuple, "Component");
358 - row[0] = tuple.Id.Id;
359 - row[1] = tuple.ComponentId;
360 - row[2] = tuple.DirectoryRef;
344 + var attributes = ComponentLocation.Either == symbol.Location ? WindowsInstallerConstants.MsidbComponentAttributesOptional : 0;
345 + attributes |= ComponentLocation.SourceOnly == symbol.Location ? WindowsInstallerConstants.MsidbComponentAttributesSourceOnly : 0;
346 + attributes |= ComponentKeyPathType.Registry == symbol.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesRegistryKeyPath : 0;
347 + attributes |= ComponentKeyPathType.OdbcDataSource == symbol.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesODBCDataSource : 0;
348 + attributes |= symbol.DisableRegistryReflection ? WindowsInstallerConstants.MsidbComponentAttributesDisableRegistryReflection : 0;
349 + attributes |= symbol.NeverOverwrite ? WindowsInstallerConstants.MsidbComponentAttributesNeverOverwrite : 0;
350 + attributes |= symbol.Permanent ? WindowsInstallerConstants.MsidbComponentAttributesPermanent : 0;
351 + attributes |= symbol.SharedDllRefCount ? WindowsInstallerConstants.MsidbComponentAttributesSharedDllRefCount : 0;
352 + attributes |= symbol.Shared ? WindowsInstallerConstants.MsidbComponentAttributesShared : 0;
353 + attributes |= symbol.Transitive ? WindowsInstallerConstants.MsidbComponentAttributesTransitive : 0;
354 + attributes |= symbol.UninstallWhenSuperseded ? WindowsInstallerConstants.MsidbComponentAttributesUninstallOnSupersedence : 0;
355 + attributes |= symbol.Win64 ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0;
356 +
357 + var row = this.CreateRow(symbol, "Component");
358 + row[0] = symbol.Id.Id;
359 + row[1] = symbol.ComponentId;
360 + row[2] = symbol.DirectoryRef;
361 row[3] = attributes;
362 - row[4] = tuple.Condition;
363 - row[5] = tuple.KeyPath;
362 + row[4] = symbol.Condition;
363 + row[5] = symbol.KeyPath;
364 }
365
366 - private void AddCustomActionTuple(CustomActionTuple tuple)
366 + private void AddCustomActionSymbol(CustomActionSymbol symbol)
367 {
368 - var type = tuple.Win64 ? WindowsInstallerConstants.MsidbCustomActionType64BitScript : 0;
369 - type |= tuple.IgnoreResult ? WindowsInstallerConstants.MsidbCustomActionTypeContinue : 0;
370 - type |= tuple.Hidden ? WindowsInstallerConstants.MsidbCustomActionTypeHideTarget : 0;
371 - type |= tuple.Async ? WindowsInstallerConstants.MsidbCustomActionTypeAsync : 0;
372 - type |= CustomActionExecutionType.FirstSequence == tuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeFirstSequence : 0;
373 - type |= CustomActionExecutionType.OncePerProcess == tuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeOncePerProcess : 0;
374 - type |= CustomActionExecutionType.ClientRepeat == tuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeClientRepeat : 0;
375 - type |= CustomActionExecutionType.Deferred == tuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript : 0;
376 - type |= CustomActionExecutionType.Rollback == tuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeRollback : 0;
377 - type |= CustomActionExecutionType.Commit == tuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeCommit : 0;
378 - type |= CustomActionSourceType.File == tuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeSourceFile : 0;
379 - type |= CustomActionSourceType.Directory == tuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeDirectory : 0;
380 - type |= CustomActionSourceType.Property == tuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeProperty : 0;
381 - type |= CustomActionTargetType.Dll == tuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeDll : 0;
382 - type |= CustomActionTargetType.Exe == tuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeExe : 0;
383 - type |= CustomActionTargetType.TextData == tuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeTextData : 0;
384 - type |= CustomActionTargetType.JScript == tuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeJScript : 0;
385 - type |= CustomActionTargetType.VBScript == tuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeVBScript : 0;
368 + var type = symbol.Win64 ? WindowsInstallerConstants.MsidbCustomActionType64BitScript : 0;
369 + type |= symbol.IgnoreResult ? WindowsInstallerConstants.MsidbCustomActionTypeContinue : 0;
370 + type |= symbol.Hidden ? WindowsInstallerConstants.MsidbCustomActionTypeHideTarget : 0;
371 + type |= symbol.Async ? WindowsInstallerConstants.MsidbCustomActionTypeAsync : 0;
372 + type |= CustomActionExecutionType.FirstSequence == symbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeFirstSequence : 0;
373 + type |= CustomActionExecutionType.OncePerProcess == symbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeOncePerProcess : 0;
374 + type |= CustomActionExecutionType.ClientRepeat == symbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeClientRepeat : 0;
375 + type |= CustomActionExecutionType.Deferred == symbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript : 0;
376 + type |= CustomActionExecutionType.Rollback == symbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeRollback : 0;
377 + type |= CustomActionExecutionType.Commit == symbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeCommit : 0;
378 + type |= CustomActionSourceType.File == symbol.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeSourceFile : 0;
379 + type |= CustomActionSourceType.Directory == symbol.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeDirectory : 0;
380 + type |= CustomActionSourceType.Property == symbol.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeProperty : 0;
381 + type |= CustomActionTargetType.Dll == symbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeDll : 0;
382 + type |= CustomActionTargetType.Exe == symbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeExe : 0;
383 + type |= CustomActionTargetType.TextData == symbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeTextData : 0;
384 + type |= CustomActionTargetType.JScript == symbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeJScript : 0;
385 + type |= CustomActionTargetType.VBScript == symbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeVBScript : 0;
386
387 if (WindowsInstallerConstants.MsidbCustomActionTypeInScript == (type & WindowsInstallerConstants.MsidbCustomActionTypeInScript))
388 {
389 - type |= tuple.Impersonate ? 0 : WindowsInstallerConstants.MsidbCustomActionTypeNoImpersonate;
390 - type |= tuple.TSAware ? WindowsInstallerConstants.MsidbCustomActionTypeTSAware : 0;
389 + type |= symbol.Impersonate ? 0 : WindowsInstallerConstants.MsidbCustomActionTypeNoImpersonate;
390 + type |= symbol.TSAware ? WindowsInstallerConstants.MsidbCustomActionTypeTSAware : 0;
391 }
392
393 - var row = this.CreateRow(tuple, "CustomAction");
394 - row[0] = tuple.Id.Id;
393 + var row = this.CreateRow(symbol, "CustomAction");
394 + row[0] = symbol.Id.Id;
395 row[1] = type;
396 - row[2] = tuple.Source;
397 - row[3] = tuple.Target;
398 - row[4] = tuple.PatchUninstall ? (int?)WindowsInstallerConstants.MsidbCustomActionTypePatchUninstall : null;
396 + row[2] = symbol.Source;
397 + row[3] = symbol.Target;
398 + row[4] = symbol.PatchUninstall ? (int?)WindowsInstallerConstants.MsidbCustomActionTypePatchUninstall : null;
399 }
400
401 - private void AddDialogTuple(DialogTuple tuple)
401 + private void AddDialogSymbol(DialogSymbol symbol)
402 {
403 - var attributes = tuple.Visible ? WindowsInstallerConstants.MsidbDialogAttributesVisible : 0;
404 - attributes |= tuple.Modal ? WindowsInstallerConstants.MsidbDialogAttributesModal : 0;
405 - attributes |= tuple.Minimize ? WindowsInstallerConstants.MsidbDialogAttributesMinimize : 0;
406 - attributes |= tuple.CustomPalette ? WindowsInstallerConstants.MsidbDialogAttributesUseCustomPalette : 0;
407 - attributes |= tuple.ErrorDialog ? WindowsInstallerConstants.MsidbDialogAttributesError : 0;
408 - attributes |= tuple.LeftScroll ? WindowsInstallerConstants.MsidbDialogAttributesLeftScroll : 0;
409 - attributes |= tuple.KeepModeless ? WindowsInstallerConstants.MsidbDialogAttributesKeepModeless : 0;
410 - attributes |= tuple.RightAligned ? WindowsInstallerConstants.MsidbDialogAttributesRightAligned : 0;
411 - attributes |= tuple.RightToLeft ? WindowsInstallerConstants.MsidbDialogAttributesRTLRO : 0;
412 - attributes |= tuple.SystemModal ? WindowsInstallerConstants.MsidbDialogAttributesSysModal : 0;
413 - attributes |= tuple.TrackDiskSpace ? WindowsInstallerConstants.MsidbDialogAttributesTrackDiskSpace : 0;
414 -
415 - var row = this.CreateRow(tuple, "Dialog");
416 - row[0] = tuple.Id.Id;
417 - row[1] = tuple.HCentering;
418 - row[2] = tuple.VCentering;
419 - row[3] = tuple.Width;
420 - row[4] = tuple.Height;
403 + var attributes = symbol.Visible ? WindowsInstallerConstants.MsidbDialogAttributesVisible : 0;
404 + attributes |= symbol.Modal ? WindowsInstallerConstants.MsidbDialogAttributesModal : 0;
405 + attributes |= symbol.Minimize ? WindowsInstallerConstants.MsidbDialogAttributesMinimize : 0;
406 + attributes |= symbol.CustomPalette ? WindowsInstallerConstants.MsidbDialogAttributesUseCustomPalette : 0;
407 + attributes |= symbol.ErrorDialog ? WindowsInstallerConstants.MsidbDialogAttributesError : 0;
408 + attributes |= symbol.LeftScroll ? WindowsInstallerConstants.MsidbDialogAttributesLeftScroll : 0;
409 + attributes |= symbol.KeepModeless ? WindowsInstallerConstants.MsidbDialogAttributesKeepModeless : 0;
410 + attributes |= symbol.RightAligned ? WindowsInstallerConstants.MsidbDialogAttributesRightAligned : 0;
411 + attributes |= symbol.RightToLeft ? WindowsInstallerConstants.MsidbDialogAttributesRTLRO : 0;
412 + attributes |= symbol.SystemModal ? WindowsInstallerConstants.MsidbDialogAttributesSysModal : 0;
413 + attributes |= symbol.TrackDiskSpace ? WindowsInstallerConstants.MsidbDialogAttributesTrackDiskSpace : 0;
414 +
415 + var row = this.CreateRow(symbol, "Dialog");
416 + row[0] = symbol.Id.Id;
417 + row[1] = symbol.HCentering;
418 + row[2] = symbol.VCentering;
419 + row[3] = symbol.Width;
420 + row[4] = symbol.Height;
421 row[5] = attributes;
422 - row[6] = tuple.Title;
423 - row[7] = tuple.FirstControlRef;
424 - row[8] = tuple.DefaultControlRef;
425 - row[9] = tuple.CancelControlRef;
422 + row[6] = symbol.Title;
423 + row[7] = symbol.FirstControlRef;
424 + row[8] = symbol.DefaultControlRef;
425 + row[9] = symbol.CancelControlRef;
426
427 this.Output.EnsureTable(this.TableDefinitions["ListBox"]);
428 }
429
430 - private void AddDirectoryTuple(DirectoryTuple tuple)
430 + private void AddDirectorySymbol(DirectorySymbol symbol)
431 {
432 - var sourceName = GetMsiFilenameValue(tuple.SourceShortName, tuple.SourceName);
433 - var targetName = GetMsiFilenameValue(tuple.ShortName, tuple.Name);
432 + var sourceName = GetMsiFilenameValue(symbol.SourceShortName, symbol.SourceName);
433 + var targetName = GetMsiFilenameValue(symbol.ShortName, symbol.Name);
434
435 if (String.IsNullOrEmpty(targetName))
436 {
@@ -439,20 +439,20 @@ namespace WixToolset.Core.WindowsInstaller.Bind
439
440 var defaultDir = String.IsNullOrEmpty(sourceName) ? targetName : targetName + ":" + sourceName;
441
442 - var row = this.CreateRow(tuple, "Directory");
443 - row[0] = tuple.Id.Id;
444 - row[1] = tuple.ParentDirectoryRef;
442 + var row = this.CreateRow(symbol, "Directory");
443 + row[0] = symbol.Id.Id;
444 + row[1] = symbol.ParentDirectoryRef;
445 row[2] = defaultDir;
446 }
447
448 - private void AddEnvironmentTuple(EnvironmentTuple tuple)
448 + private void AddEnvironmentSymbol(EnvironmentSymbol symbol)
449 {
450 var action = String.Empty;
451 - var system = tuple.System ? "*" : String.Empty;
452 - var uninstall = tuple.Permanent ? String.Empty : "-";
453 - var value = tuple.Value;
451 + var system = symbol.System ? "*" : String.Empty;
452 + var uninstall = symbol.Permanent ? String.Empty : "-";
453 + var value = symbol.Value;
454
455 - switch (tuple.Action)
455 + switch (symbol.Action)
456 {
457 case EnvironmentActionType.Create:
458 action = "+";
@@ -465,219 +465,219 @@ namespace WixToolset.Core.WindowsInstaller.Bind
465 break;
466 }
467
468 - switch (tuple.Part)
468 + switch (symbol.Part)
469 {
470 case EnvironmentPartType.First:
471 - value = String.Concat(value, tuple.Separator, "[~]");
471 + value = String.Concat(value, symbol.Separator, "[~]");
472 break;
473 case EnvironmentPartType.Last:
474 - value = String.Concat("[~]", tuple.Separator, value);
474 + value = String.Concat("[~]", symbol.Separator, value);
475 break;
476 }
477
478 - var row = this.CreateRow(tuple, "Environment");
479 - row[0] = tuple.Id.Id;
480 - row[1] = String.Concat(action, uninstall, system, tuple.Name);
478 + var row = this.CreateRow(symbol, "Environment");
479 + row[0] = symbol.Id.Id;
480 + row[1] = String.Concat(action, uninstall, system, symbol.Name);
481 row[2] = value;
482 - row[3] = tuple.ComponentRef;
482 + row[3] = symbol.ComponentRef;
483 }
484
485 - private void AddErrorTuple(ErrorTuple tuple)
485 + private void AddErrorSymbol(ErrorSymbol symbol)
486 {
487 - var row = this.CreateRow(tuple, "Error");
488 - row[0] = Convert.ToInt32(tuple.Id.Id);
489 - row[1] = tuple.Message;
487 + var row = this.CreateRow(symbol, "Error");
488 + row[0] = Convert.ToInt32(symbol.Id.Id);
489 + row[1] = symbol.Message;
490 }
491
492 - private void AddFeatureTuple(FeatureTuple tuple)
492 + private void AddFeatureSymbol(FeatureSymbol symbol)
493 {
494 - var attributes = tuple.DisallowAbsent ? WindowsInstallerConstants.MsidbFeatureAttributesUIDisallowAbsent : 0;
495 - attributes |= tuple.DisallowAdvertise ? WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise : 0;
496 - attributes |= FeatureInstallDefault.FollowParent == tuple.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFollowParent : 0;
497 - attributes |= FeatureInstallDefault.Source == tuple.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorSource : 0;
498 - attributes |= FeatureTypicalDefault.Advertise == tuple.TypicalDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorAdvertise : 0;
499 -
500 - var row = this.CreateRow(tuple, "Feature");
501 - row[0] = tuple.Id.Id;
502 - row[1] = tuple.ParentFeatureRef;
503 - row[2] = tuple.Title;
504 - row[3] = tuple.Description;
505 - row[4] = tuple.Display;
506 - row[5] = tuple.Level;
507 - row[6] = tuple.DirectoryRef;
494 + var attributes = symbol.DisallowAbsent ? WindowsInstallerConstants.MsidbFeatureAttributesUIDisallowAbsent : 0;
495 + attributes |= symbol.DisallowAdvertise ? WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise : 0;
496 + attributes |= FeatureInstallDefault.FollowParent == symbol.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFollowParent : 0;
497 + attributes |= FeatureInstallDefault.Source == symbol.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorSource : 0;
498 + attributes |= FeatureTypicalDefault.Advertise == symbol.TypicalDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorAdvertise : 0;
499 +
500 + var row = this.CreateRow(symbol, "Feature");
501 + row[0] = symbol.Id.Id;
502 + row[1] = symbol.ParentFeatureRef;
503 + row[2] = symbol.Title;
504 + row[3] = symbol.Description;
505 + row[4] = symbol.Display;
506 + row[5] = symbol.Level;
507 + row[6] = symbol.DirectoryRef;
508 row[7] = attributes;
509 }
510
511 - private void AddFileTuple(FileTuple tuple)
511 + private void AddFileSymbol(FileSymbol symbol)
512 {
513 - var row = (FileRow)this.CreateRow(tuple, "File");
514 - row.File = tuple.Id.Id;
515 - row.Component = tuple.ComponentRef;
516 - row.FileName = GetMsiFilenameValue(tuple.ShortName, tuple.Name);
517 - row.FileSize = tuple.FileSize;
518 - row.Version = tuple.Version;
519 - row.Language = tuple.Language;
520 - row.DiskId = tuple.DiskId ?? 1; // TODO: is 1 the correct thing to default here
521 - row.Sequence = tuple.Sequence;
522 - row.Source = tuple.Source.Path;
523 -
524 - var attributes = (tuple.Attributes & FileTupleAttributes.Checksum) == FileTupleAttributes.Checksum ? WindowsInstallerConstants.MsidbFileAttributesChecksum : 0;
525 - attributes |= (tuple.Attributes & FileTupleAttributes.Compressed) == FileTupleAttributes.Compressed ? WindowsInstallerConstants.MsidbFileAttributesCompressed : 0;
526 - attributes |= (tuple.Attributes & FileTupleAttributes.Uncompressed) == FileTupleAttributes.Uncompressed ? WindowsInstallerConstants.MsidbFileAttributesNoncompressed : 0;
527 - attributes |= (tuple.Attributes & FileTupleAttributes.Hidden) == FileTupleAttributes.Hidden ? WindowsInstallerConstants.MsidbFileAttributesHidden : 0;
528 - attributes |= (tuple.Attributes & FileTupleAttributes.ReadOnly) == FileTupleAttributes.ReadOnly ? WindowsInstallerConstants.MsidbFileAttributesReadOnly : 0;
529 - attributes |= (tuple.Attributes & FileTupleAttributes.System) == FileTupleAttributes.System ? WindowsInstallerConstants.MsidbFileAttributesSystem : 0;
530 - attributes |= (tuple.Attributes & FileTupleAttributes.Vital) == FileTupleAttributes.Vital ? WindowsInstallerConstants.MsidbFileAttributesVital : 0;
513 + var row = (FileRow)this.CreateRow(symbol, "File");
514 + row.File = symbol.Id.Id;
515 + row.Component = symbol.ComponentRef;
516 + row.FileName = GetMsiFilenameValue(symbol.ShortName, symbol.Name);
517 + row.FileSize = symbol.FileSize;
518 + row.Version = symbol.Version;
519 + row.Language = symbol.Language;
520 + row.DiskId = symbol.DiskId ?? 1; // TODO: is 1 the correct thing to default here
521 + row.Sequence = symbol.Sequence;
522 + row.Source = symbol.Source.Path;
523 +
524 + var attributes = (symbol.Attributes & FileSymbolAttributes.Checksum) == FileSymbolAttributes.Checksum ? WindowsInstallerConstants.MsidbFileAttributesChecksum : 0;
525 + attributes |= (symbol.Attributes & FileSymbolAttributes.Compressed) == FileSymbolAttributes.Compressed ? WindowsInstallerConstants.MsidbFileAttributesCompressed : 0;
526 + attributes |= (symbol.Attributes & FileSymbolAttributes.Uncompressed) == FileSymbolAttributes.Uncompressed ? WindowsInstallerConstants.MsidbFileAttributesNoncompressed : 0;
527 + attributes |= (symbol.Attributes & FileSymbolAttributes.Hidden) == FileSymbolAttributes.Hidden ? WindowsInstallerConstants.MsidbFileAttributesHidden : 0;
528 + attributes |= (symbol.Attributes & FileSymbolAttributes.ReadOnly) == FileSymbolAttributes.ReadOnly ? WindowsInstallerConstants.MsidbFileAttributesReadOnly : 0;
529 + attributes |= (symbol.Attributes & FileSymbolAttributes.System) == FileSymbolAttributes.System ? WindowsInstallerConstants.MsidbFileAttributesSystem : 0;
530 + attributes |= (symbol.Attributes & FileSymbolAttributes.Vital) == FileSymbolAttributes.Vital ? WindowsInstallerConstants.MsidbFileAttributesVital : 0;
531 row.Attributes = attributes;
532
533 - if (tuple.FontTitle != null)
533 + if (symbol.FontTitle != null)
534 {
535 - var fontRow = this.CreateRow(tuple, "Font");
536 - fontRow[0] = tuple.Id.Id;
537 - fontRow[1] = tuple.FontTitle;
535 + var fontRow = this.CreateRow(symbol, "Font");
536 + fontRow[0] = symbol.Id.Id;
537 + fontRow[1] = symbol.FontTitle;
538 }
539
540 - if (tuple.SelfRegCost.HasValue)
540 + if (symbol.SelfRegCost.HasValue)
541 {
542 - var selfRegRow = this.CreateRow(tuple, "SelfReg");
543 - selfRegRow[0] = tuple.Id.Id;
544 - selfRegRow[1] = tuple.SelfRegCost.Value;
542 + var selfRegRow = this.CreateRow(symbol, "SelfReg");
543 + selfRegRow[0] = symbol.Id.Id;
544 + selfRegRow[1] = symbol.SelfRegCost.Value;
545 }
546 }
547
548 - private void AddIniFileTuple(IniFileTuple tuple)
548 + private void AddIniFileSymbol(IniFileSymbol symbol)
549 {
550 - var tableName = (InifFileActionType.AddLine == tuple.Action || InifFileActionType.AddTag == tuple.Action || InifFileActionType.CreateLine == tuple.Action) ? "IniFile" : "RemoveIniFile";
551 -
552 - var row = this.CreateRow(tuple, tableName);
553 - row[0] = tuple.Id.Id;
554 - row[1] = tuple.FileName;
555 - row[2] = tuple.DirProperty;
556 - row[3] = tuple.Section;
557 - row[4] = tuple.Key;
558 - row[5] = tuple.Value;
559 - row[6] = tuple.Action;
560 - row[7] = tuple.ComponentRef;
550 + var tableName = (InifFileActionType.AddLine == symbol.Action || InifFileActionType.AddTag == symbol.Action || InifFileActionType.CreateLine == symbol.Action) ? "IniFile" : "RemoveIniFile";
551 +
552 + var row = this.CreateRow(symbol, tableName);
553 + row[0] = symbol.Id.Id;
554 + row[1] = symbol.FileName;
555 + row[2] = symbol.DirProperty;
556 + row[3] = symbol.Section;
557 + row[4] = symbol.Key;
558 + row[5] = symbol.Value;
559 + row[6] = symbol.Action;
560 + row[7] = symbol.ComponentRef;
561 }
562
563 - private void AddMediaTuple(MediaTuple tuple)
563 + private void AddMediaSymbol(MediaSymbol symbol)
564 {
565 if (this.Section.Type != SectionType.Module)
566 {
567 - var row = (MediaRow)this.CreateRow(tuple, "Media");
568 - row.DiskId = tuple.DiskId;
569 - row.LastSequence = tuple.LastSequence ?? 0;
570 - row.DiskPrompt = tuple.DiskPrompt;
571 - row.Cabinet = tuple.Cabinet;
572 - row.VolumeLabel = tuple.VolumeLabel;
573 - row.Source = tuple.Source;
567 + var row = (MediaRow)this.CreateRow(symbol, "Media");
568 + row.DiskId = symbol.DiskId;
569 + row.LastSequence = symbol.LastSequence ?? 0;
570 + row.DiskPrompt = symbol.DiskPrompt;
571 + row.Cabinet = symbol.Cabinet;
572 + row.VolumeLabel = symbol.VolumeLabel;
573 + row.Source = symbol.Source;
574 }
575 }
576
577 - private void AddModuleConfigurationTuple(ModuleConfigurationTuple tuple)
577 + private void AddModuleConfigurationSymbol(ModuleConfigurationSymbol symbol)
578 {
579 - var row = this.CreateRow(tuple, "ModuleConfiguration");
580 - row[0] = tuple.Id.Id;
581 - row[1] = tuple.Format;
582 - row[2] = tuple.Type;
583 - row[3] = tuple.ContextData;
584 - row[4] = tuple.DefaultValue;
585 - row[5] = (tuple.KeyNoOrphan ? WindowsInstallerConstants.MsidbMsmConfigurableOptionKeyNoOrphan : 0) |
586 - (tuple.NonNullable ? WindowsInstallerConstants.MsidbMsmConfigurableOptionNonNullable : 0);
587 - row[6] = tuple.DisplayName;
588 - row[7] = tuple.Description;
589 - row[8] = tuple.HelpLocation;
590 - row[9] = tuple.HelpKeyword;
579 + var row = this.CreateRow(symbol, "ModuleConfiguration");
580 + row[0] = symbol.Id.Id;
581 + row[1] = symbol.Format;
582 + row[2] = symbol.Type;
583 + row[3] = symbol.ContextData;
584 + row[4] = symbol.DefaultValue;
585 + row[5] = (symbol.KeyNoOrphan ? WindowsInstallerConstants.MsidbMsmConfigurableOptionKeyNoOrphan : 0) |
586 + (symbol.NonNullable ? WindowsInstallerConstants.MsidbMsmConfigurableOptionNonNullable : 0);
587 + row[6] = symbol.DisplayName;
588 + row[7] = symbol.Description;
589 + row[8] = symbol.HelpLocation;
590 + row[9] = symbol.HelpKeyword;
591 }
592
593 - private void AddMsiEmbeddedUITuple(MsiEmbeddedUITuple tuple)
593 + private void AddMsiEmbeddedUISymbol(MsiEmbeddedUISymbol symbol)
594 {
595 - var attributes = tuple.EntryPoint ? WindowsInstallerConstants.MsidbEmbeddedUI : 0;
596 - attributes |= tuple.SupportsBasicUI ? WindowsInstallerConstants.MsidbEmbeddedHandlesBasic : 0;
595 + var attributes = symbol.EntryPoint ? WindowsInstallerConstants.MsidbEmbeddedUI : 0;
596 + attributes |= symbol.SupportsBasicUI ? WindowsInstallerConstants.MsidbEmbeddedHandlesBasic : 0;
597
598 - var row = this.CreateRow(tuple, "MsiEmbeddedUI");
599 - row[0] = tuple.Id.Id;
600 - row[1] = tuple.FileName;
598 + var row = this.CreateRow(symbol, "MsiEmbeddedUI");
599 + row[0] = symbol.Id.Id;
600 + row[1] = symbol.FileName;
601 row[2] = attributes;
602 - row[3] = tuple.MessageFilter;
603 - row[4] = tuple.Source;
602 + row[3] = symbol.MessageFilter;
603 + row[4] = symbol.Source;
604 }
605
606 - private void AddMsiServiceConfigTuple(MsiServiceConfigTuple tuple)
606 + private void AddMsiServiceConfigSymbol(MsiServiceConfigSymbol symbol)
607 {
608 - var events = tuple.OnInstall ? WindowsInstallerConstants.MsidbServiceConfigEventInstall : 0;
609 - events |= tuple.OnReinstall ? WindowsInstallerConstants.MsidbServiceConfigEventReinstall : 0;
610 - events |= tuple.OnUninstall ? WindowsInstallerConstants.MsidbServiceConfigEventUninstall : 0;
608 + var events = symbol.OnInstall ? WindowsInstallerConstants.MsidbServiceConfigEventInstall : 0;
609 + events |= symbol.OnReinstall ? WindowsInstallerConstants.MsidbServiceConfigEventReinstall : 0;
610 + events |= symbol.OnUninstall ? WindowsInstallerConstants.MsidbServiceConfigEventUninstall : 0;
611
612 - var row = this.CreateRow(tuple, "MsiServiceConfigFailureActions");
613 - row[0] = tuple.Id.Id;
614 - row[1] = tuple.Name;
612 + var row = this.CreateRow(symbol, "MsiServiceConfigFailureActions");
613 + row[0] = symbol.Id.Id;
614 + row[1] = symbol.Name;
615 row[2] = events;
616 - row[3] = tuple.ConfigType;
617 - row[4] = tuple.Argument;
618 - row[5] = tuple.ComponentRef;
616 + row[3] = symbol.ConfigType;
617 + row[4] = symbol.Argument;
618 + row[5] = symbol.ComponentRef;
619 }
620
621 - private void AddMsiServiceConfigFailureActionsTuple(MsiServiceConfigFailureActionsTuple tuple)
621 + private void AddMsiServiceConfigFailureActionsSymbol(MsiServiceConfigFailureActionsSymbol symbol)
622 {
623 - var events = tuple.OnInstall ? WindowsInstallerConstants.MsidbServiceConfigEventInstall : 0;
624 - events |= tuple.OnReinstall ? WindowsInstallerConstants.MsidbServiceConfigEventReinstall : 0;
625 - events |= tuple.OnUninstall ? WindowsInstallerConstants.MsidbServiceConfigEventUninstall : 0;
623 + var events = symbol.OnInstall ? WindowsInstallerConstants.MsidbServiceConfigEventInstall : 0;
624 + events |= symbol.OnReinstall ? WindowsInstallerConstants.MsidbServiceConfigEventReinstall : 0;
625 + events |= symbol.OnUninstall ? WindowsInstallerConstants.MsidbServiceConfigEventUninstall : 0;
626
627 - var row = this.CreateRow(tuple, "MsiServiceConfig");
628 - row[0] = tuple.Id.Id;
629 - row[1] = tuple.Name;
627 + var row = this.CreateRow(symbol, "MsiServiceConfig");
628 + row[0] = symbol.Id.Id;
629 + row[1] = symbol.Name;
630 row[2] = events;
631 - row[3] = tuple.ResetPeriod.HasValue ? tuple.ResetPeriod : null;
632 - row[4] = tuple.RebootMessage ?? "[~]";
633 - row[5] = tuple.Command ?? "[~]";
634 - row[6] = tuple.Actions;
635 - row[7] = tuple.DelayActions;
636 - row[8] = tuple.ComponentRef;
631 + row[3] = symbol.ResetPeriod.HasValue ? symbol.ResetPeriod : null;
632 + row[4] = symbol.RebootMessage ?? "[~]";
633 + row[5] = symbol.Command ?? "[~]";
634 + row[6] = symbol.Actions;
635 + row[7] = symbol.DelayActions;
636 + row[8] = symbol.ComponentRef;
637 }
638
639 - private void AddMoveFileTuple(MoveFileTuple tuple)
639 + private void AddMoveFileSymbol(MoveFileSymbol symbol)
640 {
641 - var row = this.CreateRow(tuple, "MoveFile");
642 - row[0] = tuple.Id.Id;
643 - row[1] = tuple.ComponentRef;
644 - row[2] = tuple.SourceName;
645 - row[3] = tuple.DestName;
646 - row[4] = tuple.SourceFolder;
647 - row[5] = tuple.DestFolder;
648 - row[6] = tuple.Delete ? WindowsInstallerConstants.MsidbMoveFileOptionsMove : 0;
641 + var row = this.CreateRow(symbol, "MoveFile");
642 + row[0] = symbol.Id.Id;
643 + row[1] = symbol.ComponentRef;
644 + row[2] = symbol.SourceName;
645 + row[3] = symbol.DestName;
646 + row[4] = symbol.SourceFolder;
647 + row[5] = symbol.DestFolder;
648 + row[6] = symbol.Delete ? WindowsInstallerConstants.MsidbMoveFileOptionsMove : 0;
649 }
650
651 - private void AddPropertyTuple(PropertyTuple tuple)
651 + private void AddPropertySymbol(PropertySymbol symbol)
652 {
653 - if (String.IsNullOrEmpty(tuple.Value))
653 + if (String.IsNullOrEmpty(symbol.Value))
654 {
655 return;
656 }
657
658 - var row = (PropertyRow)this.CreateRow(tuple, "Property");
659 - row.Property = tuple.Id.Id;
660 - row.Value = tuple.Value;
658 + var row = (PropertyRow)this.CreateRow(symbol, "Property");
659 + row.Property = symbol.Id.Id;
660 + row.Value = symbol.Value;
661 }
662
663 - private void AddRemoveFileTuple(RemoveFileTuple tuple)
663 + private void AddRemoveFileSymbol(RemoveFileSymbol symbol)
664 {
665 - var installMode = tuple.OnInstall == true ? WindowsInstallerConstants.MsidbRemoveFileInstallModeOnInstall : 0;
666 - installMode |= tuple.OnUninstall == true ? WindowsInstallerConstants.MsidbRemoveFileInstallModeOnRemove : 0;
667 -
668 - var row = this.CreateRow(tuple, "RemoveFile");
669 - row[0] = tuple.Id.Id;
670 - row[1] = tuple.ComponentRef;
671 - row[2] = tuple.FileName;
672 - row[3] = tuple.DirProperty;
665 + var installMode = symbol.OnInstall == true ? WindowsInstallerConstants.MsidbRemoveFileInstallModeOnInstall : 0;
666 + installMode |= symbol.OnUninstall == true ? WindowsInstallerConstants.MsidbRemoveFileInstallModeOnRemove : 0;
667 +
668 + var row = this.CreateRow(symbol, "RemoveFile");
669 + row[0] = symbol.Id.Id;
670 + row[1] = symbol.ComponentRef;
671 + row[2] = symbol.FileName;
672 + row[3] = symbol.DirProperty;
673 row[4] = installMode;
674 }
675
676 - private void AddRegistryTuple(RegistryTuple tuple)
676 + private void AddRegistrySymbol(RegistrySymbol symbol)
677 {
678 - var value = tuple.Value;
678 + var value = symbol.Value;
679
680 - switch (tuple.ValueType)
680 + switch (symbol.ValueType)
681 {
682 case RegistryValueType.Binary:
683 value = String.Concat("#x", value);
@@ -689,7 +689,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
689 value = String.Concat("#", value);
690 break;
691 case RegistryValueType.MultiString:
692 - switch (tuple.ValueAction)
692 + switch (symbol.ValueAction)
693 {
694 case RegistryValueActionType.Append:
695 value = String.Concat("[~]", value);
@@ -715,164 +715,164 @@ namespace WixToolset.Core.WindowsInstaller.Bind
715 break;
716 }
717
718 - var row = this.CreateRow(tuple, "Registry");
719 - row[0] = tuple.Id.Id;
720 - row[1] = tuple.Root;
721 - row[2] = tuple.Key;
722 - row[3] = tuple.Name;
718 + var row = this.CreateRow(symbol, "Registry");
719 + row[0] = symbol.Id.Id;
720 + row[1] = symbol.Root;
721 + row[2] = symbol.Key;
722 + row[3] = symbol.Name;
723 row[4] = value;
724 - row[5] = tuple.ComponentRef;
724 + row[5] = symbol.ComponentRef;
725 }
726
727 - private void AddRegLocatorTuple(RegLocatorTuple tuple)
727 + private void AddRegLocatorSymbol(RegLocatorSymbol symbol)
728 {
729 - var type = (int)tuple.Type;
730 - type |= tuple.Win64 ? WindowsInstallerConstants.MsidbLocatorType64bit : 0;
731 -
732 - var row = this.CreateRow(tuple, "RegLocator");
733 - row[0] = tuple.Id.Id;
734 - row[1] = tuple.Root;
735 - row[2] = tuple.Key;
736 - row[3] = tuple.Name;
729 + var type = (int)symbol.Type;
730 + type |= symbol.Win64 ? WindowsInstallerConstants.MsidbLocatorType64bit : 0;
731 +
732 + var row = this.CreateRow(symbol, "RegLocator");
733 + row[0] = symbol.Id.Id;
734 + row[1] = symbol.Root;
735 + row[2] = symbol.Key;
736 + row[3] = symbol.Name;
737 row[4] = type;
738 }
739
740 - private void AddRemoveRegistryTuple(RemoveRegistryTuple tuple)
740 + private void AddRemoveRegistrySymbol(RemoveRegistrySymbol symbol)
741 {
742 - if (tuple.Action == RemoveRegistryActionType.RemoveOnInstall)
742 + if (symbol.Action == RemoveRegistryActionType.RemoveOnInstall)
743 {
744 - var row = this.CreateRow(tuple, "RemoveRegistry");
745 - row[0] = tuple.Id.Id;
746 - row[1] = tuple.Root;
747 - row[2] = tuple.Key;
748 - row[3] = tuple.Name;
749 - row[4] = tuple.ComponentRef;
744 + var row = this.CreateRow(symbol, "RemoveRegistry");
745 + row[0] = symbol.Id.Id;
746 + row[1] = symbol.Root;
747 + row[2] = symbol.Key;
748 + row[3] = symbol.Name;
749 + row[4] = symbol.ComponentRef;
750 }
751 else // Registry table is used to remove registry keys on uninstall.
752 {
753 - var row = this.CreateRow(tuple, "Registry");
754 - row[0] = tuple.Id.Id;
755 - row[1] = tuple.Root;
756 - row[2] = tuple.Key;
757 - row[3] = tuple.Name;
758 - row[5] = tuple.ComponentRef;
753 + var row = this.CreateRow(symbol, "Registry");
754 + row[0] = symbol.Id.Id;
755 + row[1] = symbol.Root;
756 + row[2] = symbol.Key;
757 + row[3] = symbol.Name;
758 + row[5] = symbol.ComponentRef;
759 }
760 }
761
762 - private void AddServiceControlTuple(ServiceControlTuple tuple)
762 + private void AddServiceControlSymbol(ServiceControlSymbol symbol)
763 {
764 - var events = tuple.InstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventDelete : 0;
765 - events |= tuple.UninstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventUninstallDelete : 0;
766 - events |= tuple.InstallStart ? WindowsInstallerConstants.MsidbServiceControlEventStart : 0;
767 - events |= tuple.UninstallStart ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStart : 0;
768 - events |= tuple.InstallStop ? WindowsInstallerConstants.MsidbServiceControlEventStop : 0;
769 - events |= tuple.UninstallStop ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStop : 0;
770 -
771 - var row = this.CreateRow(tuple, "ServiceControl");
772 - row[0] = tuple.Id.Id;
773 - row[1] = tuple.Name;
764 + var events = symbol.InstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventDelete : 0;
765 + events |= symbol.UninstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventUninstallDelete : 0;
766 + events |= symbol.InstallStart ? WindowsInstallerConstants.MsidbServiceControlEventStart : 0;
767 + events |= symbol.UninstallStart ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStart : 0;
768 + events |= symbol.InstallStop ? WindowsInstallerConstants.MsidbServiceControlEventStop : 0;
769 + events |= symbol.UninstallStop ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStop : 0;
770 +
771 + var row = this.CreateRow(symbol, "ServiceControl");
772 + row[0] = symbol.Id.Id;
773 + row[1] = symbol.Name;
774 row[2] = events;
775 - row[3] = tuple.Arguments;
776 - if (tuple.Wait.HasValue)
775 + row[3] = symbol.Arguments;
776 + if (symbol.Wait.HasValue)
777 {
778 - row[4] = tuple.Wait.Value ? 1 : 0;
778 + row[4] = symbol.Wait.Value ? 1 : 0;
779 }
780 - row[5] = tuple.ComponentRef;
780 + row[5] = symbol.ComponentRef;
781 }
782
783 - private void AddServiceInstallTuple(ServiceInstallTuple tuple)
783 + private void AddServiceInstallSymbol(ServiceInstallSymbol symbol)
784 {
785 - var errorControl = (int)tuple.ErrorControl;
786 - errorControl |= tuple.Vital ? WindowsInstallerConstants.MsidbServiceInstallErrorControlVital : 0;
785 + var errorControl = (int)symbol.ErrorControl;
786 + errorControl |= symbol.Vital ? WindowsInstallerConstants.MsidbServiceInstallErrorControlVital : 0;
787
788 - var serviceType = (int)tuple.ServiceType;
789 - serviceType |= tuple.Interactive ? WindowsInstallerConstants.MsidbServiceInstallInteractive : 0;
788 + var serviceType = (int)symbol.ServiceType;
789 + serviceType |= symbol.Interactive ? WindowsInstallerConstants.MsidbServiceInstallInteractive : 0;
790
791 - var row = this.CreateRow(tuple, "ServiceInstall");
792 - row[0] = tuple.Id.Id;
793 - row[1] = tuple.Name;
794 - row[2] = tuple.DisplayName;
791 + var row = this.CreateRow(symbol, "ServiceInstall");
792 + row[0] = symbol.Id.Id;
793 + row[1] = symbol.Name;
794 + row[2] = symbol.DisplayName;
795 row[3] = serviceType;
796 - row[4] = (int)tuple.StartType;
796 + row[4] = (int)symbol.StartType;
797 row[5] = errorControl;
798 - row[6] = tuple.LoadOrderGroup;
799 - row[7] = tuple.Dependencies;
800 - row[8] = tuple.StartName;
801 - row[9] = tuple.Password;
802 - row[10] = tuple.Arguments;
803 - row[11] = tuple.ComponentRef;
804 - row[12] = tuple.Description;
798 + row[6] = symbol.LoadOrderGroup;
799 + row[7] = symbol.Dependencies;
800 + row[8] = symbol.StartName;
801 + row[9] = symbol.Password;
802 + row[10] = symbol.Arguments;
803 + row[11] = symbol.ComponentRef;
804 + row[12] = symbol.Description;
805 }
806
807 - private void AddShortcutTuple(ShortcutTuple tuple)
807 + private void AddShortcutSymbol(ShortcutSymbol symbol)
808 {
809 - var row = this.CreateRow(tuple, "Shortcut");
810 - row[0] = tuple.Id.Id;
811 - row[1] = tuple.DirectoryRef;
812 - row[2] = GetMsiFilenameValue(tuple.ShortName, tuple.Name);
813 - row[3] = tuple.ComponentRef;
814 - row[4] = tuple.Target;
815 - row[5] = tuple.Arguments;
816 - row[6] = tuple.Description;
817 - row[7] = tuple.Hotkey;
818 - row[8] = tuple.IconRef;
819 - row[9] = tuple.IconIndex;
820 - row[10] = (int?)tuple.Show;
821 - row[11] = tuple.WorkingDirectory;
822 - row[12] = tuple.DisplayResourceDll;
823 - row[13] = tuple.DisplayResourceId;
824 - row[14] = tuple.DescriptionResourceDll;
825 - row[15] = tuple.DescriptionResourceId;
809 + var row = this.CreateRow(symbol, "Shortcut");
810 + row[0] = symbol.Id.Id;
811 + row[1] = symbol.DirectoryRef;
812 + row[2] = GetMsiFilenameValue(symbol.ShortName, symbol.Name);
813 + row[3] = symbol.ComponentRef;
814 + row[4] = symbol.Target;
815 + row[5] = symbol.Arguments;
816 + row[6] = symbol.Description;
817 + row[7] = symbol.Hotkey;
818 + row[8] = symbol.IconRef;
819 + row[9] = symbol.IconIndex;
820 + row[10] = (int?)symbol.Show;
821 + row[11] = symbol.WorkingDirectory;
822 + row[12] = symbol.DisplayResourceDll;
823 + row[13] = symbol.DisplayResourceId;
824 + row[14] = symbol.DescriptionResourceDll;
825 + row[15] = symbol.DescriptionResourceId;
826 }
827
828 - private void AddTextStyleTuple(TextStyleTuple tuple)
828 + private void AddTextStyleSymbol(TextStyleSymbol symbol)
829 {
830 - var styleBits = tuple.Bold ? WindowsInstallerConstants.MsidbTextStyleStyleBitsBold : 0;
831 - styleBits |= tuple.Italic ? WindowsInstallerConstants.MsidbTextStyleStyleBitsItalic : 0;
832 - styleBits |= tuple.Strike ? WindowsInstallerConstants.MsidbTextStyleStyleBitsStrike : 0;
833 - styleBits |= tuple.Underline ? WindowsInstallerConstants.MsidbTextStyleStyleBitsUnderline : 0;
830 + var styleBits = symbol.Bold ? WindowsInstallerConstants.MsidbTextStyleStyleBitsBold : 0;
831 + styleBits |= symbol.Italic ? WindowsInstallerConstants.MsidbTextStyleStyleBitsItalic : 0;
832 + styleBits |= symbol.Strike ? WindowsInstallerConstants.MsidbTextStyleStyleBitsStrike : 0;
833 + styleBits |= symbol.Underline ? WindowsInstallerConstants.MsidbTextStyleStyleBitsUnderline : 0;
834
835 long? color = null;
836
837 - if (tuple.Red.HasValue || tuple.Green.HasValue || tuple.Blue.HasValue)
837 + if (symbol.Red.HasValue || symbol.Green.HasValue || symbol.Blue.HasValue)
838 {
839 - color = tuple.Red ?? 0;
840 - color += (long)(tuple.Green ?? 0) * 256;
841 - color += (long)(tuple.Blue ?? 0) * 65536;
839 + color = symbol.Red ?? 0;
840 + color += (long)(symbol.Green ?? 0) * 256;
841 + color += (long)(symbol.Blue ?? 0) * 65536;
842 }
843
844 - var row = this.CreateRow(tuple, "TextStyle");
845 - row[0] = tuple.Id.Id;
846 - row[1] = tuple.FaceName;
847 - row[2] = tuple.Size;
844 + var row = this.CreateRow(symbol, "TextStyle");
845 + row[0] = symbol.Id.Id;
846 + row[1] = symbol.FaceName;
847 + row[2] = symbol.Size;
848 row[3] = color;
849 row[4] = styleBits == 0 ? null : (int?)styleBits;
850 }
851
852 - private void AddUpgradeTuple(UpgradeTuple tuple)
852 + private void AddUpgradeSymbol(UpgradeSymbol symbol)
853 {
854 - var row = (UpgradeRow)this.CreateRow(tuple, "Upgrade");
855 - row.UpgradeCode = tuple.UpgradeCode;
856 - row.VersionMin = tuple.VersionMin;
857 - row.VersionMax = tuple.VersionMax;
858 - row.Language = tuple.Language;
859 - row.Remove = tuple.Remove;
860 - row.ActionProperty = tuple.ActionProperty;
861 -
862 - var attributes = tuple.MigrateFeatures ? WindowsInstallerConstants.MsidbUpgradeAttributesMigrateFeatures : 0;
863 - attributes |= tuple.OnlyDetect ? WindowsInstallerConstants.MsidbUpgradeAttributesOnlyDetect : 0;
864 - attributes |= tuple.IgnoreRemoveFailures ? WindowsInstallerConstants.MsidbUpgradeAttributesIgnoreRemoveFailure : 0;
865 - attributes |= tuple.VersionMinInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMinInclusive : 0;
866 - attributes |= tuple.VersionMaxInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive : 0;
867 - attributes |= tuple.ExcludeLanguages ? WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive : 0;
854 + var row = (UpgradeRow)this.CreateRow(symbol, "Upgrade");
855 + row.UpgradeCode = symbol.UpgradeCode;
856 + row.VersionMin = symbol.VersionMin;
857 + row.VersionMax = symbol.VersionMax;
858 + row.Language = symbol.Language;
859 + row.Remove = symbol.Remove;
860 + row.ActionProperty = symbol.ActionProperty;
861 +
862 + var attributes = symbol.MigrateFeatures ? WindowsInstallerConstants.MsidbUpgradeAttributesMigrateFeatures : 0;
863 + attributes |= symbol.OnlyDetect ? WindowsInstallerConstants.MsidbUpgradeAttributesOnlyDetect : 0;
864 + attributes |= symbol.IgnoreRemoveFailures ? WindowsInstallerConstants.MsidbUpgradeAttributesIgnoreRemoveFailure : 0;
865 + attributes |= symbol.VersionMinInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMinInclusive : 0;
866 + attributes |= symbol.VersionMaxInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive : 0;
867 + attributes |= symbol.ExcludeLanguages ? WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive : 0;
868 row.Attributes = attributes;
869 }
870
871 - private void AddWixActionTuple(WixActionTuple tuple)
871 + private void AddWixActionSymbol(WixActionSymbol symbol)
872 {
873 // Get the table definition for the action (and ensure the proper table exists for a module).
874 string sequenceTableName = null;
875 - switch (tuple.SequenceTable)
875 + switch (symbol.SequenceTable)
876 {
877 case SequenceTable.AdminExecuteSequence:
878 if (OutputType.Module == this.Output.Type)
@@ -932,60 +932,60 @@ namespace WixToolset.Core.WindowsInstaller.Bind
932 }
933
934 // create the action sequence row in the output
935 - var row = this.CreateRow(tuple, sequenceTableName);
935 + var row = this.CreateRow(symbol, sequenceTableName);
936
937 if (SectionType.Module == this.Section.Type)
938 {
939 - row[0] = tuple.Action;
940 - if (0 != tuple.Sequence)
939 + row[0] = symbol.Action;
940 + if (0 != symbol.Sequence)
941 {
942 - row[1] = tuple.Sequence;
942 + row[1] = symbol.Sequence;
943 }
944 else
945 {
946 - var after = (null == tuple.Before);
947 - row[2] = after ? tuple.After : tuple.Before;
946 + var after = (null == symbol.Before);
947 + row[2] = after ? symbol.After : symbol.Before;
948 row[3] = after ? 1 : 0;
949 }
950 - row[4] = tuple.Condition;
950 + row[4] = symbol.Condition;
951 }
952 else
953 {
954 - row[0] = tuple.Action;
955 - row[1] = tuple.Condition;
956 - row[2] = tuple.Sequence;
954 + row[0] = symbol.Action;
955 + row[1] = symbol.Condition;
956 + row[2] = symbol.Sequence;
957 }
958 }
959
960 - private void IndexCustomTableCellTuple(WixCustomTableCellTuple wixCustomTableCellTuple, Dictionary<string, List<WixCustomTableCellTuple>> cellsByTableAndRowId)
960 + private void IndexCustomTableCellSymbol(WixCustomTableCellSymbol wixCustomTableCellSymbol, Dictionary<string, List<WixCustomTableCellSymbol>> cellsByTableAndRowId)
961 {
962 - var tableAndRowId = wixCustomTableCellTuple.TableRef + "/" + wixCustomTableCellTuple.RowId;
962 + var tableAndRowId = wixCustomTableCellSymbol.TableRef + "/" + wixCustomTableCellSymbol.RowId;
963 if (!cellsByTableAndRowId.TryGetValue(tableAndRowId, out var cells))
964 {
965 - cells = new List<WixCustomTableCellTuple>();
965 + cells = new List<WixCustomTableCellSymbol>();
966 cellsByTableAndRowId.Add(tableAndRowId, cells);
967 }
968
969 - cells.Add(wixCustomTableCellTuple);
969 + cells.Add(wixCustomTableCellSymbol);
970 }
971
972 - private void AddIndexedCellTuples(Dictionary<string, List<WixCustomTableCellTuple>> cellsByTableAndRowId)
972 + private void AddIndexedCellSymbols(Dictionary<string, List<WixCustomTableCellSymbol>> cellsByTableAndRowId)
973 {
974 foreach (var rowOfCells in cellsByTableAndRowId.Values)
975 {
976 - var firstCellTuple = rowOfCells[0];
977 - var customTableDefinition = this.TableDefinitions[firstCellTuple.TableRef];
976 + var firstCellSymbol = rowOfCells[0];
977 + var customTableDefinition = this.TableDefinitions[firstCellSymbol.TableRef];
978
979 if (customTableDefinition.Unreal)
980 {
981 continue;
982 }
983
984 - var customRow = this.CreateRow(firstCellTuple, customTableDefinition);
984 + var customRow = this.CreateRow(firstCellSymbol, customTableDefinition);
985 var customRowFieldsByColumnName = customRow.Fields.ToDictionary(f => f.Column.Name);
986
987 #if TODO // SectionId seems like a good thing to preserve.
988 - customRow.SectionId = tuple.SectionId;
988 + customRow.SectionId = symbol.SectionId;
989 #endif
990 foreach (var cell in rowOfCells)
991 {
@@ -1037,23 +1037,23 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1037 {
1038 if (!customTableDefinition.Columns[i].Nullable && (null == customRow.Fields[i].Data || 0 == customRow.Fields[i].Data.ToString().Length))
1039 {
1040 - this.Messaging.Write(ErrorMessages.NoDataForColumn(firstCellTuple.SourceLineNumbers, customTableDefinition.Columns[i].Name, customTableDefinition.Name));
1040 + this.Messaging.Write(ErrorMessages.NoDataForColumn(firstCellSymbol.SourceLineNumbers, customTableDefinition.Columns[i].Name, customTableDefinition.Name));
1041 }
1042 }
1043 }
1044 }
1045
1046 - private void AddWixEnsureTableTuple(WixEnsureTableTuple tuple)
1046 + private void AddWixEnsureTableSymbol(WixEnsureTableSymbol symbol)
1047 {
1048 - var tableDefinition = this.TableDefinitions[tuple.Table];
1048 + var tableDefinition = this.TableDefinitions[symbol.Table];
1049 this.Output.EnsureTable(tableDefinition);
1050 }
1051
1052 - private bool AddTupleFromExtension(IntermediateTuple tuple)
1052 + private bool AddSymbolFromExtension(IntermediateSymbol symbol)
1053 {
1054 foreach (var extension in this.BackendExtensions)
1055 {
1056 - if (extension.TryAddTupleToOutput(this.Section, tuple, this.Output, this.TableDefinitions))
1056 + if (extension.TryAddSymbolToOutput(this.Section, symbol, this.Output, this.TableDefinitions))
1057 {
1058 return true;
1059 }
@@ -1062,8 +1062,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1062 return false;
1063 }
1064
1065 - private bool AddTupleDefaultly(IntermediateTuple tuple) =>
1066 - this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(this.Section, tuple, this.Output, this.TableDefinitions);
1065 + private bool AddSymbolDefaultly(IntermediateSymbol symbol) =>
1066 + this.BackendHelper.TryAddSymbolToOutputMatchingTableDefinitions(this.Section, symbol, this.Output, this.TableDefinitions);
1067
1068 private static OutputType SectionTypeToOutputType(SectionType type)
1069 {
@@ -1085,11 +1085,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1085 }
1086 }
1087
1088 - private Row CreateRow(IntermediateTuple tuple, string tableDefinitionName) =>
1089 - this.CreateRow(tuple, this.TableDefinitions[tableDefinitionName]);
1088 + private Row CreateRow(IntermediateSymbol symbol, string tableDefinitionName) =>
1089 + this.CreateRow(symbol, this.TableDefinitions[tableDefinitionName]);
1090
1091 - private Row CreateRow(IntermediateTuple tuple, TableDefinition tableDefinition) =>
1092 - this.BackendHelper.CreateRow(this.Section, tuple, this.Output, tableDefinition);
1091 + private Row CreateRow(IntermediateSymbol symbol, TableDefinition tableDefinition) =>
1092 + this.BackendHelper.CreateRow(this.Section, symbol, this.Output, tableDefinition);
1093
1094 private static string GetMsiFilenameValue(string shortName, string longName)
1095 {
src/WixToolset.Core.WindowsInstaller/Bind/CreatePatchTransformsCommand.cs
+8 -8
@@ -9,7 +9,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
9 using WixToolset.Core.WindowsInstaller.Msi;
10 using WixToolset.Core.WindowsInstaller.Unbind;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using WixToolset.Data.WindowsInstaller;
14 using WixToolset.Extensibility.Services;
15
@@ -34,16 +34,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind
34 {
35 var patchTransforms = new List<PatchTransform>();
36
37 - var tuples = this.Intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixPatchBaselineTuple>();
37 + var symbols = this.Intermediate.Sections.SelectMany(s => s.Symbols).OfType<WixPatchBaselineSymbol>();
38
39 - foreach (var tuple in tuples)
39 + foreach (var symbol in symbols)
40 {
41 WindowsInstallerData transform;
42
43 - if (tuple.TransformFile is null)
43 + if (symbol.TransformFile is null)
44 {
45 - var baselineData = this.GetData(tuple.BaselineFile.Path);
46 - var updateData = this.GetData(tuple.UpdateFile.Path);
45 + var baselineData = this.GetData(symbol.BaselineFile.Path);
46 + var updateData = this.GetData(symbol.UpdateFile.Path);
47
48 var command = new GenerateTransformCommand(this.Messaging, baselineData, updateData, preserveUnchangedRows: true, showPedanticMessages: false);
49 transform = command.Execute();
@@ -52,11 +52,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
52 {
53 var exportBasePath = Path.Combine(this.IntermediateFolder, "_trans"); // TODO: come up with a better path.
54
55 - var command = new UnbindTransformCommand(this.Messaging, tuple.TransformFile.Path, exportBasePath, this.IntermediateFolder);
55 + var command = new UnbindTransformCommand(this.Messaging, symbol.TransformFile.Path, exportBasePath, this.IntermediateFolder);
56 transform = command.Execute();
57 }
58
59 - patchTransforms.Add(new PatchTransform(tuple.Id.Id, transform));
59 + patchTransforms.Add(new PatchTransform(symbol.Id.Id, transform));
60 }
61
62 this.PatchTransforms = patchTransforms;
src/WixToolset.Core.WindowsInstaller/Bind/CreateSpecialPropertiesCommand.cs
+7 -7
@@ -6,7 +6,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
6 using System.Collections.Generic;
7 using System.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10
11 internal class CreateSpecialPropertiesCommand
12 {
@@ -24,7 +24,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
24 var secureProperties = new SortedSet<string>();
25 var hiddenProperties = new SortedSet<string>();
26
27 - foreach (var wixPropertyRow in this.Section.Tuples.OfType<WixPropertyTuple>())
27 + foreach (var wixPropertyRow in this.Section.Symbols.OfType<WixPropertySymbol>())
28 {
29 if (wixPropertyRow.Admin)
30 {
@@ -43,7 +43,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
43 }
44
45 // Hide properties for in-script custom actions that have HideTarget set.
46 - var hideTargetCustomActions = this.Section.Tuples.OfType<CustomActionTuple>().Where(
46 + var hideTargetCustomActions = this.Section.Symbols.OfType<CustomActionSymbol>().Where(
47 ca => ca.Hidden
48 && (ca.ExecutionType == CustomActionExecutionType.Deferred
49 || ca.ExecutionType == CustomActionExecutionType.Commit
@@ -52,12 +52,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind
52 hiddenProperties.UnionWith(hideTargetCustomActions);
53
54 // Ensure upgrade action properties are secure.
55 - var actionProperties = this.Section.Tuples.OfType<UpgradeTuple>().Select(u => u.ActionProperty);
55 + var actionProperties = this.Section.Symbols.OfType<UpgradeSymbol>().Select(u => u.ActionProperty);
56 secureProperties.UnionWith(actionProperties);
57
58 if (0 < adminProperties.Count)
59 {
60 - this.Section.AddTuple(new PropertyTuple(null, new Identifier(AccessModifier.Private, "AdminProperties"))
60 + this.Section.AddSymbol(new PropertySymbol(null, new Identifier(AccessModifier.Private, "AdminProperties"))
61 {
62 Value = String.Join(";", adminProperties),
63 });
@@ -65,7 +65,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
65
66 if (0 < secureProperties.Count)
67 {
68 - this.Section.AddTuple(new PropertyTuple(null, new Identifier(AccessModifier.Private, "SecureCustomProperties"))
68 + this.Section.AddSymbol(new PropertySymbol(null, new Identifier(AccessModifier.Private, "SecureCustomProperties"))
69 {
70 Value = String.Join(";", secureProperties),
71 });
@@ -73,7 +73,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
73
74 if (0 < hiddenProperties.Count)
75 {
76 - this.Section.AddTuple(new PropertyTuple(null, new Identifier(AccessModifier.Private, "MsiHiddenProperties"))
76 + this.Section.AddSymbol(new PropertySymbol(null, new Identifier(AccessModifier.Private, "MsiHiddenProperties"))
77 {
78 Value = String.Join(";", hiddenProperties)
79 });
src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
+13 -13
@@ -12,7 +12,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
12 using WixToolset.Data;
13 using WixToolset.Core.Native;
14 using WixToolset.Core.Bind;
15 - using WixToolset.Data.Tuples;
15 + using WixToolset.Data.Symbols;
16 using WixToolset.Extensibility.Services;
17 using WixToolset.Core.WindowsInstaller.Msi;
18
@@ -21,10 +21,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
21 /// </summary>
22 internal class ExtractMergeModuleFilesCommand
23 {
24 - public ExtractMergeModuleFilesCommand(IMessaging messaging, IEnumerable<WixMergeTuple> wixMergeTuples, IEnumerable<FileFacade> fileFacades, int installerVersion, string intermediateFolder, bool suppressLayout)
24 + public ExtractMergeModuleFilesCommand(IMessaging messaging, IEnumerable<WixMergeSymbol> wixMergeSymbols, IEnumerable<FileFacade> fileFacades, int installerVersion, string intermediateFolder, bool suppressLayout)
25 {
26 this.Messaging = messaging;
27 - this.WixMergeTuples = wixMergeTuples;
27 + this.WixMergeSymbols = wixMergeSymbols;
28 this.FileFacades = fileFacades;
29 this.OutputInstallerVersion = installerVersion;
30 this.IntermediateFolder = intermediateFolder;
@@ -33,7 +33,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
33
34 private IMessaging Messaging { get; }
35
36 - private IEnumerable<WixMergeTuple> WixMergeTuples { get; }
36 + private IEnumerable<WixMergeSymbol> WixMergeSymbols { get; }
37
38 private IEnumerable<FileFacade> FileFacades { get; }
39
@@ -61,7 +61,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
61 // is a lot more costly for the common cases.
62 var indexedFileFacades = this.FileFacades.ToDictionary(f => f.Id, StringComparer.Ordinal);
63
64 - foreach (var wixMergeRow in this.WixMergeTuples)
64 + foreach (var wixMergeRow in this.WixMergeSymbols)
65 {
66 var containsFiles = this.CreateFacadesForMergeModuleFiles(wixMergeRow, mergeModulesFileFacades, indexedFileFacades);
67
@@ -75,7 +75,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
75 this.MergeModulesFileFacades = mergeModulesFileFacades;
76 }
77
78 - private bool CreateFacadesForMergeModuleFiles(WixMergeTuple wixMergeRow, List<FileFacade> mergeModulesFileFacades, Dictionary<string, FileFacade> indexedFileFacades)
78 + private bool CreateFacadesForMergeModuleFiles(WixMergeSymbol wixMergeRow, List<FileFacade> mergeModulesFileFacades, Dictionary<string, FileFacade> indexedFileFacades)
79 {
80 var containsFiles = false;
81
@@ -96,13 +96,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
96 // NOTE: this is very tricky - the merge module file rows are not added to the
97 // file table because they should not be created via idt import. Instead, these
98 // rows are created by merging in the actual modules.
99 - var fileTuple = new FileTuple(wixMergeRow.SourceLineNumbers, new Identifier(AccessModifier.Private, record[1]));
100 - fileTuple.Attributes = wixMergeRow.FileAttributes;
101 - fileTuple.DirectoryRef = record[2];
102 - fileTuple.DiskId = wixMergeRow.DiskId;
103 - fileTuple.Source = new IntermediateFieldPathValue { Path = Path.Combine(this.IntermediateFolder, wixMergeRow.Id.Id, record[1]) };
99 + var fileSymbol = new FileSymbol(wixMergeRow.SourceLineNumbers, new Identifier(AccessModifier.Private, record[1]));
100 + fileSymbol.Attributes = wixMergeRow.FileAttributes;
101 + fileSymbol.DirectoryRef = record[2];
102 + fileSymbol.DiskId = wixMergeRow.DiskId;
103 + fileSymbol.Source = new IntermediateFieldPathValue { Path = Path.Combine(this.IntermediateFolder, wixMergeRow.Id.Id, record[1]) };
104
105 - var mergeModuleFileFacade = new FileFacade(true, fileTuple);
105 + var mergeModuleFileFacade = new FileFacade(true, fileSymbol);
106
107 // If case-sensitive collision with another merge module or a user-authored file identifier.
108 if (indexedFileFacades.TryGetValue(mergeModuleFileFacade.Id, out var collidingFacade))
@@ -159,7 +159,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
159 return containsFiles;
160 }
161
162 - private void ExtractFilesFromMergeModule(IMsmMerge2 merge, WixMergeTuple wixMergeRow)
162 + private void ExtractFilesFromMergeModule(IMsmMerge2 merge, WixMergeSymbol wixMergeRow)
163 {
164 var moduleOpen = false;
165 short mergeLanguage;
src/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs
+1 -1
@@ -7,7 +7,7 @@ namespace WixToolset.Core.WindowsInstaller
7 using System.Globalization;
8 using WixToolset.Core.WindowsInstaller.Msi;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Data.WindowsInstaller;
12 using WixToolset.Data.WindowsInstaller.Rows;
13 using WixToolset.Extensibility.Services;
src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs
+7 -7
@@ -8,7 +8,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
8 using System.Linq;
9 using WixToolset.Core.Bind;
10 using WixToolset.Data;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12
13 internal class GetFileFacadesCommand
14 {
@@ -25,10 +25,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
25 {
26 var facades = new List<FileFacade>();
27
28 - var assemblyFile = this.Section.Tuples.OfType<AssemblyTuple>().ToDictionary(t => t.Id.Id);
29 - //var deltaPatchFiles = this.Section.Tuples.OfType<WixDeltaPatchFileTuple>().ToDictionary(t => t.Id.Id);
28 + var assemblyFile = this.Section.Symbols.OfType<AssemblySymbol>().ToDictionary(t => t.Id.Id);
29 + //var deltaPatchFiles = this.Section.Symbols.OfType<WixDeltaPatchFileSymbol>().ToDictionary(t => t.Id.Id);
30
31 - foreach (var file in this.Section.Tuples.OfType<FileTuple>())
31 + foreach (var file in this.Section.Symbols.OfType<FileSymbol>())
32 {
33 assemblyFile.TryGetValue(file.Id.Id, out var assembly);
34
@@ -49,13 +49,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
49 /// <summary>
50 /// Merge data from the WixPatchSymbolPaths rows into the WixDeltaPatchFile rows.
51 /// </summary>
52 - public void ResolveDeltaPatchSymbolPaths(Dictionary<string, WixDeltaPatchFileTuple> deltaPatchFiles, IEnumerable<FileFacade> facades)
52 + public void ResolveDeltaPatchSymbolPaths(Dictionary<string, WixDeltaPatchFileSymbol> deltaPatchFiles, IEnumerable<FileFacade> facades)
53 {
54 ILookup<string, FileFacade> filesByComponent = null;
55 ILookup<string, FileFacade> filesByDirectory = null;
56 ILookup<string, FileFacade> filesByDiskId = null;
57
58 - foreach (var row in this.Section.Tuples.OfType<WixDeltaPatchSymbolPathsTuple>().OrderBy(r => r.SymbolType))
58 + foreach (var row in this.Section.Symbols.OfType<WixDeltaPatchSymbolPathsSymbol>().OrderBy(r => r.SymbolType))
59 {
60 switch (row.SymbolType)
61 {
@@ -119,7 +119,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
119 /// <param name="row">Row from the WixPatchSymbolsPaths table.</param>
120 /// <param name="file">FileRow into which to set symbol information.</param>
121 /// <comment>This includes PreviousData as well.</comment>
122 - private void MergeSymbolPaths(WixDeltaPatchSymbolPathsTuple row, WixDeltaPatchFileTuple file)
122 + private void MergeSymbolPaths(WixDeltaPatchSymbolPathsSymbol row, WixDeltaPatchFileSymbol file)
123 {
124 if (file.SymbolPaths is null)
125 {
src/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs
+8 -8
@@ -7,7 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.Globalization;
8 using System.Linq;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Data.WindowsInstaller;
12 using WixToolset.Extensibility;
13 using WixToolset.Extensibility.Services;
@@ -32,13 +32,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
32 public TableDefinitionCollection Execute()
33 {
34 var tableDefinitions = new TableDefinitionCollection(WindowsInstallerTableDefinitions.All);
35 - var customColumnsById = this.Section.Tuples.OfType<WixCustomTableColumnTuple>().ToDictionary(t => t.Id.Id);
35 + var customColumnsById = this.Section.Symbols.OfType<WixCustomTableColumnSymbol>().ToDictionary(t => t.Id.Id);
36
37 if (customColumnsById.Any())
38 {
39 - foreach (var tuple in this.Section.Tuples.OfType<WixCustomTableTuple>())
39 + foreach (var symbol in this.Section.Symbols.OfType<WixCustomTableSymbol>())
40 {
41 - var customTableDefinition = this.CreateCustomTable(tuple, customColumnsById);
41 + var customTableDefinition = this.CreateCustomTable(symbol, customColumnsById);
42 tableDefinitions.Add(customTableDefinition);
43 }
44 }
@@ -60,14 +60,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind
60 return this.TableDefinitions;
61 }
62
63 - private TableDefinition CreateCustomTable(WixCustomTableTuple tuple, Dictionary<string, WixCustomTableColumnTuple> customColumnsById)
63 + private TableDefinition CreateCustomTable(WixCustomTableSymbol symbol, Dictionary<string, WixCustomTableColumnSymbol> customColumnsById)
64 {
65 - var columnNames = tuple.ColumnNamesSeparated;
65 + var columnNames = symbol.ColumnNamesSeparated;
66 var columns = new List<ColumnDefinition>(columnNames.Length);
67
68 foreach (var name in columnNames)
69 {
70 - var column = customColumnsById[tuple.Id.Id + "/" + name];
70 + var column = customColumnsById[symbol.Id.Id + "/" + name];
71
72 var type = ColumnType.Unknown;
73
@@ -208,7 +208,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
208 columns.Add(columnDefinition);
209 }
210
211 - var customTable = new TableDefinition(tuple.Id.Id, null, columns, tuple.Unreal);
211 + var customTable = new TableDefinition(symbol.Id.Id, null, columns, symbol.Unreal);
212 return customTable;
213 }
214 }
src/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
+6 -6
@@ -13,7 +13,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
13 using WixToolset.Core.Native;
14 using WixToolset.Core.WindowsInstaller.Msi;
15 using WixToolset.Data;
16 - using WixToolset.Data.Tuples;
16 + using WixToolset.Data.Symbols;
17 using WixToolset.Data.WindowsInstaller;
18 using WixToolset.Extensibility.Services;
19
@@ -46,8 +46,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
46
47 public void Execute()
48 {
49 - var wixMergeTuples = this.Section.Tuples.OfType<WixMergeTuple>().ToList();
50 - if (!wixMergeTuples.Any())
49 + var wixMergeSymbols = this.Section.Symbols.OfType<WixMergeSymbol>().ToList();
50 + if (!wixMergeSymbols.Any())
51 {
52 return;
53 }
@@ -69,10 +69,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
69 merge.OpenDatabase(this.OutputPath);
70 databaseOpen = true;
71
72 - var featureModulesByMergeId = this.Section.Tuples.OfType<WixFeatureModulesTuple>().GroupBy(t => t.WixMergeRef).ToDictionary(g => g.Key);
72 + var featureModulesByMergeId = this.Section.Symbols.OfType<WixFeatureModulesSymbol>().GroupBy(t => t.WixMergeRef).ToDictionary(g => g.Key);
73
74 // process all the merge rows
75 - foreach (var wixMergeRow in wixMergeTuples)
75 + foreach (var wixMergeRow in wixMergeSymbols)
76 {
77 var moduleOpen = false;
78
@@ -217,7 +217,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
217 using (var db = new Database(this.OutputPath, OpenDatabase.Direct))
218 {
219 // Suppress individual actions.
220 - foreach (var suppressAction in this.Section.Tuples.OfType<WixSuppressActionTuple>())
220 + foreach (var suppressAction in this.Section.Symbols.OfType<WixSuppressActionSymbol>())
221 {
222 var tableName = suppressAction.SequenceTable.WindowsInstallerTableName();
223 if (db.TableExists(tableName))
src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs
+8 -8
@@ -10,18 +10,18 @@ namespace WixToolset.Core.WindowsInstaller.Bind
10 using System.Text;
11 using System.Text.RegularExpressions;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Data.WindowsInstaller;
15
16 internal class ModularizeCommand
17 {
18 - public ModularizeCommand(WindowsInstallerData output, string modularizationSuffix, IEnumerable<WixSuppressModularizationTuple> suppressTuples)
18 + public ModularizeCommand(WindowsInstallerData output, string modularizationSuffix, IEnumerable<WixSuppressModularizationSymbol> suppressSymbols)
19 {
20 this.Output = output;
21 this.ModularizationSuffix = modularizationSuffix;
22
23 // Gather all the unique suppress modularization identifiers.
24 - this.SuppressModularizationIdentifiers = new HashSet<string>(suppressTuples.Select(s => s.Id.Id));
24 + this.SuppressModularizationIdentifiers = new HashSet<string>(suppressSymbols.Select(s => s.Id.Id));
25 }
26
27 private WindowsInstallerData Output { get; }
@@ -144,17 +144,17 @@ namespace WixToolset.Core.WindowsInstaller.Bind
144 {
145 Debug.Assert(ColumnModularizeType.Condition == modularizeType);
146
147 - // This heinous looking regular expression is actually quite an elegant way
148 - // to shred the entire condition into the identifiers that need to be
147 + // This heinous looking regular expression is actually quite an elegant way
148 + // to shred the entire condition into the identifiers that need to be
149 // modularized. Let's break it down piece by piece:
150 //
151 // 1. Look for the operators: NOT, EQV, XOR, OR, AND, IMP (plus a space). Note that the
152 // regular expression is case insensitive so we don't have to worry about
153 // all the permutations of these strings.
154 - // 2. Look for quoted strings. Quoted strings are just text and are ignored
154 + // 2. Look for quoted strings. Quoted strings are just text and are ignored
155 // outright.
156 - // 3. Look for environment variables. These look like identifiers we might
157 - // otherwise be interested in but start with a percent sign. Like quoted
156 + // 3. Look for environment variables. These look like identifiers we might
157 + // otherwise be interested in but start with a percent sign. Like quoted
158 // strings these enviroment variable references are ignored outright.
159 // 4. Match all identifiers that are things that need to be modularized. Note
160 // the special characters (!, $, ?, &) that denote Component and Feature states.
src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
+6 -6
@@ -9,7 +9,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
9 using WixToolset.Core.Bind;
10 using WixToolset.Core.WindowsInstaller.Msi;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using WixToolset.Extensibility.Data;
14 using WixToolset.Extensibility.Services;
15
@@ -41,7 +41,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
41
42 public bool LongNamesInImage { private get; set; }
43
44 - public Func<MediaTuple, string, string, string> ResolveMedia { private get; set; }
44 + public Func<MediaSymbol, string, string, string> ResolveMedia { private get; set; }
45
46 public IEnumerable<IFileTransfer> FileTransfers { get; private set; }
47
@@ -55,7 +55,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
55
56 var directories = new Dictionary<string, IResolvedDirectory>();
57
58 - var mediaRows = this.Section.Tuples.OfType<MediaTuple>().ToDictionary(t => t.DiskId);
58 + var mediaRows = this.Section.Symbols.OfType<MediaSymbol>().ToDictionary(t => t.DiskId);
59
60 using (var db = new Database(this.DatabasePath, OpenDatabase.ReadOnly))
61 {
@@ -78,11 +78,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
78 // for each file in the array of uncompressed files
79 foreach (FileFacade facade in this.FileFacades)
80 {
81 - var mediaTuple = mediaRows[facade.DiskId];
81 + var mediaSymbol = mediaRows[facade.DiskId];
82 string relativeFileLayoutPath = null;
83 - string mediaLayoutFolder = mediaTuple.Layout;
83 + string mediaLayoutFolder = mediaSymbol.Layout;
84
85 - var mediaLayoutDirectory = this.ResolveMedia(mediaTuple, mediaLayoutFolder, this.LayoutDirectory);
85 + var mediaLayoutDirectory = this.ResolveMedia(mediaSymbol, mediaLayoutFolder, this.LayoutDirectory);
86
87 // setup up the query record and find the appropriate file in the
88 // previously executed file view
src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
+172 -172
@@ -7,12 +7,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.Globalization;
8 using System.Linq;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Data.WindowsInstaller;
12 using WixToolset.Extensibility.Services;
13
14 /// <summary>
15 - /// Set sequence numbers for all the actions and create tuples in the output object.
15 + /// Set sequence numbers for all the actions and create symbols in the output object.
16 /// </summary>
17 internal class SequenceActionsCommand
18 {
@@ -32,38 +32,38 @@ namespace WixToolset.Core.WindowsInstaller.Bind
32
33 public void Execute()
34 {
35 - var requiredActionTuples = new Dictionary<string, WixActionTuple>();
35 + var requiredActionSymbols = new Dictionary<string, WixActionSymbol>();
36
37 - // Get the standard actions required based on tuples in the section.
38 - var overridableActionTuples = this.GetRequiredStandardActions();
37 + // Get the standard actions required based on symbols in the section.
38 + var overridableActionSymbols = this.GetRequiredStandardActions();
39
40 - // Index all the action tuples and look for collisions.
41 - foreach (var actionTuple in this.Section.Tuples.OfType<WixActionTuple>())
40 + // Index all the action symbols and look for collisions.
41 + foreach (var actionSymbol in this.Section.Symbols.OfType<WixActionSymbol>())
42 {
43 - if (actionTuple.Overridable) // overridable action
43 + if (actionSymbol.Overridable) // overridable action
44 {
45 - if (overridableActionTuples.TryGetValue(actionTuple.Id.Id, out var collidingActionTuple))
45 + if (overridableActionSymbols.TryGetValue(actionSymbol.Id.Id, out var collidingActionSymbol))
46 {
47 - this.Messaging.Write(ErrorMessages.OverridableActionCollision(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action));
48 - if (null != collidingActionTuple.SourceLineNumbers)
47 + this.Messaging.Write(ErrorMessages.OverridableActionCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
48 + if (null != collidingActionSymbol.SourceLineNumbers)
49 {
50 - this.Messaging.Write(ErrorMessages.OverridableActionCollision2(collidingActionTuple.SourceLineNumbers));
50 + this.Messaging.Write(ErrorMessages.OverridableActionCollision2(collidingActionSymbol.SourceLineNumbers));
51 }
52 }
53 else
54 {
55 - overridableActionTuples.Add(actionTuple.Id.Id, actionTuple);
55 + overridableActionSymbols.Add(actionSymbol.Id.Id, actionSymbol);
56 }
57 }
58 else // unsequenced or sequenced action.
59 {
60 // Unsequenced action (allowed for certain standard actions).
61 - if (null == actionTuple.Before && null == actionTuple.After && !actionTuple.Sequence.HasValue)
61 + if (null == actionSymbol.Before && null == actionSymbol.After && !actionSymbol.Sequence.HasValue)
62 {
63 - if (WindowsInstallerStandard.TryGetStandardAction(actionTuple.Id.Id, out var standardAction))
63 + if (WindowsInstallerStandard.TryGetStandardAction(actionSymbol.Id.Id, out var standardAction))
64 {
65 // Populate the sequence from the standard action
66 - actionTuple.Sequence = standardAction.Sequence;
66 + actionSymbol.Sequence = standardAction.Sequence;
67 }
68 else // not a supported unscheduled action.
69 {
@@ -71,109 +71,109 @@ namespace WixToolset.Core.WindowsInstaller.Bind
71 }
72 }
73
74 - if (requiredActionTuples.TryGetValue(actionTuple.Id.Id, out var collidingActionTuple))
74 + if (requiredActionSymbols.TryGetValue(actionSymbol.Id.Id, out var collidingActionSymbol))
75 {
76 - this.Messaging.Write(ErrorMessages.ActionCollision(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action));
77 - if (null != collidingActionTuple.SourceLineNumbers)
76 + this.Messaging.Write(ErrorMessages.ActionCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
77 + if (null != collidingActionSymbol.SourceLineNumbers)
78 {
79 - this.Messaging.Write(ErrorMessages.ActionCollision2(collidingActionTuple.SourceLineNumbers));
79 + this.Messaging.Write(ErrorMessages.ActionCollision2(collidingActionSymbol.SourceLineNumbers));
80 }
81 }
82 else
83 {
84 - requiredActionTuples.Add(actionTuple.Id.Id, actionTuple);
84 + requiredActionSymbols.Add(actionSymbol.Id.Id, actionSymbol);
85 }
86 }
87 }
88
89 - // Add the overridable action tuples that are not overridden to the required action tuples.
90 - foreach (var actionTuple in overridableActionTuples.Values)
89 + // Add the overridable action symbols that are not overridden to the required action symbols.
90 + foreach (var actionSymbol in overridableActionSymbols.Values)
91 {
92 - if (!requiredActionTuples.ContainsKey(actionTuple.Id.Id))
92 + if (!requiredActionSymbols.ContainsKey(actionSymbol.Id.Id))
93 {
94 - requiredActionTuples.Add(actionTuple.Id.Id, actionTuple);
94 + requiredActionSymbols.Add(actionSymbol.Id.Id, actionSymbol);
95 }
96 }
97
98 // Suppress the required actions that are overridable.
99 - foreach (var suppressActionTuple in this.Section.Tuples.OfType<WixSuppressActionTuple>())
99 + foreach (var suppressActionSymbol in this.Section.Symbols.OfType<WixSuppressActionSymbol>())
100 {
101 - var key = suppressActionTuple.Id.Id;
101 + var key = suppressActionSymbol.Id.Id;
102
103 - // If there is an overridable tuple to suppress; suppress it. There is no warning if there
103 + // If there is an overridable symbol to suppress; suppress it. There is no warning if there
104 // is no action to suppress because the action may be suppressed from a merge module in
105 // the binder.
106 - if (requiredActionTuples.TryGetValue(key, out var requiredActionTuple))
106 + if (requiredActionSymbols.TryGetValue(key, out var requiredActionSymbol))
107 {
108 - if (requiredActionTuple.Overridable)
108 + if (requiredActionSymbol.Overridable)
109 {
110 - this.Messaging.Write(WarningMessages.SuppressAction(suppressActionTuple.SourceLineNumbers, suppressActionTuple.Action, suppressActionTuple.SequenceTable.ToString()));
111 - if (null != requiredActionTuple.SourceLineNumbers)
110 + this.Messaging.Write(WarningMessages.SuppressAction(suppressActionSymbol.SourceLineNumbers, suppressActionSymbol.Action, suppressActionSymbol.SequenceTable.ToString()));
111 + if (null != requiredActionSymbol.SourceLineNumbers)
112 {
113 - this.Messaging.Write(WarningMessages.SuppressAction2(requiredActionTuple.SourceLineNumbers));
113 + this.Messaging.Write(WarningMessages.SuppressAction2(requiredActionSymbol.SourceLineNumbers));
114 }
115
116 - requiredActionTuples.Remove(key);
116 + requiredActionSymbols.Remove(key);
117 }
118 - else // suppressing a non-overridable action tuple
118 + else // suppressing a non-overridable action symbol
119 {
120 - this.Messaging.Write(ErrorMessages.SuppressNonoverridableAction(suppressActionTuple.SourceLineNumbers, suppressActionTuple.SequenceTable.ToString(), suppressActionTuple.Action));
121 - if (null != requiredActionTuple.SourceLineNumbers)
120 + this.Messaging.Write(ErrorMessages.SuppressNonoverridableAction(suppressActionSymbol.SourceLineNumbers, suppressActionSymbol.SequenceTable.ToString(), suppressActionSymbol.Action));
121 + if (null != requiredActionSymbol.SourceLineNumbers)
122 {
123 - this.Messaging.Write(ErrorMessages.SuppressNonoverridableAction2(requiredActionTuple.SourceLineNumbers));
123 + this.Messaging.Write(ErrorMessages.SuppressNonoverridableAction2(requiredActionSymbol.SourceLineNumbers));
124 }
125 }
126 }
127 }
128
129 // Build up dependency trees of the relatively scheduled actions.
130 - // Use ToList() to create a copy of the required action tuples so that new tuples can
130 + // Use ToList() to create a copy of the required action symbols so that new symbols can
131 // be added while enumerating.
132 - foreach (var actionTuple in requiredActionTuples.Values.ToList())
132 + foreach (var actionSymbol in requiredActionSymbols.Values.ToList())
133 {
134 - if (!actionTuple.Sequence.HasValue)
134 + if (!actionSymbol.Sequence.HasValue)
135 {
136 // check for standard actions that don't have a sequence number in a merge module
137 - if (SectionType.Module == this.Section.Type && WindowsInstallerStandard.IsStandardAction(actionTuple.Action))
137 + if (SectionType.Module == this.Section.Type && WindowsInstallerStandard.IsStandardAction(actionSymbol.Action))
138 {
139 - this.Messaging.Write(ErrorMessages.StandardActionRelativelyScheduledInModule(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action));
139 + this.Messaging.Write(ErrorMessages.StandardActionRelativelyScheduledInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
140 }
141
142 - this.SequenceActionTuple(actionTuple, requiredActionTuples);
142 + this.SequenceActionSymbol(actionSymbol, requiredActionSymbols);
143 }
144 - else if (SectionType.Module == this.Section.Type && 0 < actionTuple.Sequence && !WindowsInstallerStandard.IsStandardAction(actionTuple.Action)) // check for custom actions and dialogs that have a sequence number
144 + else if (SectionType.Module == this.Section.Type && 0 < actionSymbol.Sequence && !WindowsInstallerStandard.IsStandardAction(actionSymbol.Action)) // check for custom actions and dialogs that have a sequence number
145 {
146 - this.Messaging.Write(ErrorMessages.CustomActionSequencedInModule(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action));
146 + this.Messaging.Write(ErrorMessages.CustomActionSequencedInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
147 }
148 }
149
150 // Look for standard actions with sequence restrictions that aren't necessarily scheduled based
151 // on the presence of a particular table.
152 - if (requiredActionTuples.ContainsKey("InstallExecuteSequence/DuplicateFiles") && !requiredActionTuples.ContainsKey("InstallExecuteSequence/InstallFiles"))
152 + if (requiredActionSymbols.ContainsKey("InstallExecuteSequence/DuplicateFiles") && !requiredActionSymbols.ContainsKey("InstallExecuteSequence/InstallFiles"))
153 {
154 WindowsInstallerStandard.TryGetStandardAction("InstallExecuteSequence/InstallFiles", out var standardAction);
155 - requiredActionTuples.Add(standardAction.Id.Id, standardAction);
155 + requiredActionSymbols.Add(standardAction.Id.Id, standardAction);
156 }
157
158 // Schedule actions.
159 - List<WixActionTuple> scheduledActionTuples;
159 + List<WixActionSymbol> scheduledActionSymbols;
160 if (SectionType.Module == this.Section.Type)
161 {
162 - scheduledActionTuples = requiredActionTuples.Values.ToList();
162 + scheduledActionSymbols = requiredActionSymbols.Values.ToList();
163 }
164 else
165 {
166 - scheduledActionTuples = this.ScheduleActions(requiredActionTuples);
166 + scheduledActionSymbols = this.ScheduleActions(requiredActionSymbols);
167 }
168
169 - // Remove all existing WixActionTuples from the section then add the
169 + // Remove all existing WixActionSymbols from the section then add the
170 // scheduled actions back to the section. Note: we add the indices in
171 // reverse order to make it easy to remove them from the list later.
172 var removeIndices = new List<int>();
173 - for (var i = this.Section.Tuples.Count - 1; i >= 0; --i)
173 + for (var i = this.Section.Symbols.Count - 1; i >= 0; --i)
174 {
175 - var tuple = this.Section.Tuples[i];
176 - if (tuple.Definition.Type == TupleDefinitionType.WixAction)
175 + var symbol = this.Section.Symbols[i];
176 + if (symbol.Definition.Type == SymbolDefinitionType.WixAction)
177 {
178 removeIndices.Add(i);
179 }
@@ -181,164 +181,164 @@ namespace WixToolset.Core.WindowsInstaller.Bind
181
182 foreach (var removeIndex in removeIndices)
183 {
184 - this.Section.Tuples.RemoveAt(removeIndex);
184 + this.Section.Symbols.RemoveAt(removeIndex);
185 }
186
187 - foreach (var action in scheduledActionTuples)
187 + foreach (var action in scheduledActionSymbols)
188 {
189 - this.Section.AddTuple(action);
189 + this.Section.AddSymbol(action);
190 }
191 }
192
193 - private Dictionary<string, WixActionTuple> GetRequiredStandardActions()
193 + private Dictionary<string, WixActionSymbol> GetRequiredStandardActions()
194 {
195 - var overridableActionTuples = new Dictionary<string, WixActionTuple>();
195 + var overridableActionSymbols = new Dictionary<string, WixActionSymbol>();
196
197 var requiredActionIds = this.GetRequiredActionIds();
198
199 foreach (var actionId in requiredActionIds)
200 {
201 WindowsInstallerStandard.TryGetStandardAction(actionId, out var standardAction);
202 - overridableActionTuples.Add(standardAction.Id.Id, standardAction);
202 + overridableActionSymbols.Add(standardAction.Id.Id, standardAction);
203 }
204
205 - return overridableActionTuples;
205 + return overridableActionSymbols;
206 }
207
208 - private List<WixActionTuple> ScheduleActions(Dictionary<string, WixActionTuple> requiredActionTuples)
208 + private List<WixActionSymbol> ScheduleActions(Dictionary<string, WixActionSymbol> requiredActionSymbols)
209 {
210 - var scheduledActionTuples = new List<WixActionTuple>();
210 + var scheduledActionSymbols = new List<WixActionSymbol>();
211
212 // Process each sequence table individually.
213 foreach (SequenceTable sequenceTable in Enum.GetValues(typeof(SequenceTable)))
214 {
215 - // Create a collection of just the action tuples in this sequence
216 - var sequenceActionTuples = requiredActionTuples.Values.Where(a => a.SequenceTable == sequenceTable).ToList();
215 + // Create a collection of just the action symbols in this sequence
216 + var sequenceActionSymbols = requiredActionSymbols.Values.Where(a => a.SequenceTable == sequenceTable).ToList();
217
218 // Schedule the absolutely scheduled actions (by sorting them by their sequence numbers).
219 - var absoluteActionTuples = new List<WixActionTuple>();
220 - foreach (var actionTuple in sequenceActionTuples)
219 + var absoluteActionSymbols = new List<WixActionSymbol>();
220 + foreach (var actionSymbol in sequenceActionSymbols)
221 {
222 - if (actionTuple.Sequence.HasValue)
222 + if (actionSymbol.Sequence.HasValue)
223 {
224 // Look for sequence number collisions
225 - foreach (var sequenceScheduledActionTuple in absoluteActionTuples)
225 + foreach (var sequenceScheduledActionSymbol in absoluteActionSymbols)
226 {
227 - if (sequenceScheduledActionTuple.Sequence == actionTuple.Sequence)
227 + if (sequenceScheduledActionSymbol.Sequence == actionSymbol.Sequence)
228 {
229 - this.Messaging.Write(WarningMessages.ActionSequenceCollision(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action, sequenceScheduledActionTuple.Action, actionTuple.Sequence ?? 0));
230 - if (null != sequenceScheduledActionTuple.SourceLineNumbers)
229 + this.Messaging.Write(WarningMessages.ActionSequenceCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, sequenceScheduledActionSymbol.Action, actionSymbol.Sequence ?? 0));
230 + if (null != sequenceScheduledActionSymbol.SourceLineNumbers)
231 {
232 - this.Messaging.Write(WarningMessages.ActionSequenceCollision2(sequenceScheduledActionTuple.SourceLineNumbers));
232 + this.Messaging.Write(WarningMessages.ActionSequenceCollision2(sequenceScheduledActionSymbol.SourceLineNumbers));
233 }
234 }
235 }
236
237 - absoluteActionTuples.Add(actionTuple);
237 + absoluteActionSymbols.Add(actionSymbol);
238 }
239 }
240
241 - absoluteActionTuples.Sort((x, y) => (x.Sequence ?? 0).CompareTo(y.Sequence ?? 0));
241 + absoluteActionSymbols.Sort((x, y) => (x.Sequence ?? 0).CompareTo(y.Sequence ?? 0));
242
243 // Schedule the relatively scheduled actions (by resolving the dependency trees).
244 var previousUsedSequence = 0;
245 - var relativeActionTuples = new List<WixActionTuple>();
246 - for (int j = 0; j < absoluteActionTuples.Count; j++)
245 + var relativeActionSymbols = new List<WixActionSymbol>();
246 + for (int j = 0; j < absoluteActionSymbols.Count; j++)
247 {
248 - var absoluteActionTuple = absoluteActionTuples[j];
248 + var absoluteActionSymbol = absoluteActionSymbols[j];
249
250 - // Get all the relatively scheduled action tuples occuring before and after this absolutely scheduled action tuple.
251 - var relativeActions = this.GetAllRelativeActionsForSequenceType(sequenceTable, absoluteActionTuple);
250 + // Get all the relatively scheduled action symbols occuring before and after this absolutely scheduled action symbol.
251 + var relativeActions = this.GetAllRelativeActionsForSequenceType(sequenceTable, absoluteActionSymbol);
252
253 // Check for relatively scheduled actions occuring before/after a special action
254 // (those actions with a negative sequence number).
255 - if (absoluteActionTuple.Sequence < 0 && (relativeActions.PreviousActions.Any() || relativeActions.NextActions.Any()))
255 + if (absoluteActionSymbol.Sequence < 0 && (relativeActions.PreviousActions.Any() || relativeActions.NextActions.Any()))
256 {
257 // Create errors for all the before actions.
258 - foreach (var actionTuple in relativeActions.PreviousActions)
258 + foreach (var actionSymbol in relativeActions.PreviousActions)
259 {
260 - this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action, absoluteActionTuple.Action));
260 + this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, absoluteActionSymbol.Action));
261 }
262
263 // Create errors for all the after actions.
264 - foreach (var actionTuple in relativeActions.NextActions)
264 + foreach (var actionSymbol in relativeActions.NextActions)
265 {
266 - this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action, absoluteActionTuple.Action));
266 + this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, absoluteActionSymbol.Action));
267 }
268
269 // If there is source line information for the absolutely scheduled action display it
270 - if (absoluteActionTuple.SourceLineNumbers != null)
270 + if (absoluteActionSymbol.SourceLineNumbers != null)
271 {
272 - this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction2(absoluteActionTuple.SourceLineNumbers));
272 + this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction2(absoluteActionSymbol.SourceLineNumbers));
273 }
274
275 continue;
276 }
277
278 - // Schedule the action tuples before this one.
279 - var unusedSequence = absoluteActionTuple.Sequence - 1;
278 + // Schedule the action symbols before this one.
279 + var unusedSequence = absoluteActionSymbol.Sequence - 1;
280 for (var i = relativeActions.PreviousActions.Count - 1; i >= 0; i--)
281 {
282 - var relativeActionTuple = relativeActions.PreviousActions[i];
282 + var relativeActionSymbol = relativeActions.PreviousActions[i];
283
284 // look for collisions
285 if (unusedSequence == previousUsedSequence)
286 {
287 - this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber(relativeActionTuple.SourceLineNumbers, relativeActionTuple.SequenceTable.ToString(), relativeActionTuple.Action, absoluteActionTuple.Action));
288 - if (absoluteActionTuple.SourceLineNumbers != null)
287 + this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber(relativeActionSymbol.SourceLineNumbers, relativeActionSymbol.SequenceTable.ToString(), relativeActionSymbol.Action, absoluteActionSymbol.Action));
288 + if (absoluteActionSymbol.SourceLineNumbers != null)
289 {
290 - this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber2(absoluteActionTuple.SourceLineNumbers));
290 + this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber2(absoluteActionSymbol.SourceLineNumbers));
291 }
292
293 unusedSequence++;
294 }
295
296 - relativeActionTuple.Sequence = unusedSequence;
297 - relativeActionTuples.Add(relativeActionTuple);
296 + relativeActionSymbol.Sequence = unusedSequence;
297 + relativeActionSymbols.Add(relativeActionSymbol);
298
299 unusedSequence--;
300 }
301
302 // Determine the next used action sequence number.
303 var nextUsedSequence = Int16.MaxValue + 1;
304 - if (absoluteActionTuples.Count > j + 1)
304 + if (absoluteActionSymbols.Count > j + 1)
305 {
306 - nextUsedSequence = absoluteActionTuples[j + 1].Sequence ?? 0;
306 + nextUsedSequence = absoluteActionSymbols[j + 1].Sequence ?? 0;
307 }
308
309 - // Schedule the action tuples after this one.
310 - unusedSequence = absoluteActionTuple.Sequence + 1;
309 + // Schedule the action symbols after this one.
310 + unusedSequence = absoluteActionSymbol.Sequence + 1;
311 for (var i = 0; i < relativeActions.NextActions.Count; i++)
312 {
313 - var relativeActionTuple = relativeActions.NextActions[i];
313 + var relativeActionSymbol = relativeActions.NextActions[i];
314
315 if (unusedSequence == nextUsedSequence)
316 {
317 - this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber(relativeActionTuple.SourceLineNumbers, relativeActionTuple.SequenceTable.ToString(), relativeActionTuple.Action, absoluteActionTuple.Action));
318 - if (absoluteActionTuple.SourceLineNumbers != null)
317 + this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber(relativeActionSymbol.SourceLineNumbers, relativeActionSymbol.SequenceTable.ToString(), relativeActionSymbol.Action, absoluteActionSymbol.Action));
318 + if (absoluteActionSymbol.SourceLineNumbers != null)
319 {
320 - this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber2(absoluteActionTuple.SourceLineNumbers));
320 + this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber2(absoluteActionSymbol.SourceLineNumbers));
321 }
322
323 unusedSequence--;
324 }
325
326 - relativeActionTuple.Sequence = unusedSequence;
327 - relativeActionTuples.Add(relativeActionTuple);
326 + relativeActionSymbol.Sequence = unusedSequence;
327 + relativeActionSymbols.Add(relativeActionSymbol);
328
329 unusedSequence++;
330 }
331
332 // keep track of this sequence number as the previous used sequence number for the next iteration
333 - previousUsedSequence = absoluteActionTuple.Sequence ?? 0;
333 + previousUsedSequence = absoluteActionSymbol.Sequence ?? 0;
334 }
335
336 // add the absolutely and relatively scheduled actions to the list of scheduled actions
337 - scheduledActionTuples.AddRange(absoluteActionTuples);
338 - scheduledActionTuples.AddRange(relativeActionTuples);
337 + scheduledActionSymbols.AddRange(absoluteActionSymbols);
338 + scheduledActionSymbols.AddRange(relativeActionSymbols);
339 }
340
341 - return scheduledActionTuples;
341 + return scheduledActionSymbols;
342 }
343
344 private IEnumerable<string> GetRequiredActionIds()
@@ -396,16 +396,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind
396 set.Add("InstallUISequence/ValidateProductID");
397 }
398
399 - // Gather the required actions for each tuple type.
400 - foreach (var tupleType in this.Section.Tuples.Select(t => t.Definition.Type).Distinct())
399 + // Gather the required actions for each symbol type.
400 + foreach (var symbolType in this.Section.Symbols.Select(t => t.Definition.Type).Distinct())
401 {
402 - switch (tupleType)
402 + switch (symbolType)
403 {
404 - case TupleDefinitionType.AppSearch:
404 + case SymbolDefinitionType.AppSearch:
405 set.Add("InstallExecuteSequence/AppSearch");
406 set.Add("InstallUISequence/AppSearch");
407 break;
408 - case TupleDefinitionType.CCPSearch:
408 + case SymbolDefinitionType.CCPSearch:
409 set.Add("InstallExecuteSequence/AppSearch");
410 set.Add("InstallExecuteSequence/CCPSearch");
411 set.Add("InstallExecuteSequence/RMCCPSearch");
@@ -413,40 +413,40 @@ namespace WixToolset.Core.WindowsInstaller.Bind
413 set.Add("InstallUISequence/CCPSearch");
414 set.Add("InstallUISequence/RMCCPSearch");
415 break;
416 - case TupleDefinitionType.Class:
416 + case SymbolDefinitionType.Class:
417 set.Add("AdvertiseExecuteSequence/RegisterClassInfo");
418 set.Add("InstallExecuteSequence/RegisterClassInfo");
419 set.Add("InstallExecuteSequence/UnregisterClassInfo");
420 break;
421 - case TupleDefinitionType.Complus:
421 + case SymbolDefinitionType.Complus:
422 set.Add("InstallExecuteSequence/RegisterComPlus");
423 set.Add("InstallExecuteSequence/UnregisterComPlus");
424 break;
425 - case TupleDefinitionType.CreateFolder:
425 + case SymbolDefinitionType.CreateFolder:
426 set.Add("InstallExecuteSequence/CreateFolders");
427 set.Add("InstallExecuteSequence/RemoveFolders");
428 break;
429 - case TupleDefinitionType.DuplicateFile:
429 + case SymbolDefinitionType.DuplicateFile:
430 set.Add("InstallExecuteSequence/DuplicateFiles");
431 set.Add("InstallExecuteSequence/RemoveDuplicateFiles");
432 break;
433 - case TupleDefinitionType.Environment:
433 + case SymbolDefinitionType.Environment:
434 set.Add("InstallExecuteSequence/WriteEnvironmentStrings");
435 set.Add("InstallExecuteSequence/RemoveEnvironmentStrings");
436 break;
437 - case TupleDefinitionType.Extension:
437 + case SymbolDefinitionType.Extension:
438 set.Add("AdvertiseExecuteSequence/RegisterExtensionInfo");
439 set.Add("InstallExecuteSequence/RegisterExtensionInfo");
440 set.Add("InstallExecuteSequence/UnregisterExtensionInfo");
441 break;
442 - case TupleDefinitionType.File:
442 + case SymbolDefinitionType.File:
443 set.Add("InstallExecuteSequence/InstallFiles");
444 set.Add("InstallExecuteSequence/RemoveFiles");
445
446 var foundFont = false;
447 var foundSelfReg = false;
448 var foundBindPath = false;
449 - foreach (var file in this.Section.Tuples.OfType<FileTuple>())
449 + foreach (var file in this.Section.Symbols.OfType<FileSymbol>())
450 {
451 if (!foundFont && !String.IsNullOrEmpty(file.FontTitle))
452 {
@@ -469,83 +469,83 @@ namespace WixToolset.Core.WindowsInstaller.Bind
469 }
470 }
471 break;
472 - case TupleDefinitionType.IniFile:
472 + case SymbolDefinitionType.IniFile:
473 set.Add("InstallExecuteSequence/WriteIniValues");
474 set.Add("InstallExecuteSequence/RemoveIniValues");
475 break;
476 - case TupleDefinitionType.IsolatedComponent:
476 + case SymbolDefinitionType.IsolatedComponent:
477 set.Add("InstallExecuteSequence/IsolateComponents");
478 break;
479 - case TupleDefinitionType.LaunchCondition:
479 + case SymbolDefinitionType.LaunchCondition:
480 set.Add("InstallExecuteSequence/LaunchConditions");
481 set.Add("InstallUISequence/LaunchConditions");
482 break;
483 - case TupleDefinitionType.MIME:
483 + case SymbolDefinitionType.MIME:
484 set.Add("AdvertiseExecuteSequence/RegisterMIMEInfo");
485 set.Add("InstallExecuteSequence/RegisterMIMEInfo");
486 set.Add("InstallExecuteSequence/UnregisterMIMEInfo");
487 break;
488 - case TupleDefinitionType.MoveFile:
488 + case SymbolDefinitionType.MoveFile:
489 set.Add("InstallExecuteSequence/MoveFiles");
490 break;
491 - case TupleDefinitionType.Assembly:
491 + case SymbolDefinitionType.Assembly:
492 set.Add("AdvertiseExecuteSequence/MsiPublishAssemblies");
493 set.Add("InstallExecuteSequence/MsiPublishAssemblies");
494 set.Add("InstallExecuteSequence/MsiUnpublishAssemblies");
495 break;
496 - case TupleDefinitionType.MsiServiceConfig:
497 - case TupleDefinitionType.MsiServiceConfigFailureActions:
496 + case SymbolDefinitionType.MsiServiceConfig:
497 + case SymbolDefinitionType.MsiServiceConfigFailureActions:
498 set.Add("InstallExecuteSequence/MsiConfigureServices");
499 break;
500 - case TupleDefinitionType.ODBCDataSource:
501 - case TupleDefinitionType.ODBCTranslator:
502 - case TupleDefinitionType.ODBCDriver:
500 + case SymbolDefinitionType.ODBCDataSource:
501 + case SymbolDefinitionType.ODBCTranslator:
502 + case SymbolDefinitionType.ODBCDriver:
503 set.Add("InstallExecuteSequence/SetODBCFolders");
504 set.Add("InstallExecuteSequence/InstallODBC");
505 set.Add("InstallExecuteSequence/RemoveODBC");
506 break;
507 - case TupleDefinitionType.ProgId:
507 + case SymbolDefinitionType.ProgId:
508 set.Add("AdvertiseExecuteSequence/RegisterProgIdInfo");
509 set.Add("InstallExecuteSequence/RegisterProgIdInfo");
510 set.Add("InstallExecuteSequence/UnregisterProgIdInfo");
511 break;
512 - case TupleDefinitionType.PublishComponent:
512 + case SymbolDefinitionType.PublishComponent:
513 set.Add("AdvertiseExecuteSequence/PublishComponents");
514 set.Add("InstallExecuteSequence/PublishComponents");
515 set.Add("InstallExecuteSequence/UnpublishComponents");
516 break;
517 - case TupleDefinitionType.Registry:
518 - case TupleDefinitionType.RemoveRegistry:
517 + case SymbolDefinitionType.Registry:
518 + case SymbolDefinitionType.RemoveRegistry:
519 set.Add("InstallExecuteSequence/WriteRegistryValues");
520 set.Add("InstallExecuteSequence/RemoveRegistryValues");
521 break;
522 - case TupleDefinitionType.RemoveFile:
522 + case SymbolDefinitionType.RemoveFile:
523 set.Add("InstallExecuteSequence/RemoveFiles");
524 break;
525 - case TupleDefinitionType.ServiceControl:
525 + case SymbolDefinitionType.ServiceControl:
526 set.Add("InstallExecuteSequence/StartServices");
527 set.Add("InstallExecuteSequence/StopServices");
528 set.Add("InstallExecuteSequence/DeleteServices");
529 break;
530 - case TupleDefinitionType.ServiceInstall:
530 + case SymbolDefinitionType.ServiceInstall:
531 set.Add("InstallExecuteSequence/InstallServices");
532 break;
533 - case TupleDefinitionType.Shortcut:
533 + case SymbolDefinitionType.Shortcut:
534 set.Add("AdvertiseExecuteSequence/CreateShortcuts");
535 set.Add("InstallExecuteSequence/CreateShortcuts");
536 set.Add("InstallExecuteSequence/RemoveShortcuts");
537 break;
538 - case TupleDefinitionType.TypeLib:
538 + case SymbolDefinitionType.TypeLib:
539 set.Add("InstallExecuteSequence/RegisterTypeLibraries");
540 set.Add("InstallExecuteSequence/UnregisterTypeLibraries");
541 break;
542 - case TupleDefinitionType.Upgrade:
542 + case SymbolDefinitionType.Upgrade:
543 set.Add("InstallExecuteSequence/FindRelatedProducts");
544 set.Add("InstallUISequence/FindRelatedProducts");
545
546 // Only add the MigrateFeatureStates action if MigrateFeature attribute is set on
547 // at least one UpgradeVersion element.
548 - if (this.Section.Tuples.OfType<UpgradeTuple>().Any(t => t.MigrateFeatures))
548 + if (this.Section.Symbols.OfType<UpgradeSymbol>().Any(t => t.MigrateFeatures))
549 {
550 set.Add("InstallExecuteSequence/MigrateFeatureStates");
551 set.Add("InstallUISequence/MigrateFeatureStates");
@@ -557,7 +557,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
557 return set;
558 }
559
560 - private IEnumerable<WixActionTuple> GetActions(SequenceTable sequence, string[] actionNames)
560 + private IEnumerable<WixActionSymbol> GetActions(SequenceTable sequence, string[] actionNames)
561 {
562 foreach (var action in WindowsInstallerStandard.StandardActions())
563 {
@@ -571,64 +571,64 @@ namespace WixToolset.Core.WindowsInstaller.Bind
571 /// <summary>
572 /// Sequence an action before or after a standard action.
573 /// </summary>
574 - /// <param name="actionTuple">The action tuple to be sequenced.</param>
575 - /// <param name="requiredActionTuples">Collection of actions which must be included.</param>
576 - private void SequenceActionTuple(WixActionTuple actionTuple, Dictionary<string, WixActionTuple> requiredActionTuples)
574 + /// <param name="actionSymbol">The action symbol to be sequenced.</param>
575 + /// <param name="requiredActionSymbols">Collection of actions which must be included.</param>
576 + private void SequenceActionSymbol(WixActionSymbol actionSymbol, Dictionary<string, WixActionSymbol> requiredActionSymbols)
577 {
578 var after = false;
579
580 - if (actionTuple.After != null)
580 + if (actionSymbol.After != null)
581 {
582 after = true;
583 }
584 - else if (actionTuple.Before == null)
584 + else if (actionSymbol.Before == null)
585 {
586 throw new InvalidOperationException("Found an action with no Sequence, Before, or After column set.");
587 }
588
589 - var parentActionName = (after ? actionTuple.After : actionTuple.Before);
590 - var parentActionKey = actionTuple.SequenceTable.ToString() + "/" + parentActionName;
589 + var parentActionName = (after ? actionSymbol.After : actionSymbol.Before);
590 + var parentActionKey = actionSymbol.SequenceTable.ToString() + "/" + parentActionName;
591
592 - if (!requiredActionTuples.TryGetValue(parentActionKey, out var parentActionTuple))
592 + if (!requiredActionSymbols.TryGetValue(parentActionKey, out var parentActionSymbol))
593 {
594 // If the missing parent action is a standard action (with a suggested sequence number), add it.
595 - if (WindowsInstallerStandard.TryGetStandardAction(parentActionKey, out parentActionTuple))
595 + if (WindowsInstallerStandard.TryGetStandardAction(parentActionKey, out parentActionSymbol))
596 {
597 // Create a clone to avoid modifying the static copy of the object.
598 - // TODO: consider this: parentActionTuple = parentActionTuple.Clone();
598 + // TODO: consider this: parentActionSymbol = parentActionSymbol.Clone();
599
600 - requiredActionTuples.Add(parentActionTuple.Id.Id, parentActionTuple);
600 + requiredActionSymbols.Add(parentActionSymbol.Id.Id, parentActionSymbol);
601 }
602 else
603 {
604 throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, "Found an action with a non-existent {0} action: {1}.", (after ? "After" : "Before"), parentActionName));
605 }
606 }
607 - else if (actionTuple == parentActionTuple || this.ContainsChildActionTuple(actionTuple, parentActionTuple)) // cycle detected
607 + else if (actionSymbol == parentActionSymbol || this.ContainsChildActionSymbol(actionSymbol, parentActionSymbol)) // cycle detected
608 {
609 - throw new WixException(ErrorMessages.ActionCircularDependency(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action, parentActionTuple.Action));
609 + throw new WixException(ErrorMessages.ActionCircularDependency(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, parentActionSymbol.Action));
610 }
611
612 - // Add this action to the appropriate list of dependent action tuples.
613 - var relativeActions = this.GetRelativeActions(parentActionTuple);
614 - var relatedTuples = (after ? relativeActions.NextActions : relativeActions.PreviousActions);
615 - relatedTuples.Add(actionTuple);
612 + // Add this action to the appropriate list of dependent action symbols.
613 + var relativeActions = this.GetRelativeActions(parentActionSymbol);
614 + var relatedSymbols = (after ? relativeActions.NextActions : relativeActions.PreviousActions);
615 + relatedSymbols.Add(actionSymbol);
616 }
617
618 - private bool ContainsChildActionTuple(WixActionTuple childTuple, WixActionTuple parentTuple)
618 + private bool ContainsChildActionSymbol(WixActionSymbol childSymbol, WixActionSymbol parentSymbol)
619 {
620 var result = false;
621
622 - if (this.RelativeActionsForActions.TryGetValue(childTuple.Id.Id, out var relativeActions))
622 + if (this.RelativeActionsForActions.TryGetValue(childSymbol.Id.Id, out var relativeActions))
623 {
624 - result = relativeActions.NextActions.Any(a => a.SequenceTable == parentTuple.SequenceTable && a.Id.Id == parentTuple.Id.Id) ||
625 - relativeActions.PreviousActions.Any(a => a.SequenceTable == parentTuple.SequenceTable && a.Id.Id == parentTuple.Id.Id);
624 + result = relativeActions.NextActions.Any(a => a.SequenceTable == parentSymbol.SequenceTable && a.Id.Id == parentSymbol.Id.Id) ||
625 + relativeActions.PreviousActions.Any(a => a.SequenceTable == parentSymbol.SequenceTable && a.Id.Id == parentSymbol.Id.Id);
626 }
627
628 return result;
629 }
630
631 - private RelativeActions GetRelativeActions(WixActionTuple action)
631 + private RelativeActions GetRelativeActions(WixActionSymbol action)
632 {
633 if (!this.RelativeActionsForActions.TryGetValue(action.Id.Id, out var relativeActions))
634 {
@@ -639,7 +639,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
639 return relativeActions;
640 }
641
642 - private RelativeActions GetAllRelativeActionsForSequenceType(SequenceTable sequenceType, WixActionTuple action)
642 + private RelativeActions GetAllRelativeActionsForSequenceType(SequenceTable sequenceType, WixActionSymbol action)
643 {
644 var relativeActions = new RelativeActions();
645
@@ -653,7 +653,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
653 return relativeActions;
654 }
655
656 - private void RecurseRelativeActionsForSequenceType(SequenceTable sequenceType, List<WixActionTuple> actions, List<WixActionTuple> visitedActions)
656 + private void RecurseRelativeActionsForSequenceType(SequenceTable sequenceType, List<WixActionSymbol> actions, List<WixActionSymbol> visitedActions)
657 {
658 foreach (var action in actions.Where(a => a.SequenceTable == sequenceType))
659 {
@@ -673,9 +673,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
673
674 private class RelativeActions
675 {
676 - public List<WixActionTuple> PreviousActions { get; } = new List<WixActionTuple>();
676 + public List<WixActionSymbol> PreviousActions { get; } = new List<WixActionSymbol>();
677
678 - public List<WixActionTuple> NextActions { get; } = new List<WixActionTuple>();
678 + public List<WixActionSymbol> NextActions { get; } = new List<WixActionSymbol>();
679 }
680 }
681 }
src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
+25 -25
@@ -11,7 +11,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
11 using WixToolset.Core.Bind;
12 using WixToolset.Core.WindowsInstaller.Msi;
13 using WixToolset.Data;
14 - using WixToolset.Data.Tuples;
14 + using WixToolset.Data.Symbols;
15 using WixToolset.Extensibility.Services;
16
17 /// <summary>
@@ -43,15 +43,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
43
44 public void Execute()
45 {
46 - var assemblyNameTuples = this.Section.Tuples.OfType<MsiAssemblyNameTuple>().ToDictionary(t => t.Id.Id);
46 + var assemblyNameSymbols = this.Section.Symbols.OfType<MsiAssemblyNameSymbol>().ToDictionary(t => t.Id.Id);
47
48 foreach (var file in this.UpdateFileFacades)
49 {
50 - this.UpdateFileFacade(file, assemblyNameTuples);
50 + this.UpdateFileFacade(file, assemblyNameSymbols);
51 }
52 }
53
54 - private void UpdateFileFacade(FileFacade facade, Dictionary<string, MsiAssemblyNameTuple> assemblyNameTuples)
54 + private void UpdateFileFacade(FileFacade facade, Dictionary<string, MsiAssemblyNameSymbol> assemblyNameSymbols)
55 {
56 FileInfo fileInfo = null;
57 try
@@ -155,7 +155,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
155
156 if (null == facade.Hash)
157 {
158 - facade.Hash = this.Section.AddTuple(new MsiFileHashTuple(facade.SourceLineNumber, facade.Identifier));
158 + facade.Hash = this.Section.AddSymbol(new MsiFileHashSymbol(facade.SourceLineNumber, facade.Identifier));
159 }
160
161 facade.Hash.Options = 0;
@@ -220,23 +220,23 @@ namespace WixToolset.Core.WindowsInstaller.Bind
220 {
221 var assemblyName = AssemblyNameReader.ReadAssembly(facade.SourceLineNumber, fileInfo.FullName, version);
222
223 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "name", assemblyName.Name);
224 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "culture", assemblyName.Culture);
225 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "version", assemblyName.Version);
223 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "name", assemblyName.Name);
224 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "culture", assemblyName.Culture);
225 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "version", assemblyName.Version);
226
227 if (!String.IsNullOrEmpty(assemblyName.Architecture))
228 {
229 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "processorArchitecture", assemblyName.Architecture);
229 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "processorArchitecture", assemblyName.Architecture);
230 }
231 // TODO: WiX v3 seemed to do this but not clear it should actually be done.
232 //else if (!String.IsNullOrEmpty(file.WixFile.ProcessorArchitecture))
233 //{
234 - // this.SetMsiAssemblyName(assemblyNameTuples, file, "processorArchitecture", file.WixFile.ProcessorArchitecture);
234 + // this.SetMsiAssemblyName(assemblyNameSymbols, file, "processorArchitecture", file.WixFile.ProcessorArchitecture);
235 //}
236
237 if (assemblyName.StrongNamedSigned)
238 {
239 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "publicKeyToken", assemblyName.PublicKeyToken);
239 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "publicKeyToken", assemblyName.PublicKeyToken);
240 }
241 else if (facade.AssemblyApplicationFileRef == null)
242 {
@@ -245,7 +245,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
245
246 if (!String.IsNullOrEmpty(assemblyName.FileVersion))
247 {
248 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "fileVersion", assemblyName.FileVersion);
248 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "fileVersion", assemblyName.FileVersion);
249 }
250
251 // add the assembly name to the information cache
@@ -276,27 +276,27 @@ namespace WixToolset.Core.WindowsInstaller.Bind
276
277 if (!String.IsNullOrEmpty(assemblyName.Name))
278 {
279 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "name", assemblyName.Name);
279 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "name", assemblyName.Name);
280 }
281
282 if (!String.IsNullOrEmpty(assemblyName.Version))
283 {
284 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "version", assemblyName.Version);
284 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "version", assemblyName.Version);
285 }
286
287 if (!String.IsNullOrEmpty(assemblyName.Type))
288 {
289 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "type", assemblyName.Type);
289 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "type", assemblyName.Type);
290 }
291
292 if (!String.IsNullOrEmpty(assemblyName.Architecture))
293 {
294 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "processorArchitecture", assemblyName.Architecture);
294 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "processorArchitecture", assemblyName.Architecture);
295 }
296
297 if (!String.IsNullOrEmpty(assemblyName.PublicKeyToken))
298 {
299 - this.SetMsiAssemblyName(assemblyNameTuples, facade, "publicKeyToken", assemblyName.PublicKeyToken);
299 + this.SetMsiAssemblyName(assemblyNameSymbols, facade, "publicKeyToken", assemblyName.PublicKeyToken);
300 }
301 }
302 catch (WixException e)
@@ -310,11 +310,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
310 /// Set an MsiAssemblyName row. If it was directly authored, override the value, otherwise
311 /// create a new row.
312 /// </summary>
313 - /// <param name="assemblyNameTuples">MsiAssemblyName table.</param>
313 + /// <param name="assemblyNameSymbols">MsiAssemblyName table.</param>
314 /// <param name="facade">FileFacade containing the assembly read for the MsiAssemblyName row.</param>
315 /// <param name="name">MsiAssemblyName name.</param>
316 /// <param name="value">MsiAssemblyName value.</param>
317 - private void SetMsiAssemblyName(Dictionary<string, MsiAssemblyNameTuple> assemblyNameTuples, FileFacade facade, string name, string value)
317 + private void SetMsiAssemblyName(Dictionary<string, MsiAssemblyNameSymbol> assemblyNameSymbols, FileFacade facade, string name, string value)
318 {
319 // check for null value (this can occur when grabbing the file version from an assembly without one)
320 if (String.IsNullOrEmpty(value))
@@ -333,9 +333,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
333
334 // override directly authored value
335 var lookup = String.Concat(facade.ComponentRef, "/", name);
336 - if (!assemblyNameTuples.TryGetValue(lookup, out var assemblyNameTuple))
336 + if (!assemblyNameSymbols.TryGetValue(lookup, out var assemblyNameSymbol))
337 {
338 - assemblyNameTuple = this.Section.AddTuple(new MsiAssemblyNameTuple(facade.SourceLineNumber, new Identifier(AccessModifier.Private, facade.ComponentRef, name))
338 + assemblyNameSymbol = this.Section.AddSymbol(new MsiAssemblyNameSymbol(facade.SourceLineNumber, new Identifier(AccessModifier.Private, facade.ComponentRef, name))
339 {
340 ComponentRef = facade.ComponentRef,
341 Name = name,
@@ -344,15 +344,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
344
345 if (null == facade.AssemblyNames)
346 {
347 - facade.AssemblyNames = new List<MsiAssemblyNameTuple>();
347 + facade.AssemblyNames = new List<MsiAssemblyNameSymbol>();
348 }
349
350 - facade.AssemblyNames.Add(assemblyNameTuple);
350 + facade.AssemblyNames.Add(assemblyNameSymbol);
351
352 - assemblyNameTuples.Add(assemblyNameTuple.Id.Id, assemblyNameTuple);
352 + assemblyNameSymbols.Add(assemblyNameSymbol.Id.Id, assemblyNameSymbol);
353 }
354
355 - assemblyNameTuple.Value = value;
355 + assemblyNameSymbol.Value = value;
356
357 if (this.VariableCache != null)
358 {
src/WixToolset.Core.WindowsInstaller/Bind/UpdateFromTextFilesCommand.cs
+4 -4
@@ -6,7 +6,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
6 using System.IO;
7 using System.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility.Services;
11
12 internal class UpdateFromTextFilesCommand
@@ -23,17 +23,17 @@ namespace WixToolset.Core.WindowsInstaller.Bind
23
24 public void Execute()
25 {
26 - foreach (var bbControl in this.Section.Tuples.OfType<BBControlTuple>().Where(t => t.SourceFile != null))
26 + foreach (var bbControl in this.Section.Symbols.OfType<BBControlSymbol>().Where(t => t.SourceFile != null))
27 {
28 bbControl.Text = this.ReadTextFile(bbControl.SourceLineNumbers, bbControl.SourceFile.Path);
29 }
30
31 - foreach (var control in this.Section.Tuples.OfType<ControlTuple>().Where(t => t.SourceFile != null))
31 + foreach (var control in this.Section.Symbols.OfType<ControlSymbol>().Where(t => t.SourceFile != null))
32 {
33 control.Text = this.ReadTextFile(control.SourceLineNumbers, control.SourceFile.Path);
34 }
35
36 - foreach (var customAction in this.Section.Tuples.OfType<CustomActionTuple>().Where(c => c.ScriptFile != null))
36 + foreach (var customAction in this.Section.Symbols.OfType<CustomActionSymbol>().Where(c => c.ScriptFile != null))
37 {
38 customAction.Target = this.ReadTextFile(customAction.SourceLineNumbers, customAction.ScriptFile.Path);
39 }
src/WixToolset.Core.WindowsInstaller/Bind/UpdateMediaSequencesCommand.cs
+19 -19
@@ -6,7 +6,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
6 using System.Linq;
7 using WixToolset.Core.Bind;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10
11 internal class UpdateMediaSequencesCommand
12 {
@@ -22,7 +22,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
22
23 public void Execute()
24 {
25 - var mediaRows = this.Section.Tuples.OfType<MediaTuple>().ToDictionary(t => t.DiskId);
25 + var mediaRows = this.Section.Symbols.OfType<MediaSymbol>().ToDictionary(t => t.DiskId);
26
27 // Calculate sequence numbers and media disk id layout for all file media information objects.
28 if (SectionType.Module == this.Section.Type)
@@ -37,25 +37,25 @@ namespace WixToolset.Core.WindowsInstaller.Bind
37 else
38 {
39 var lastSequence = 0;
40 - MediaTuple mediaTuple = null;
40 + MediaSymbol mediaSymbol = null;
41 var patchGroups = new Dictionary<int, List<FileFacade>>();
42
43 // sequence the non-patch-added files
44 foreach (var facade in this.FileFacades)
45 {
46 - if (null == mediaTuple)
46 + if (null == mediaSymbol)
47 {
48 - mediaTuple = mediaRows[facade.DiskId];
48 + mediaSymbol = mediaRows[facade.DiskId];
49 if (SectionType.Patch == this.Section.Type)
50 {
51 // patch Media cannot start at zero
52 - lastSequence = mediaTuple.LastSequence ?? 1;
52 + lastSequence = mediaSymbol.LastSequence ?? 1;
53 }
54 }
55 - else if (mediaTuple.DiskId != facade.DiskId)
55 + else if (mediaSymbol.DiskId != facade.DiskId)
56 {
57 - mediaTuple.LastSequence = lastSequence;
58 - mediaTuple = mediaRows[facade.DiskId];
57 + mediaSymbol.LastSequence = lastSequence;
58 + mediaSymbol = mediaRows[facade.DiskId];
59 }
60
61 if (facade.PatchGroup.HasValue)
@@ -74,10 +74,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
74 }
75 }
76
77 - if (null != mediaTuple)
77 + if (null != mediaSymbol)
78 {
79 - mediaTuple.LastSequence = lastSequence;
80 - mediaTuple = null;
79 + mediaSymbol.LastSequence = lastSequence;
80 + mediaSymbol = null;
81 }
82
83 // sequence the patch-added files
@@ -85,23 +85,23 @@ namespace WixToolset.Core.WindowsInstaller.Bind
85 {
86 foreach (var facade in patchGroup)
87 {
88 - if (null == mediaTuple)
88 + if (null == mediaSymbol)
89 {
90 - mediaTuple = mediaRows[facade.DiskId];
90 + mediaSymbol = mediaRows[facade.DiskId];
91 }
92 - else if (mediaTuple.DiskId != facade.DiskId)
92 + else if (mediaSymbol.DiskId != facade.DiskId)
93 {
94 - mediaTuple.LastSequence = lastSequence;
95 - mediaTuple = mediaRows[facade.DiskId];
94 + mediaSymbol.LastSequence = lastSequence;
95 + mediaSymbol = mediaRows[facade.DiskId];
96 }
97
98 facade.Sequence = ++lastSequence;
99 }
100 }
101
102 - if (null != mediaTuple)
102 + if (null != mediaSymbol)
103 {
104 - mediaTuple.LastSequence = lastSequence;
104 + mediaSymbol.LastSequence = lastSequence;
105 }
106 }
107 }
src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
+7 -7
@@ -7,7 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.Linq;
8 using WixToolset.Core.Bind;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Data.WindowsInstaller;
12 using WixToolset.Data.WindowsInstaller.Rows;
13 using WixToolset.Extensibility.Services;
@@ -307,9 +307,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
307 ref duplicateFilesSequence);
308 if (!hasPatchFilesAction)
309 {
310 - WindowsInstallerStandard.TryGetStandardAction(tableName, "PatchFiles", out var patchFilesActionTuple);
310 + WindowsInstallerStandard.TryGetStandardAction(tableName, "PatchFiles", out var patchFilesActionSymbol);
311
312 - var sequence = patchFilesActionTuple.Sequence;
312 + var sequence = patchFilesActionSymbol.Sequence;
313
314 // Test for default sequence value's appropriateness
315 if (installFilesSequence >= sequence || (0 != duplicateFilesSequence && duplicateFilesSequence <= sequence))
@@ -318,14 +318,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind
318 {
319 if (duplicateFilesSequence < installFilesSequence)
320 {
321 - throw new WixException(ErrorMessages.InsertInvalidSequenceActionOrder(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionTuple.Action));
321 + throw new WixException(ErrorMessages.InsertInvalidSequenceActionOrder(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action));
322 }
323 else
324 {
325 sequence = (duplicateFilesSequence + installFilesSequence) / 2;
326 if (installFilesSequence == sequence || duplicateFilesSequence == sequence)
327 {
328 - throw new WixException(ErrorMessages.InsertSequenceNoSpace(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionTuple.Action));
328 + throw new WixException(ErrorMessages.InsertSequenceNoSpace(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action));
329 }
330 }
331 }
@@ -342,8 +342,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
342 }
343
344 var patchAction = sequenceTable.CreateRow(null);
345 - patchAction[0] = patchFilesActionTuple.Action;
346 - patchAction[1] = patchFilesActionTuple.Condition;
345 + patchAction[0] = patchFilesActionSymbol.Action;
346 + patchAction[1] = patchFilesActionSymbol.Condition;
347 patchAction[2] = sequence;
348 patchAction.Operation = RowOperation.Add;
349 }
src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs
+8 -8
@@ -6,7 +6,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
6 using System.Collections.Generic;
7 using System.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility.Services;
11
12 /// <summary>
@@ -32,30 +32,30 @@ namespace WixToolset.Core.WindowsInstaller.Bind
32 {
33 var componentGuidConditions = new Dictionary<string, bool>();
34
35 - foreach (var componentTuple in this.Section.Tuples.OfType<ComponentTuple>())
35 + foreach (var componentSymbol in this.Section.Symbols.OfType<ComponentSymbol>())
36 {
37 // We don't care about unmanaged components and if there's a * GUID remaining,
38 // there's already an error that prevented it from being replaced with a real GUID.
39 - if (!String.IsNullOrEmpty(componentTuple.ComponentId) && "*" != componentTuple.ComponentId)
39 + if (!String.IsNullOrEmpty(componentSymbol.ComponentId) && "*" != componentSymbol.ComponentId)
40 {
41 - var thisComponentHasCondition = !String.IsNullOrEmpty(componentTuple.Condition);
41 + var thisComponentHasCondition = !String.IsNullOrEmpty(componentSymbol.Condition);
42 var allComponentsHaveConditions = thisComponentHasCondition;
43
44 - if (componentGuidConditions.TryGetValue(componentTuple.ComponentId, out var alreadyCheckedCondition))
44 + if (componentGuidConditions.TryGetValue(componentSymbol.ComponentId, out var alreadyCheckedCondition))
45 {
46 allComponentsHaveConditions = thisComponentHasCondition && alreadyCheckedCondition;
47
48 if (allComponentsHaveConditions)
49 {
50 - this.Messaging.Write(WarningMessages.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(componentTuple.SourceLineNumbers, componentTuple.Id.Id, componentTuple.ComponentId));
50 + this.Messaging.Write(WarningMessages.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId));
51 }
52 else
53 {
54 - this.Messaging.Write(ErrorMessages.DuplicateComponentGuids(componentTuple.SourceLineNumbers, componentTuple.Id.Id, componentTuple.ComponentId));
54 + this.Messaging.Write(ErrorMessages.DuplicateComponentGuids(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId));
55 }
56 }
57
58 - componentGuidConditions[componentTuple.ComponentId] = allComponentsHaveConditions;
58 + componentGuidConditions[componentSymbol.ComponentId] = allComponentsHaveConditions;
59 }
60 }
61 }
src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+109 -109
@@ -14,7 +14,7 @@ namespace WixToolset.Core.WindowsInstaller
14 using System.Xml.Linq;
15 using WixToolset.Core;
16 using WixToolset.Data;
17 - using WixToolset.Data.Tuples;
17 + using WixToolset.Data.Symbols;
18 using WixToolset.Data.WindowsInstaller;
19 using WixToolset.Data.WindowsInstaller.Rows;
20 using WixToolset.Extensibility;
@@ -92,7 +92,7 @@ namespace WixToolset.Core.WindowsInstaller
92
93 private OutputType OutputType { get; set; }
94
95 - private Dictionary<string, WixActionTuple> StandardActions { get; }
95 + private Dictionary<string, WixActionSymbol> StandardActions { get; }
96
97 /// <summary>
98 /// Decompile the database file.
@@ -262,23 +262,23 @@ namespace WixToolset.Core.WindowsInstaller
262 /// <summary>
263 /// Creates an action element.
264 /// </summary>
265 - /// <param name="actionTuple">The action from which the element should be created.</param>
266 - private void CreateActionElement(WixActionTuple actionTuple)
265 + /// <param name="actionSymbol">The action from which the element should be created.</param>
266 + private void CreateActionElement(WixActionSymbol actionSymbol)
267 {
268 Wix.ISchemaElement actionElement = null;
269
270 - if (null != this.core.GetIndexedElement("CustomAction", actionTuple.Action)) // custom action
270 + if (null != this.core.GetIndexedElement("CustomAction", actionSymbol.Action)) // custom action
271 {
272 var custom = new Wix.Custom();
273
274 - custom.Action = actionTuple.Action;
274 + custom.Action = actionSymbol.Action;
275
276 - if (null != actionTuple.Condition)
276 + if (null != actionSymbol.Condition)
277 {
278 - custom.Content = actionTuple.Condition;
278 + custom.Content = actionSymbol.Condition;
279 }
280
281 - switch (actionTuple.Sequence)
281 + switch (actionSymbol.Sequence)
282 {
283 case (-4):
284 custom.OnExit = Wix.ExitType.suspend;
@@ -293,35 +293,35 @@ namespace WixToolset.Core.WindowsInstaller
293 custom.OnExit = Wix.ExitType.success;
294 break;
295 default:
296 - if (null != actionTuple.Before)
296 + if (null != actionSymbol.Before)
297 {
298 - custom.Before = actionTuple.Before;
298 + custom.Before = actionSymbol.Before;
299 }
300 - else if (null != actionTuple.After)
300 + else if (null != actionSymbol.After)
301 {
302 - custom.After = actionTuple.After;
302 + custom.After = actionSymbol.After;
303 }
304 - else if (actionTuple.Sequence.HasValue)
304 + else if (actionSymbol.Sequence.HasValue)
305 {
306 - custom.Sequence = actionTuple.Sequence.Value;
306 + custom.Sequence = actionSymbol.Sequence.Value;
307 }
308 break;
309 }
310
311 actionElement = custom;
312 }
313 - else if (null != this.core.GetIndexedElement("Dialog", actionTuple.Action)) // dialog
313 + else if (null != this.core.GetIndexedElement("Dialog", actionSymbol.Action)) // dialog
314 {
315 var show = new Wix.Show();
316
317 - show.Dialog = actionTuple.Action;
317 + show.Dialog = actionSymbol.Action;
318
319 - if (null != actionTuple.Condition)
319 + if (null != actionSymbol.Condition)
320 {
321 - show.Content = actionTuple.Condition;
321 + show.Content = actionSymbol.Condition;
322 }
323
324 - switch (actionTuple.Sequence)
324 + switch (actionSymbol.Sequence)
325 {
326 case (-4):
327 show.OnExit = Wix.ExitType.suspend;
@@ -336,17 +336,17 @@ namespace WixToolset.Core.WindowsInstaller
336 show.OnExit = Wix.ExitType.success;
337 break;
338 default:
339 - if (null != actionTuple.Before)
339 + if (null != actionSymbol.Before)
340 {
341 - show.Before = actionTuple.Before;
341 + show.Before = actionSymbol.Before;
342 }
343 - else if (null != actionTuple.After)
343 + else if (null != actionSymbol.After)
344 {
345 - show.After = actionTuple.After;
345 + show.After = actionSymbol.After;
346 }
347 - else if (actionTuple.Sequence.HasValue)
347 + else if (actionSymbol.Sequence.HasValue)
348 {
349 - show.Sequence = actionTuple.Sequence.Value;
349 + show.Sequence = actionSymbol.Sequence.Value;
350 }
351 break;
352 }
@@ -355,18 +355,18 @@ namespace WixToolset.Core.WindowsInstaller
355 }
356 else // possibly a standard action without suggested sequence information
357 {
358 - actionElement = this.CreateStandardActionElement(actionTuple);
358 + actionElement = this.CreateStandardActionElement(actionSymbol);
359 }
360
361 // add the action element to the appropriate sequence element
362 if (null != actionElement)
363 {
364 - var sequenceTable = actionTuple.SequenceTable.ToString();
364 + var sequenceTable = actionSymbol.SequenceTable.ToString();
365 var sequenceElement = (Wix.IParentElement)this.sequenceElements[sequenceTable];
366
367 if (null == sequenceElement)
368 {
369 - switch (actionTuple.SequenceTable)
369 + switch (actionSymbol.SequenceTable)
370 {
371 case SequenceTable.AdminExecuteSequence:
372 sequenceElement = new Wix.AdminExecuteSequence();
@@ -397,7 +397,7 @@ namespace WixToolset.Core.WindowsInstaller
397 }
398 catch (System.ArgumentException) // action/dialog is not valid for this sequence
399 {
400 - this.Messaging.Write(WarningMessages.IllegalActionInSequence(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action));
400 + this.Messaging.Write(WarningMessages.IllegalActionInSequence(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
401 }
402 }
403 }
@@ -405,40 +405,40 @@ namespace WixToolset.Core.WindowsInstaller
405 /// <summary>
406 /// Creates a standard action element.
407 /// </summary>
408 - /// <param name="actionTuple">The action row from which the element should be created.</param>
408 + /// <param name="actionSymbol">The action row from which the element should be created.</param>
409 /// <returns>The created element.</returns>
410 - private Wix.ISchemaElement CreateStandardActionElement(WixActionTuple actionTuple)
410 + private Wix.ISchemaElement CreateStandardActionElement(WixActionSymbol actionSymbol)
411 {
412 Wix.ActionSequenceType actionElement = null;
413
414 - switch (actionTuple.Action)
414 + switch (actionSymbol.Action)
415 {
416 case "AllocateRegistrySpace":
417 actionElement = new Wix.AllocateRegistrySpace();
418 break;
419 case "AppSearch":
420 - this.StandardActions.TryGetValue(actionTuple.Id.Id, out var appSearchActionRow);
420 + this.StandardActions.TryGetValue(actionSymbol.Id.Id, out var appSearchActionRow);
421
422 - if (null != actionTuple.Before || null != actionTuple.After || (null != appSearchActionRow && actionTuple.Sequence != appSearchActionRow.Sequence))
422 + if (null != actionSymbol.Before || null != actionSymbol.After || (null != appSearchActionRow && actionSymbol.Sequence != appSearchActionRow.Sequence))
423 {
424 var appSearch = new Wix.AppSearch();
425
426 - if (null != actionTuple.Condition)
426 + if (null != actionSymbol.Condition)
427 {
428 - appSearch.Content = actionTuple.Condition;
428 + appSearch.Content = actionSymbol.Condition;
429 }
430
431 - if (null != actionTuple.Before)
431 + if (null != actionSymbol.Before)
432 {
433 - appSearch.Before = actionTuple.Before;
433 + appSearch.Before = actionSymbol.Before;
434 }
435 - else if (null != actionTuple.After)
435 + else if (null != actionSymbol.After)
436 {
437 - appSearch.After = actionTuple.After;
437 + appSearch.After = actionSymbol.After;
438 }
439 - else if (actionTuple.Sequence.HasValue)
439 + else if (actionSymbol.Sequence.HasValue)
440 {
441 - appSearch.Sequence = actionTuple.Sequence.Value;
441 + appSearch.Sequence = actionSymbol.Sequence.Value;
442 }
443
444 return appSearch;
@@ -449,7 +449,7 @@ namespace WixToolset.Core.WindowsInstaller
449 break;
450 case "CCPSearch":
451 var ccpSearch = new Wix.CCPSearch();
452 - Decompiler.SequenceRelativeAction(actionTuple, ccpSearch);
452 + Decompiler.SequenceRelativeAction(actionSymbol, ccpSearch);
453 return ccpSearch;
454 case "CostFinalize":
455 actionElement = new Wix.CostFinalize();
@@ -468,7 +468,7 @@ namespace WixToolset.Core.WindowsInstaller
468 break;
469 case "DisableRollback":
470 var disableRollback = new Wix.DisableRollback();
471 - Decompiler.SequenceRelativeAction(actionTuple, disableRollback);
471 + Decompiler.SequenceRelativeAction(actionSymbol, disableRollback);
472 return disableRollback;
473 case "DuplicateFiles":
474 actionElement = new Wix.DuplicateFiles();
@@ -481,22 +481,22 @@ namespace WixToolset.Core.WindowsInstaller
481 break;
482 case "FindRelatedProducts":
483 var findRelatedProducts = new Wix.FindRelatedProducts();
484 - Decompiler.SequenceRelativeAction(actionTuple, findRelatedProducts);
484 + Decompiler.SequenceRelativeAction(actionSymbol, findRelatedProducts);
485 return findRelatedProducts;
486 case "ForceReboot":
487 var forceReboot = new Wix.ForceReboot();
488 - Decompiler.SequenceRelativeAction(actionTuple, forceReboot);
488 + Decompiler.SequenceRelativeAction(actionSymbol, forceReboot);
489 return forceReboot;
490 case "InstallAdminPackage":
491 actionElement = new Wix.InstallAdminPackage();
492 break;
493 case "InstallExecute":
494 var installExecute = new Wix.InstallExecute();
495 - Decompiler.SequenceRelativeAction(actionTuple, installExecute);
495 + Decompiler.SequenceRelativeAction(actionSymbol, installExecute);
496 return installExecute;
497 case "InstallExecuteAgain":
498 var installExecuteAgain = new Wix.InstallExecuteAgain();
499 - Decompiler.SequenceRelativeAction(actionTuple, installExecuteAgain);
499 + Decompiler.SequenceRelativeAction(actionSymbol, installExecuteAgain);
500 return installExecuteAgain;
501 case "InstallFiles":
502 actionElement = new Wix.InstallFiles();
@@ -521,7 +521,7 @@ namespace WixToolset.Core.WindowsInstaller
521 break;
522 case "LaunchConditions":
523 var launchConditions = new Wix.LaunchConditions();
524 - Decompiler.SequenceRelativeAction(actionTuple, launchConditions);
524 + Decompiler.SequenceRelativeAction(actionSymbol, launchConditions);
525 return launchConditions;
526 case "MigrateFeatureStates":
527 actionElement = new Wix.MigrateFeatureStates();
@@ -585,7 +585,7 @@ namespace WixToolset.Core.WindowsInstaller
585 break;
586 case "RemoveExistingProducts":
587 var removeExistingProducts = new Wix.RemoveExistingProducts();
588 - Decompiler.SequenceRelativeAction(actionTuple, removeExistingProducts);
588 + Decompiler.SequenceRelativeAction(actionSymbol, removeExistingProducts);
589 return removeExistingProducts;
590 case "RemoveFiles":
591 actionElement = new Wix.RemoveFiles();
@@ -607,15 +607,15 @@ namespace WixToolset.Core.WindowsInstaller
607 break;
608 case "ResolveSource":
609 var resolveSource = new Wix.ResolveSource();
610 - Decompiler.SequenceRelativeAction(actionTuple, resolveSource);
610 + Decompiler.SequenceRelativeAction(actionSymbol, resolveSource);
611 return resolveSource;
612 case "RMCCPSearch":
613 var rmccpSearch = new Wix.RMCCPSearch();
614 - Decompiler.SequenceRelativeAction(actionTuple, rmccpSearch);
614 + Decompiler.SequenceRelativeAction(actionSymbol, rmccpSearch);
615 return rmccpSearch;
616 case "ScheduleReboot":
617 var scheduleReboot = new Wix.ScheduleReboot();
618 - Decompiler.SequenceRelativeAction(actionTuple, scheduleReboot);
618 + Decompiler.SequenceRelativeAction(actionSymbol, scheduleReboot);
619 return scheduleReboot;
620 case "SelfRegModules":
621 actionElement = new Wix.SelfRegModules();
@@ -672,13 +672,13 @@ namespace WixToolset.Core.WindowsInstaller
672 actionElement = new Wix.WriteRegistryValues();
673 break;
674 default:
675 - this.Messaging.Write(WarningMessages.UnknownAction(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action));
675 + this.Messaging.Write(WarningMessages.UnknownAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
676 return null;
677 }
678
679 if (actionElement != null)
680 {
681 - this.SequenceStandardAction(actionTuple, actionElement);
681 + this.SequenceStandardAction(actionSymbol, actionElement);
682 }
683
684 return actionElement;
@@ -687,48 +687,48 @@ namespace WixToolset.Core.WindowsInstaller
687 /// <summary>
688 /// Applies the condition and sequence to a standard action element based on the action row data.
689 /// </summary>
690 - /// <param name="actionTuple">Action data from the database.</param>
690 + /// <param name="actionSymbol">Action data from the database.</param>
691 /// <param name="actionElement">Element to be sequenced.</param>
692 - private void SequenceStandardAction(WixActionTuple actionTuple, Wix.ActionSequenceType actionElement)
692 + private void SequenceStandardAction(WixActionSymbol actionSymbol, Wix.ActionSequenceType actionElement)
693 {
694 - if (null != actionTuple.Condition)
694 + if (null != actionSymbol.Condition)
695 {
696 - actionElement.Content = actionTuple.Condition;
696 + actionElement.Content = actionSymbol.Condition;
697 }
698
699 - if ((null != actionTuple.Before || null != actionTuple.After) && 0 == actionTuple.Sequence)
699 + if ((null != actionSymbol.Before || null != actionSymbol.After) && 0 == actionSymbol.Sequence)
700 {
701 - this.Messaging.Write(WarningMessages.DecompiledStandardActionRelativelyScheduledInModule(actionTuple.SourceLineNumbers, actionTuple.SequenceTable.ToString(), actionTuple.Action));
701 + this.Messaging.Write(WarningMessages.DecompiledStandardActionRelativelyScheduledInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
702 }
703 - else if (actionTuple.Sequence.HasValue)
703 + else if (actionSymbol.Sequence.HasValue)
704 {
705 - actionElement.Sequence = actionTuple.Sequence.Value;
705 + actionElement.Sequence = actionSymbol.Sequence.Value;
706 }
707 }
708
709 /// <summary>
710 /// Applies the condition and relative sequence to an action element based on the action row data.
711 /// </summary>
712 - /// <param name="actionTuple">Action data from the database.</param>
712 + /// <param name="actionSymbol">Action data from the database.</param>
713 /// <param name="actionElement">Element to be sequenced.</param>
714 - private static void SequenceRelativeAction(WixActionTuple actionTuple, Wix.ActionModuleSequenceType actionElement)
714 + private static void SequenceRelativeAction(WixActionSymbol actionSymbol, Wix.ActionModuleSequenceType actionElement)
715 {
716 - if (null != actionTuple.Condition)
716 + if (null != actionSymbol.Condition)
717 {
718 - actionElement.Content = actionTuple.Condition;
718 + actionElement.Content = actionSymbol.Condition;
719 }
720
721 - if (null != actionTuple.Before)
721 + if (null != actionSymbol.Before)
722 {
723 - actionElement.Before = actionTuple.Before;
723 + actionElement.Before = actionSymbol.Before;
724 }
725 - else if (null != actionTuple.After)
725 + else if (null != actionSymbol.After)
726 {
727 - actionElement.After = actionTuple.After;
727 + actionElement.After = actionSymbol.After;
728 }
729 - else if (actionTuple.Sequence.HasValue)
729 + else if (actionSymbol.Sequence.HasValue)
730 {
731 - actionElement.Sequence = actionTuple.Sequence.Value;
731 + actionElement.Sequence = actionSymbol.Sequence.Value;
732 }
733 }
734
@@ -2507,53 +2507,53 @@ namespace WixToolset.Core.WindowsInstaller
2507
2508 if (null != table)
2509 {
2510 - var actionTuples = new List<WixActionTuple>();
2510 + var actionSymbols = new List<WixActionSymbol>();
2511 var needAbsoluteScheduling = this.SuppressRelativeActionSequencing;
2512 - var nonSequencedActionRows = new Dictionary<string, WixActionTuple>();
2513 - var suppressedRelativeActionRows = new Dictionary<string, WixActionTuple>();
2512 + var nonSequencedActionRows = new Dictionary<string, WixActionSymbol>();
2513 + var suppressedRelativeActionRows = new Dictionary<string, WixActionSymbol>();
2514
2515 // create a sorted array of actions in this table
2516 foreach (var row in table.Rows)
2517 {
2518 var action = row.FieldAsString(0);
2519 - var actionTuple = new WixActionTuple(null, new Identifier(AccessModifier.Public, sequenceTable, action));
2519 + var actionSymbol = new WixActionSymbol(null, new Identifier(AccessModifier.Public, sequenceTable, action));
2520
2521 - actionTuple.Action = action;
2521 + actionSymbol.Action = action;
2522
2523 if (null != row[1])
2524 {
2525 - actionTuple.Condition = Convert.ToString(row[1]);
2525 + actionSymbol.Condition = Convert.ToString(row[1]);
2526 }
2527
2528 - actionTuple.Sequence = Convert.ToInt32(row[2]);
2528 + actionSymbol.Sequence = Convert.ToInt32(row[2]);
2529
2530 - actionTuple.SequenceTable = sequenceTable;
2530 + actionSymbol.SequenceTable = sequenceTable;
2531
2532 - actionTuples.Add(actionTuple);
2532 + actionSymbols.Add(actionSymbol);
2533 }
2534 - actionTuples = actionTuples.OrderBy(t => t.Sequence).ToList();
2534 + actionSymbols = actionSymbols.OrderBy(t => t.Sequence).ToList();
2535
2536 - for (var i = 0; i < actionTuples.Count && !needAbsoluteScheduling; i++)
2536 + for (var i = 0; i < actionSymbols.Count && !needAbsoluteScheduling; i++)
2537 {
2538 - var actionTuple = actionTuples[i];
2539 - this.StandardActions.TryGetValue(actionTuple.Id.Id, out var standardActionRow);
2538 + var actionSymbol = actionSymbols[i];
2539 + this.StandardActions.TryGetValue(actionSymbol.Id.Id, out var standardActionRow);
2540
2541 // create actions for custom actions, dialogs, AppSearch when its moved, and standard actions with non-standard conditions
2542 - if ("AppSearch" == actionTuple.Action || null == standardActionRow || actionTuple.Condition != standardActionRow.Condition)
2542 + if ("AppSearch" == actionSymbol.Action || null == standardActionRow || actionSymbol.Condition != standardActionRow.Condition)
2543 {
2544 - WixActionTuple previousActionTuple = null;
2545 - WixActionTuple nextActionTuple = null;
2544 + WixActionSymbol previousActionSymbol = null;
2545 + WixActionSymbol nextActionSymbol = null;
2546
2547 // find the previous action row if there is one
2548 if (0 <= i - 1)
2549 {
2550 - previousActionTuple = actionTuples[i - 1];
2550 + previousActionSymbol = actionSymbols[i - 1];
2551 }
2552
2553 // find the next action row if there is one
2554 - if (actionTuples.Count > i + 1)
2554 + if (actionSymbols.Count > i + 1)
2555 {
2556 - nextActionTuple = actionTuples[i + 1];
2556 + nextActionSymbol = actionSymbols[i + 1];
2557 }
2558
2559 // the logic for setting the before or after attribute for an action:
@@ -2565,47 +2565,47 @@ namespace WixToolset.Core.WindowsInstaller
2565 // 6. If this action is AppSearch and has all standard information, ignore it.
2566 // 7. If this action is standard and has a non-standard condition, create the action without any scheduling information.
2567 // 8. Everything must be absolutely sequenced.
2568 - if ((null != previousActionTuple && actionTuple.Sequence == previousActionTuple.Sequence) || (null != nextActionTuple && actionTuple.Sequence == nextActionTuple.Sequence))
2568 + if ((null != previousActionSymbol && actionSymbol.Sequence == previousActionSymbol.Sequence) || (null != nextActionSymbol && actionSymbol.Sequence == nextActionSymbol.Sequence))
2569 {
2570 needAbsoluteScheduling = true;
2571 }
2572 - else if (null != nextActionTuple && this.StandardActions.ContainsKey(nextActionTuple.Id.Id) && actionTuple.Sequence + 1 == nextActionTuple.Sequence)
2572 + else if (null != nextActionSymbol && this.StandardActions.ContainsKey(nextActionSymbol.Id.Id) && actionSymbol.Sequence + 1 == nextActionSymbol.Sequence)
2573 {
2574 - actionTuple.Before = nextActionTuple.Action;
2574 + actionSymbol.Before = nextActionSymbol.Action;
2575 }
2576 - else if (null != previousActionTuple && this.StandardActions.ContainsKey(previousActionTuple.Id.Id) && actionTuple.Sequence - 1 == previousActionTuple.Sequence)
2576 + else if (null != previousActionSymbol && this.StandardActions.ContainsKey(previousActionSymbol.Id.Id) && actionSymbol.Sequence - 1 == previousActionSymbol.Sequence)
2577 {
2578 - actionTuple.After = previousActionTuple.Action;
2578 + actionSymbol.After = previousActionSymbol.Action;
2579 }
2580 - else if (null == standardActionRow && null != previousActionTuple && actionTuple.Sequence - 1 == previousActionTuple.Sequence && previousActionTuple.Before != actionTuple.Action)
2580 + else if (null == standardActionRow && null != previousActionSymbol && actionSymbol.Sequence - 1 == previousActionSymbol.Sequence && previousActionSymbol.Before != actionSymbol.Action)
2581 {
2582 - actionTuple.After = previousActionTuple.Action;
2582 + actionSymbol.After = previousActionSymbol.Action;
2583 }
2584 - else if (null == standardActionRow && null != previousActionTuple && actionTuple.Sequence != previousActionTuple.Sequence && null != nextActionTuple && actionTuple.Sequence + 1 == nextActionTuple.Sequence)
2584 + else if (null == standardActionRow && null != previousActionSymbol && actionSymbol.Sequence != previousActionSymbol.Sequence && null != nextActionSymbol && actionSymbol.Sequence + 1 == nextActionSymbol.Sequence)
2585 {
2586 - actionTuple.Before = nextActionTuple.Action;
2586 + actionSymbol.Before = nextActionSymbol.Action;
2587 }
2588 - else if ("AppSearch" == actionTuple.Action && null != standardActionRow && actionTuple.Sequence == standardActionRow.Sequence && actionTuple.Condition == standardActionRow.Condition)
2588 + else if ("AppSearch" == actionSymbol.Action && null != standardActionRow && actionSymbol.Sequence == standardActionRow.Sequence && actionSymbol.Condition == standardActionRow.Condition)
2589 {
2590 // ignore an AppSearch row which has the WiX standard sequence and a standard condition
2591 }
2592 - else if (null != standardActionRow && actionTuple.Condition != standardActionRow.Condition) // standard actions get their standard sequence numbers
2592 + else if (null != standardActionRow && actionSymbol.Condition != standardActionRow.Condition) // standard actions get their standard sequence numbers
2593 {
2594 - nonSequencedActionRows.Add(actionTuple.Id.Id, actionTuple);
2594 + nonSequencedActionRows.Add(actionSymbol.Id.Id, actionSymbol);
2595 }
2596 - else if (0 < actionTuple.Sequence)
2596 + else if (0 < actionSymbol.Sequence)
2597 {
2598 needAbsoluteScheduling = true;
2599 }
2600 }
2601 else
2602 {
2603 - suppressedRelativeActionRows.Add(actionTuple.Id.Id, actionTuple);
2603 + suppressedRelativeActionRows.Add(actionSymbol.Id.Id, actionSymbol);
2604 }
2605 }
2606
2607 // create the actions now that we know if they must be absolutely or relatively scheduled
2608 - foreach (var actionRow in actionTuples)
2608 + foreach (var actionRow in actionSymbols)
2609 {
2610 var key = actionRow.Id.Id;
2611
@@ -2650,7 +2650,7 @@ namespace WixToolset.Core.WindowsInstaller
2650 {
2651 foreach (var row in table.Rows)
2652 {
2653 - var actionRow = new WixActionTuple(null, new Identifier(AccessModifier.Public, sequenceTable, row.FieldAsString(0)));
2653 + var actionRow = new WixActionSymbol(null, new Identifier(AccessModifier.Public, sequenceTable, row.FieldAsString(0)));
2654
2655 actionRow.Action = row.FieldAsString(0);
2656
src/WixToolset.Core.WindowsInstaller/Differ.cs
+1 -1
@@ -10,7 +10,7 @@ namespace WixToolset.Core.WindowsInstaller
10 using System.Globalization;
11 using WixToolset.Core.WindowsInstaller.Msi;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Data.WindowsInstaller;
15 using WixToolset.Data.WindowsInstaller.Rows;
16 using WixToolset.Extensibility;
src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs
+10 -10
@@ -9,34 +9,34 @@ namespace WixToolset.Core.WindowsInstaller.ExtensibilityServices
9
10 internal class WindowsInstallerBackendHelper : IWindowsInstallerBackendHelper
11 {
12 - public Row CreateRow(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinition tableDefinition)
12 + public Row CreateRow(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinition tableDefinition)
13 {
14 var table = output.EnsureTable(tableDefinition);
15
16 - var row = table.CreateRow(tuple.SourceLineNumbers);
16 + var row = table.CreateRow(symbol.SourceLineNumbers);
17 row.SectionId = section.Id;
18
19 return row;
20 }
21
22 - public bool TryAddTupleToOutputMatchingTableDefinitions(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinitionCollection tableDefinitions)
22 + public bool TryAddSymbolToOutputMatchingTableDefinitions(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinitionCollection tableDefinitions)
23 {
24 - var tableDefinition = tableDefinitions.FirstOrDefault(t => t.TupleDefinition?.Name == tuple.Definition.Name);
24 + var tableDefinition = tableDefinitions.FirstOrDefault(t => t.SymbolDefinition?.Name == symbol.Definition.Name);
25 if (tableDefinition == null)
26 {
27 return false;
28 }
29
30 - var row = this.CreateRow(section, tuple, output, tableDefinition);
30 + var row = this.CreateRow(section, symbol, output, tableDefinition);
31 var rowOffset = 0;
32
33 - if (tableDefinition.TupleIdIsPrimaryKey)
33 + if (tableDefinition.SymbolIdIsPrimaryKey)
34 {
35 - row[0] = tuple.Id.Id;
35 + row[0] = symbol.Id.Id;
36 rowOffset = 1;
37 }
38
39 - for (var i = 0; i < tuple.Fields.Length; ++i)
39 + for (var i = 0; i < symbol.Fields.Length; ++i)
40 {
41 if (i < tableDefinition.Columns.Length)
42 {
@@ -45,11 +45,11 @@ namespace WixToolset.Core.WindowsInstaller.ExtensibilityServices
45 switch (column.Type)
46 {
47 case ColumnType.Number:
48 - row[i + rowOffset] = column.Nullable ? tuple.AsNullableNumber(i) : tuple.AsNumber(i);
48 + row[i + rowOffset] = column.Nullable ? symbol.AsNullableNumber(i) : symbol.AsNumber(i);
49 break;
50
51 default:
52 - row[i + rowOffset] = tuple.AsString(i);
52 + row[i + rowOffset] = symbol.AsString(i);
53 break;
54 }
55 }
src/WixToolset.Core.WindowsInstaller/MspBackend.cs
+1 -1
@@ -10,7 +10,7 @@ namespace WixToolset.Core.WindowsInstaller
10 using WixToolset.Core.WindowsInstaller.Msi;
11 using WixToolset.Core.WindowsInstaller.Unbind;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Data.WindowsInstaller;
15 using WixToolset.Extensibility;
16 using WixToolset.Extensibility.Data;
src/WixToolset.Core/Bind/DelayedField.cs
+6 -6
@@ -6,26 +6,26 @@ namespace WixToolset.Core.Bind
6 using WixToolset.Extensibility.Data;
7
8 /// <summary>
9 - /// Structure used to hold a row and field that contain binder variables, which need to be resolved
9 + /// Holds a symbol and field that contain binder variables, which need to be resolved
10 /// later, once the files have been resolved.
11 /// </summary>
12 internal class DelayedField : IDelayedField
13 {
14 /// <summary>
15 - /// Basic constructor for struct
15 + /// Creates a delayed field.
16 /// </summary>
17 - /// <param name="row">Row for the field.</param>
17 + /// <param name="symbol">Symbol for the field.</param>
18 /// <param name="field">Field needing further resolution.</param>
19 - public DelayedField(IntermediateTuple row, IntermediateField field)
19 + public DelayedField(IntermediateSymbol symbol, IntermediateField field)
20 {
21 - this.Row = row;
21 + this.Symbol = symbol;
22 this.Field = field;
23 }
24
25 /// <summary>
26 /// The row containing the field.
27 /// </summary>
28 - public IntermediateTuple Row { get; }
28 + public IntermediateSymbol Symbol { get; }
29
30 /// <summary>
31 /// The field needing further resolving.
src/WixToolset.Core/Bind/FileFacade.cs
+29 -29
@@ -5,25 +5,25 @@ namespace WixToolset.Core.Bind
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8 - using WixToolset.Data.Tuples;
8 + using WixToolset.Data.Symbols;
9 using WixToolset.Data.WindowsInstaller;
10 using WixToolset.Data.WindowsInstaller.Rows;
11
12 public class FileFacade
13 {
14 - public FileFacade(FileTuple file, AssemblyTuple assembly)
14 + public FileFacade(FileSymbol file, AssemblySymbol assembly)
15 {
16 - this.FileTuple = file;
17 - this.AssemblyTuple = assembly;
16 + this.FileSymbol = file;
17 + this.AssemblySymbol = assembly;
18
19 this.Identifier = file.Id;
20 this.ComponentRef = file.ComponentRef;
21 }
22
23 - public FileFacade(bool fromModule, FileTuple file)
23 + public FileFacade(bool fromModule, FileSymbol file)
24 {
25 this.FromModule = fromModule;
26 - this.FileTuple = file;
26 + this.FileSymbol = file;
27
28 this.Identifier = file.Id;
29 this.ComponentRef = file.ComponentRef;
@@ -44,9 +44,9 @@ namespace WixToolset.Core.Bind
44
45 private FileRow FileRow { get; }
46
47 - private FileTuple FileTuple { get; }
47 + private FileSymbol FileSymbol { get; }
48
49 - private AssemblyTuple AssemblyTuple { get; }
49 + private AssemblySymbol AssemblySymbol { get; }
50
51 public string Id => this.Identifier.Id;
52
@@ -56,12 +56,12 @@ namespace WixToolset.Core.Bind
56
57 public int DiskId
58 {
59 - get => this.FileRow == null ? this.FileTuple.DiskId ?? 1 : this.FileRow.DiskId;
59 + get => this.FileRow == null ? this.FileSymbol.DiskId ?? 1 : this.FileRow.DiskId;
60 set
61 {
62 if (this.FileRow == null)
63 {
64 - this.FileTuple.DiskId = value;
64 + this.FileSymbol.DiskId = value;
65 }
66 else
67 {
@@ -70,16 +70,16 @@ namespace WixToolset.Core.Bind
70 }
71 }
72
73 - public string FileName => this.FileRow == null ? this.FileTuple.Name : this.FileRow.FileName;
73 + public string FileName => this.FileRow == null ? this.FileSymbol.Name : this.FileRow.FileName;
74
75 public int FileSize
76 {
77 - get => this.FileRow == null ? this.FileTuple.FileSize : this.FileRow.FileSize;
77 + get => this.FileRow == null ? this.FileSymbol.FileSize : this.FileRow.FileSize;
78 set
79 {
80 if (this.FileRow == null)
81 {
82 - this.FileTuple.FileSize = value;
82 + this.FileSymbol.FileSize = value;
83 }
84 else
85 {
@@ -90,12 +90,12 @@ namespace WixToolset.Core.Bind
90
91 public string Language
92 {
93 - get => this.FileRow == null ? this.FileTuple.Language : this.FileRow.Language;
93 + get => this.FileRow == null ? this.FileSymbol.Language : this.FileRow.Language;
94 set
95 {
96 if (this.FileRow == null)
97 {
98 - this.FileTuple.Language = value;
98 + this.FileSymbol.Language = value;
99 }
100 else
101 {
@@ -104,16 +104,16 @@ namespace WixToolset.Core.Bind
104 }
105 }
106
107 - public int? PatchGroup => this.FileRow == null ? this.FileTuple.PatchGroup : null;
107 + public int? PatchGroup => this.FileRow == null ? this.FileSymbol.PatchGroup : null;
108
109 public int Sequence
110 {
111 - get => this.FileRow == null ? this.FileTuple.Sequence : this.FileRow.Sequence;
111 + get => this.FileRow == null ? this.FileSymbol.Sequence : this.FileRow.Sequence;
112 set
113 {
114 if (this.FileRow == null)
115 {
116 - this.FileTuple.Sequence = value;
116 + this.FileSymbol.Sequence = value;
117 }
118 else
119 {
@@ -122,22 +122,22 @@ namespace WixToolset.Core.Bind
122 }
123 }
124
125 - public SourceLineNumber SourceLineNumber => this.FileRow == null ? this.FileTuple.SourceLineNumbers : this.FileRow.SourceLineNumbers;
125 + public SourceLineNumber SourceLineNumber => this.FileRow == null ? this.FileSymbol.SourceLineNumbers : this.FileRow.SourceLineNumbers;
126
127 - public string SourcePath => this.FileRow == null ? this.FileTuple.Source.Path : this.FileRow.Source;
127 + public string SourcePath => this.FileRow == null ? this.FileSymbol.Source.Path : this.FileRow.Source;
128
129 - public bool Compressed => this.FileRow == null ? (this.FileTuple.Attributes & FileTupleAttributes.Compressed) == FileTupleAttributes.Compressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesCompressed) == WindowsInstallerConstants.MsidbFileAttributesCompressed;
129 + public bool Compressed => this.FileRow == null ? (this.FileSymbol.Attributes & FileSymbolAttributes.Compressed) == FileSymbolAttributes.Compressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesCompressed) == WindowsInstallerConstants.MsidbFileAttributesCompressed;
130
131 - public bool Uncompressed => this.FileRow == null ? (this.FileTuple.Attributes & FileTupleAttributes.Uncompressed) == FileTupleAttributes.Uncompressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesNoncompressed) == WindowsInstallerConstants.MsidbFileAttributesNoncompressed;
131 + public bool Uncompressed => this.FileRow == null ? (this.FileSymbol.Attributes & FileSymbolAttributes.Uncompressed) == FileSymbolAttributes.Uncompressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesNoncompressed) == WindowsInstallerConstants.MsidbFileAttributesNoncompressed;
132
133 public string Version
134 {
135 - get => this.FileRow == null ? this.FileTuple.Version : this.FileRow.Version;
135 + get => this.FileRow == null ? this.FileSymbol.Version : this.FileRow.Version;
136 set
137 {
138 if (this.FileRow == null)
139 {
140 - this.FileTuple.Version = value;
140 + this.FileSymbol.Version = value;
141 }
142 else
143 {
@@ -146,22 +146,22 @@ namespace WixToolset.Core.Bind
146 }
147 }
148
149 - public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblyTuple?.Type : null;
149 + public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblySymbol?.Type : null;
150
151 - public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblyTuple?.ApplicationFileRef : throw new NotImplementedException();
151 + public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblySymbol?.ApplicationFileRef : throw new NotImplementedException();
152
153 - public string AssemblyManifestFileRef => this.FileRow == null ? this.AssemblyTuple?.ManifestFileRef : throw new NotImplementedException();
153 + public string AssemblyManifestFileRef => this.FileRow == null ? this.AssemblySymbol?.ManifestFileRef : throw new NotImplementedException();
154
155 /// <summary>
156 /// Gets the set of MsiAssemblyName rows created for this file.
157 /// </summary>
158 /// <value>RowCollection of MsiAssemblyName table.</value>
159 - public List<MsiAssemblyNameTuple> AssemblyNames { get; set; }
159 + public List<MsiAssemblyNameSymbol> AssemblyNames { get; set; }
160
161 /// <summary>
162 /// Gets or sets the MsiFileHash row for this file.
163 /// </summary>
164 - public MsiFileHashTuple Hash { get; set; }
164 + public MsiFileHashSymbol Hash { get; set; }
165
166 /// <summary>
167 /// Allows direct access to the underlying FileRow as requried for patching.
src/WixToolset.Core/Bind/FileResolver.cs
+8 -8
@@ -41,13 +41,13 @@ namespace WixToolset.Core.Bind
41
42 private IEnumerable<ILibrarianExtension> LibrarianExtensions { get; }
43
44 - public string Resolve(SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, string source)
44 + public string Resolve(SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, string source)
45 {
46 var checkedPaths = new List<string>();
47
48 foreach (var extension in this.LibrarianExtensions)
49 {
50 - var resolved = extension.ResolveFile(sourceLineNumbers, tupleDefinition, source);
50 + var resolved = extension.ResolveFile(sourceLineNumbers, symbolDefinition, source);
51
52 if (resolved?.CheckedPaths != null)
53 {
@@ -60,7 +60,7 @@ namespace WixToolset.Core.Bind
60 }
61 }
62
63 - return this.MustResolveUsingBindPaths(source, tupleDefinition, sourceLineNumbers, BindStage.Normal, checkedPaths);
63 + return this.MustResolveUsingBindPaths(source, symbolDefinition, sourceLineNumbers, BindStage.Normal, checkedPaths);
64 }
65
66 /// <summary>
@@ -72,7 +72,7 @@ namespace WixToolset.Core.Bind
72 /// <param name="bindStage">The binding stage used to determine what collection of bind paths will be used</param>
73 /// <param name="alreadyCheckedPaths">Optional collection of paths already checked.</param>
74 /// <returns>Should return a valid path for the stream to be imported.</returns>
75 - public string ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, IEnumerable<string> alreadyCheckedPaths = null)
75 + public string ResolveFile(string source, IntermediateSymbolDefinition symbolDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, IEnumerable<string> alreadyCheckedPaths = null)
76 {
77 var checkedPaths = new List<string>();
78
@@ -83,7 +83,7 @@ namespace WixToolset.Core.Bind
83
84 foreach (var extension in this.ResolverExtensions)
85 {
86 - var resolved = extension.ResolveFile(source, tupleDefinition, sourceLineNumbers, bindStage);
86 + var resolved = extension.ResolveFile(source, symbolDefinition, sourceLineNumbers, bindStage);
87
88 if (resolved?.CheckedPaths != null)
89 {
@@ -96,10 +96,10 @@ namespace WixToolset.Core.Bind
96 }
97 }
98
99 - return this.MustResolveUsingBindPaths(source, tupleDefinition, sourceLineNumbers, bindStage, checkedPaths);
99 + return this.MustResolveUsingBindPaths(source, symbolDefinition, sourceLineNumbers, bindStage, checkedPaths);
100 }
101
102 - private string MustResolveUsingBindPaths(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, List<string> checkedPaths)
102 + private string MustResolveUsingBindPaths(string source, IntermediateSymbolDefinition symbolDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, List<string> checkedPaths)
103 {
104 string resolved = null;
105
@@ -180,7 +180,7 @@ namespace WixToolset.Core.Bind
180
181 if (null == resolved)
182 {
183 - throw new WixException(ErrorMessages.FileNotFound(sourceLineNumbers, source, tupleDefinition.Name, checkedPaths));
183 + throw new WixException(ErrorMessages.FileNotFound(sourceLineNumbers, source, symbolDefinition.Name, checkedPaths));
184 }
185
186 return resolved;
src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs
+5 -5
@@ -42,15 +42,15 @@ namespace WixToolset.Core.Bind
42 {
43 try
44 {
45 - var propertyRow = delayedField.Row;
45 + var propertySymbol = delayedField.Symbol;
46
47 // process properties first in case they refer to other binder variables
48 - if (delayedField.Row.Definition.Type == TupleDefinitionType.Property)
48 + if (delayedField.Symbol.Definition.Type == SymbolDefinitionType.Property)
49 {
50 - var value = ResolveDelayedVariables(propertyRow.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache);
50 + var value = ResolveDelayedVariables(propertySymbol.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache);
51
52 // update the variable cache with the new value
53 - var key = String.Concat("property.", propertyRow.AsString(0));
53 + var key = String.Concat("property.", propertySymbol.Id.Id);
54 this.VariableCache[key] = value;
55
56 // update the field data
@@ -103,7 +103,7 @@ namespace WixToolset.Core.Bind
103 {
104 try
105 {
106 - var value = ResolveDelayedVariables(delayedField.Row.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache);
106 + var value = ResolveDelayedVariables(delayedField.Symbol.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache);
107 delayedField.Field.Set(value);
108 }
109 catch (WixException we)
src/WixToolset.Core/Bind/ResolveFieldsCommand.cs
+19 -19
@@ -6,7 +6,7 @@ namespace WixToolset.Core.Bind
6 using System.Collections.Generic;
7 using System.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility;
11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
@@ -45,13 +45,13 @@ namespace WixToolset.Core.Bind
45 var fileResolver = new FileResolver(this.BindPaths, this.Extensions);
46
47 // Build the column lookup only when needed.
48 - Dictionary<string, WixCustomTableColumnTuple> customColumnsById = null;
48 + Dictionary<string, WixCustomTableColumnSymbol> customColumnsById = null;
49
50 foreach (var sections in this.Intermediate.Sections)
51 {
52 - foreach (var tuple in sections.Tuples)
52 + foreach (var symbol in sections.Symbols)
53 {
54 - foreach (var field in tuple.Fields)
54 + foreach (var field in symbol.Fields)
55 {
56 if (field.IsNull())
57 {
@@ -63,20 +63,20 @@ namespace WixToolset.Core.Bind
63 // Custom table cells require an extra look up to the column definition as the
64 // cell's data type is always a string (because strings can store anything) but
65 // the column definition may be more specific.
66 - if (tuple.Definition.Type == TupleDefinitionType.WixCustomTableCell)
66 + if (symbol.Definition.Type == SymbolDefinitionType.WixCustomTableCell)
67 {
68 // We only care about the Data in a CustomTable cell.
69 - if (field.Name != nameof(WixCustomTableCellTupleFields.Data))
69 + if (field.Name != nameof(WixCustomTableCellSymbolFields.Data))
70 {
71 continue;
72 }
73
74 if (customColumnsById == null)
75 {
76 - customColumnsById = this.Intermediate.Sections.SelectMany(s => s.Tuples.OfType<WixCustomTableColumnTuple>()).ToDictionary(t => t.Id.Id);
76 + customColumnsById = this.Intermediate.Sections.SelectMany(s => s.Symbols.OfType<WixCustomTableColumnSymbol>()).ToDictionary(t => t.Id.Id);
77 }
78
79 - if (customColumnsById.TryGetValue(tuple.Fields[(int)WixCustomTableCellTupleFields.TableRef].AsString() + "/" + tuple.Fields[(int)WixCustomTableCellTupleFields.ColumnRef].AsString(), out var customColumn))
79 + if (customColumnsById.TryGetValue(symbol.Fields[(int)WixCustomTableCellSymbolFields.TableRef].AsString() + "/" + symbol.Fields[(int)WixCustomTableCellSymbolFields.ColumnRef].AsString(), out var customColumn))
80 {
81 fieldType = customColumn.Type;
82 }
@@ -93,7 +93,7 @@ namespace WixToolset.Core.Bind
93 var original = field.AsString();
94 if (!String.IsNullOrEmpty(original))
95 {
96 - var resolution = this.VariableResolver.ResolveVariables(tuple.SourceLineNumbers, original, !this.AllowUnresolvedVariables);
96 + var resolution = this.VariableResolver.ResolveVariables(symbol.SourceLineNumbers, original, !this.AllowUnresolvedVariables);
97 if (resolution.UpdatedValue)
98 {
99 field.Set(resolution.Value);
@@ -101,7 +101,7 @@ namespace WixToolset.Core.Bind
101
102 if (resolution.DelayedResolve)
103 {
104 - delayedFields.Add(new DelayedField(tuple, field));
104 + delayedFields.Add(new DelayedField(symbol, field));
105 }
106
107 isDefault = resolution.IsDefault;
@@ -109,7 +109,7 @@ namespace WixToolset.Core.Bind
109 }
110 }
111
112 - // Move to next tuple if we've hit an error resolving variables.
112 + // Move to next symbol if we've hit an error resolving variables.
113 if (this.Messaging.EncounteredError) // TODO: make this error handling more specific to just the failure to resolve variables in this field.
114 {
115 continue;
@@ -122,7 +122,7 @@ namespace WixToolset.Core.Bind
122
123 #if TODO_PATCHING
124 // Skip file resolution if the file is to be deleted.
125 - if (RowOperation.Delete == tuple.Operation)
125 + if (RowOperation.Delete == symbol.Operation)
126 {
127 continue;
128 }
@@ -151,13 +151,13 @@ namespace WixToolset.Core.Bind
151 #endif
152
153 // resolve the path to the file
154 - var value = fileResolver.ResolveFile(objectField.Path, tuple.Definition, tuple.SourceLineNumbers, BindStage.Normal);
154 + var value = fileResolver.ResolveFile(objectField.Path, symbol.Definition, symbol.SourceLineNumbers, BindStage.Normal);
155 field.Set(value);
156 }
157 else if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated) // Normal binding for Patch Scenario (normal patch, no re-basing logic)
158 {
159 // resolve the path to the file
160 - var value = fileResolver.ResolveFile(objectField.Path, tuple.Definition, tuple.SourceLineNumbers, BindStage.Normal);
160 + var value = fileResolver.ResolveFile(objectField.Path, symbol.Definition, symbol.SourceLineNumbers, BindStage.Normal);
161 field.Set(value);
162 }
163 #if TODO_PATCHING
@@ -179,7 +179,7 @@ namespace WixToolset.Core.Bind
179 }
180 }
181
182 - objectField.Data = fileResolver.ResolveFile(filePathToResolve, tuple.Definition.Name, tuple.SourceLineNumbers, BindStage.Updated);
182 + objectField.Data = fileResolver.ResolveFile(filePathToResolve, symbol.Definition.Name, symbol.SourceLineNumbers, BindStage.Updated);
183 }
184 #endif
185 }
@@ -192,7 +192,7 @@ namespace WixToolset.Core.Bind
192 #if TODO_PATCHING
193 if (null != objectField.PreviousData)
194 {
195 - objectField.PreviousData = this.BindVariableResolver.ResolveVariables(tuple.SourceLineNumbers, objectField.PreviousData, false, out isDefault);
195 + objectField.PreviousData = this.BindVariableResolver.ResolveVariables(symbol.SourceLineNumbers, objectField.PreviousData, false, out isDefault);
196
197 if (!Messaging.Instance.EncounteredError) // TODO: make this error handling more specific to just the failure to resolve variables in this field.
198 {
@@ -217,7 +217,7 @@ namespace WixToolset.Core.Bind
217 if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated)
218 {
219 // resolve the path to the file
220 - objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, tuple.Definition.Name, tuple.SourceLineNumbers, BindStage.Normal);
220 + objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, symbol.Definition.Name, symbol.SourceLineNumbers, BindStage.Normal);
221 }
222 else
223 {
@@ -235,14 +235,14 @@ namespace WixToolset.Core.Bind
235 }
236
237 // resolve the path to the file
238 - objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, tuple.Definition.Name, tuple.SourceLineNumbers, BindStage.Target);
238 + objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, symbol.Definition.Name, symbol.SourceLineNumbers, BindStage.Target);
239
240 }
241 }
242 catch (WixFileNotFoundException)
243 {
244 // display the error with source line information
245 - Messaging.Instance.Write(WixErrors.FileNotFound(tuple.SourceLineNumbers, (string)objectField.PreviousData));
245 + Messaging.Instance.Write(WixErrors.FileNotFound(symbol.SourceLineNumbers, (string)objectField.PreviousData));
246 }
247 }
248 }
src/WixToolset.Core/Binder.cs
+5 -5
@@ -7,7 +7,7 @@ namespace WixToolset.Core
7 using System.Linq;
8 using System.Reflection;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Data;
13 using WixToolset.Extensibility.Services;
@@ -35,7 +35,7 @@ namespace WixToolset.Core
35
36 // Bind.
37 //
38 - this.WriteBuildInfoTuple(context.IntermediateRepresentation, context.OutputPath, context.PdbPath);
38 + this.WriteBuildInfoSymbol(context.IntermediateRepresentation, context.OutputPath, context.PdbPath);
39
40 var bindResult = this.BackendBind(context);
41
@@ -74,14 +74,14 @@ namespace WixToolset.Core
74 return null;
75 }
76
77 - private void WriteBuildInfoTuple(Intermediate output, string outputFile, string outputPdbPath)
77 + private void WriteBuildInfoSymbol(Intermediate output, string outputFile, string outputPdbPath)
78 {
79 var entrySection = output.Sections.First(s => s.Type != SectionType.Fragment);
80
81 var executingAssembly = Assembly.GetExecutingAssembly();
82 var fileVersion = FileVersionInfo.GetVersionInfo(executingAssembly.Location);
83
84 - var buildInfoTuple = entrySection.AddTuple(new WixBuildInfoTuple()
84 + var buildInfoSymbol = entrySection.AddSymbol(new WixBuildInfoSymbol()
85 {
86 WixVersion = fileVersion.FileVersion,
87 WixOutputFile = outputFile,
@@ -89,7 +89,7 @@ namespace WixToolset.Core
89
90 if (!String.IsNullOrEmpty(outputPdbPath))
91 {
92 - buildInfoTuple.WixPdbFile = outputPdbPath;
92 + buildInfoSymbol.WixPdbFile = outputPdbPath;
93 }
94 }
95 }
src/WixToolset.Core/CommandLine/BuildCommand.cs
+5 -5
@@ -88,7 +88,7 @@ namespace WixToolset.Core.CommandLine
88
89 var filterCultures = this.commandLine.CalculateFilterCultures();
90
91 - var creator = this.ServiceProvider.GetService<ITupleDefinitionCreator>();
91 + var creator = this.ServiceProvider.GetService<ISymbolDefinitionCreator>();
92
93 this.EvaluateSourceFiles(sourceFiles, creator, out var codeFiles, out var wixipl);
94
@@ -174,7 +174,7 @@ namespace WixToolset.Core.CommandLine
174 return this.commandLine.TryParseArgument(argument, parser);
175 }
176
177 - private void EvaluateSourceFiles(IEnumerable<SourceFile> sourceFiles, ITupleDefinitionCreator creator, out List<SourceFile> codeFiles, out Intermediate wixipl)
177 + private void EvaluateSourceFiles(IEnumerable<SourceFile> sourceFiles, ISymbolDefinitionCreator creator, out List<SourceFile> codeFiles, out Intermediate wixipl)
178 {
179 codeFiles = new List<SourceFile>();
180
@@ -278,7 +278,7 @@ namespace WixToolset.Core.CommandLine
278 return library;
279 }
280
281 - private Intermediate LinkPhase(IEnumerable<Intermediate> intermediates, IEnumerable<string> libraryFiles, ITupleDefinitionCreator creator, CancellationToken cancellationToken)
281 + private Intermediate LinkPhase(IEnumerable<Intermediate> intermediates, IEnumerable<string> libraryFiles, ISymbolDefinitionCreator creator, CancellationToken cancellationToken)
282 {
283 var libraries = this.LoadLibraries(libraryFiles, creator);
284
@@ -292,7 +292,7 @@ namespace WixToolset.Core.CommandLine
292 context.ExtensionData = this.ExtensionManager.GetServices<IExtensionData>();
293 context.ExpectedOutputType = this.OutputType;
294 context.Intermediates = intermediates.Concat(libraries).ToList();
295 - context.TupleDefinitionCreator = creator;
295 + context.SymbolDefinitionCreator = creator;
296 context.CancellationToken = cancellationToken;
297
298 var linker = this.ServiceProvider.GetService<ILinker>();
@@ -382,7 +382,7 @@ namespace WixToolset.Core.CommandLine
382 }
383 }
384
385 - private IEnumerable<Intermediate> LoadLibraries(IEnumerable<string> libraryFiles, ITupleDefinitionCreator creator)
385 + private IEnumerable<Intermediate> LoadLibraries(IEnumerable<string> libraryFiles, ISymbolDefinitionCreator creator)
386 {
387 try
388 {
src/WixToolset.Core/Compiler.cs
+164 -164
@@ -12,7 +12,7 @@ namespace WixToolset.Core
12 using System.Text.RegularExpressions;
13 using System.Xml.Linq;
14 using WixToolset.Data;
15 - using WixToolset.Data.Tuples;
15 + using WixToolset.Data.Symbols;
16 using WixToolset.Data.WindowsInstaller;
17 using WixToolset.Extensibility;
18 using WixToolset.Extensibility.Data;
@@ -252,16 +252,16 @@ namespace WixToolset.Core
252 {
253 foreach (var section in target.Sections)
254 {
255 - foreach (var tuple in section.Tuples)
255 + foreach (var symbol in section.Symbols)
256 {
257 - foreach (var field in tuple.Fields)
257 + foreach (var field in symbol.Fields)
258 {
259 if (field?.Type == IntermediateFieldType.String)
260 {
261 var data = field.AsString();
262 if (!String.IsNullOrEmpty(data))
263 {
264 - var resolved = this.componentIdPlaceholdersResolver.ResolveVariables(tuple.SourceLineNumbers, data, errorOnUnknown: false);
264 + var resolved = this.componentIdPlaceholdersResolver.ResolveVariables(symbol.SourceLineNumbers, data, errorOnUnknown: false);
265 if (resolved.UpdatedValue)
266 {
267 field.Set(resolved.Value);
@@ -332,7 +332,7 @@ namespace WixToolset.Core
332 this.Core.Write(ErrorMessages.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", propertyId.Id));
333 }
334
335 - this.Core.AddTuple(new AppSearchTuple(sourceLineNumbers, new Identifier(propertyId.Access, propertyId.Id, signature))
335 + this.Core.AddSymbol(new AppSearchSymbol(sourceLineNumbers, new Identifier(propertyId.Access, propertyId.Id, signature))
336 {
337 PropertyRef = propertyId.Id,
338 SignatureRef = signature
@@ -377,7 +377,7 @@ namespace WixToolset.Core
377 {
378 var section = this.Core.ActiveSection;
379
380 - // Add the tuple to a separate section if requested.
380 + // Add the symbol to a separate section if requested.
381 if (fragment)
382 {
383 var id = String.Concat(this.Core.ActiveSection.Id, ".", propertyId.Id);
@@ -385,24 +385,24 @@ namespace WixToolset.Core
385 section = this.Core.CreateSection(id, SectionType.Fragment, this.Core.ActiveSection.Codepage, this.Context.CompilationId);
386
387 // Reference the property in the active section.
388 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, propertyId.Id);
388 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, propertyId.Id);
389 }
390
391 - // Allow tuple to exist with no value so that PropertyRefs can be made for *Search elements
392 - // the linker will remove these tuples before the final output is created.
393 - section.AddTuple(new PropertyTuple(sourceLineNumbers, propertyId)
391 + // Allow symbol to exist with no value so that PropertyRefs can be made for *Search elements
392 + // the linker will remove these symbols before the final output is created.
393 + section.AddSymbol(new PropertySymbol(sourceLineNumbers, propertyId)
394 {
395 Value = value,
396 });
397
398 if (admin || hidden || secure)
399 {
400 - this.AddWixPropertyTuple(sourceLineNumbers, propertyId, admin, secure, hidden, section);
400 + this.AddWixPropertySymbol(sourceLineNumbers, propertyId, admin, secure, hidden, section);
401 }
402 }
403 }
404
405 - private void AddWixPropertyTuple(SourceLineNumber sourceLineNumbers, Identifier property, bool admin, bool secure, bool hidden, IntermediateSection section = null)
405 + private void AddWixPropertySymbol(SourceLineNumber sourceLineNumbers, Identifier property, bool admin, bool secure, bool hidden, IntermediateSection section = null)
406 {
407 if (secure && property.Id != property.Id.ToUpperInvariant())
408 {
@@ -416,7 +416,7 @@ namespace WixToolset.Core
416 this.Core.EnsureTable(sourceLineNumbers, WindowsInstallerTableDefinitions.Property); // Property table is always required when using WixProperty table.
417 }
418
419 - section.AddTuple(new WixPropertyTuple(sourceLineNumbers)
419 + section.AddSymbol(new WixPropertySymbol(sourceLineNumbers)
420 {
421 PropertyRef = property.Id,
422 Admin = admin,
@@ -552,7 +552,7 @@ namespace WixToolset.Core
552
553 if (!this.Core.EncounteredError)
554 {
555 - this.Core.AddTuple(new AppIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, appId))
555 + this.Core.AddSymbol(new AppIdSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, appId))
556 {
557 AppId = appId,
558 RemoteServerName = remoteServerName,
@@ -650,7 +650,7 @@ namespace WixToolset.Core
650
651 if (!this.Core.EncounteredError)
652 {
653 - this.Core.AddTuple(new MsiAssemblyNameTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, componentId, id))
653 + this.Core.AddSymbol(new MsiAssemblyNameSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, componentId, id))
654 {
655 ComponentRef = componentId,
656 Name = id,
@@ -737,14 +737,14 @@ namespace WixToolset.Core
737
738 if (!this.Core.EncounteredError)
739 {
740 - var tuple = this.Core.AddTuple(new BinaryTuple(sourceLineNumbers, id)
740 + var symbol = this.Core.AddSymbol(new BinarySymbol(sourceLineNumbers, id)
741 {
742 Data = new IntermediateFieldPathValue { Path = sourceFile }
743 });
744
745 if (YesNoType.Yes == suppressModularization)
746 {
747 - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, id));
747 + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, id));
748 }
749 }
750
@@ -814,7 +814,7 @@ namespace WixToolset.Core
814
815 if (!this.Core.EncounteredError)
816 {
817 - this.Core.AddTuple(new IconTuple(sourceLineNumbers, id)
817 + this.Core.AddSymbol(new IconSymbol(sourceLineNumbers, id)
818 {
819 Data = new IntermediateFieldPathValue { Path = sourceFile },
820 });
@@ -840,7 +840,7 @@ namespace WixToolset.Core
840 {
841 case "Property":
842 property = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
843 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, property);
843 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, property);
844 break;
845 default:
846 this.Core.UnexpectedAttribute(node, attrib);
@@ -936,7 +936,7 @@ namespace WixToolset.Core
936
937 if (!this.Core.EncounteredError)
938 {
939 - this.Core.AddTuple(new WixInstanceTransformsTuple(sourceLineNumbers, id)
939 + this.Core.AddSymbol(new WixInstanceTransformsSymbol(sourceLineNumbers, id)
940 {
941 PropertyId = propertyId,
942 ProductCode = productCode,
@@ -973,7 +973,7 @@ namespace WixToolset.Core
973 break;
974 case "Feature":
975 feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
976 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Feature, feature);
976 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Feature, feature);
977 break;
978 case "Qualifier":
979 qualifier = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -1003,7 +1003,7 @@ namespace WixToolset.Core
1003
1004 if (!this.Core.EncounteredError)
1005 {
1006 - this.Core.AddTuple(new PublishComponentTuple(sourceLineNumbers)
1006 + this.Core.AddSymbol(new PublishComponentSymbol(sourceLineNumbers)
1007 {
1008 ComponentId = id,
1009 Qualifier = qualifier,
@@ -1187,7 +1187,7 @@ namespace WixToolset.Core
1187
1188 if (!String.IsNullOrEmpty(localFileServer))
1189 {
1190 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, localFileServer);
1190 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, localFileServer);
1191 }
1192
1193 // Local variables used strictly for child node processing.
@@ -1260,7 +1260,7 @@ namespace WixToolset.Core
1260 {
1261 foreach (var context in contexts)
1262 {
1263 - var tuple = this.Core.AddTuple(new ClassTuple(sourceLineNumbers)
1263 + var symbol = this.Core.AddSymbol(new ClassSymbol(sourceLineNumbers)
1264 {
1265 CLSID = classId,
1266 Context = context,
@@ -1276,19 +1276,19 @@ namespace WixToolset.Core
1276
1277 if (null != appId)
1278 {
1279 - tuple.AppIdRef = appId;
1280 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.AppId, appId);
1279 + symbol.AppIdRef = appId;
1280 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.AppId, appId);
1281 }
1282
1283 if (null != icon)
1284 {
1285 - tuple.IconRef = icon;
1286 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Icon, icon);
1285 + symbol.IconRef = icon;
1286 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Icon, icon);
1287 }
1288
1289 if (CompilerConstants.IntegerNotSet != iconIndex)
1290 {
1291 - tuple.IconIndex = iconIndex;
1291 + symbol.IconIndex = iconIndex;
1292 }
1293 }
1294 }
@@ -1369,7 +1369,7 @@ namespace WixToolset.Core
1369
1370 if (null != icon) // ClassId default icon
1371 {
1372 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, icon);
1372 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, icon);
1373
1374 icon = String.Format(CultureInfo.InvariantCulture, "\"[#{0}]\"", icon);
1375
@@ -1649,7 +1649,7 @@ namespace WixToolset.Core
1649 string maximum = null;
1650 string minimum = null;
1651 var excludeLanguages = false;
1652 - var maxInclusive = false;
1652 + var maxInclusive = false;
1653 var minInclusive = true;
1654
1655 foreach (var attrib in node.Attributes())
@@ -1699,7 +1699,7 @@ namespace WixToolset.Core
1699
1700 if (!this.Core.EncounteredError)
1701 {
1702 - this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers)
1702 + this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers)
1703 {
1704 UpgradeCode = upgradeCode,
1705 VersionMin = minimum,
@@ -1850,7 +1850,7 @@ namespace WixToolset.Core
1850 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1851 }
1852 oneChild = true;
1853 - var newId = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); // FileSearch signatures override parent signatures
1853 + var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures
1854 id = new Identifier(AccessModifier.Private, newId);
1855 signature = null;
1856 break;
@@ -1867,7 +1867,7 @@ namespace WixToolset.Core
1867
1868 if (!this.Core.EncounteredError)
1869 {
1870 - this.Core.AddTuple(new RegLocatorTuple(sourceLineNumbers, id)
1870 + this.Core.AddSymbol(new RegLocatorSymbol(sourceLineNumbers, id)
1871 {
1872 Root = root.Value,
1873 Key = key,
@@ -1898,7 +1898,7 @@ namespace WixToolset.Core
1898 {
1899 case "Id":
1900 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1901 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.RegLocator, id);
1901 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.RegLocator, id);
1902 break;
1903 default:
1904 this.Core.UnexpectedAttribute(node, attrib);
@@ -2085,7 +2085,7 @@ namespace WixToolset.Core
2085
2086 if (!this.Core.EncounteredError)
2087 {
2088 - this.Core.AddTuple(new CCPSearchTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, signature)));
2088 + this.Core.AddSymbol(new CCPSearchSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, signature)));
2089 }
2090 }
2091
@@ -2351,10 +2351,10 @@ namespace WixToolset.Core
2351 encounteredODBCDataSource = true;
2352 break;
2353 case "ODBCDriver":
2354 - this.ParseODBCDriverOrTranslator(child, id.Id, null, TupleDefinitionType.ODBCDriver);
2354 + this.ParseODBCDriverOrTranslator(child, id.Id, null, SymbolDefinitionType.ODBCDriver);
2355 break;
2356 case "ODBCTranslator":
2357 - this.ParseODBCDriverOrTranslator(child, id.Id, null, TupleDefinitionType.ODBCTranslator);
2357 + this.ParseODBCDriverOrTranslator(child, id.Id, null, SymbolDefinitionType.ODBCTranslator);
2358 break;
2359 case "ProgId":
2360 var foundExtension = false;
@@ -2480,7 +2480,7 @@ namespace WixToolset.Core
2480 }
2481
2482 // if there isn't an @Id attribute value, replace the placeholder with the id of the keypath.
2483 - // either an explicit KeyPath="yes" attribute must be specified or requirements for
2483 + // either an explicit KeyPath="yes" attribute must be specified or requirements for
2484 // generatable guid must be met.
2485 if (componentIdPlaceholderWixVariable == id.Id)
2486 {
@@ -2505,7 +2505,7 @@ namespace WixToolset.Core
2505 // finally add the Component table row
2506 if (!this.Core.EncounteredError)
2507 {
2508 - this.Core.AddTuple(new ComponentTuple(sourceLineNumbers, id)
2508 + this.Core.AddSymbol(new ComponentSymbol(sourceLineNumbers, id)
2509 {
2510 ComponentId = guid,
2511 DirectoryRef = directoryId,
@@ -2525,7 +2525,7 @@ namespace WixToolset.Core
2525
2526 if (multiInstance)
2527 {
2528 - this.Core.AddTuple(new WixInstanceComponentTuple(sourceLineNumbers, id)
2528 + this.Core.AddSymbol(new WixInstanceComponentSymbol(sourceLineNumbers, id)
2529 {
2530 ComponentRef = id.Id,
2531 });
@@ -2533,7 +2533,7 @@ namespace WixToolset.Core
2533
2534 if (0 < symbols.Count)
2535 {
2536 - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Component, id.Id))
2536 + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Component, id.Id))
2537 {
2538 SymbolType = SymbolPathType.Component,
2539 SymbolId = id.Id,
@@ -2544,7 +2544,7 @@ namespace WixToolset.Core
2544 // Complus
2545 if (CompilerConstants.IntegerNotSet != comPlusBits)
2546 {
2547 - this.Core.AddTuple(new ComplusTuple(sourceLineNumbers)
2547 + this.Core.AddSymbol(new ComplusSymbol(sourceLineNumbers)
2548 {
2549 ComponentRef = id.Id,
2550 ExpType = comPlusBits,
@@ -2643,7 +2643,7 @@ namespace WixToolset.Core
2643
2644 if (!this.Core.EncounteredError)
2645 {
2646 - this.Core.AddTuple(new WixComponentGroupTuple(sourceLineNumbers, id));
2646 + this.Core.AddSymbol(new WixComponentGroupSymbol(sourceLineNumbers, id));
2647
2648 // Add this componentGroup and its parent in WixGroup.
2649 this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.ComponentGroup, id.Id);
@@ -2673,7 +2673,7 @@ namespace WixToolset.Core
2673 {
2674 case "Id":
2675 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2676 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixComponentGroup, id);
2676 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixComponentGroup, id);
2677 break;
2678 case "Primary":
2679 primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
@@ -2722,7 +2722,7 @@ namespace WixToolset.Core
2722 {
2723 case "Id":
2724 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2725 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Component, id);
2725 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Component, id);
2726 break;
2727 case "Primary":
2728 primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
@@ -2846,7 +2846,7 @@ namespace WixToolset.Core
2846 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2847 }
2848 oneChild = true;
2849 - var newId = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); // FileSearch signatures override parent signatures
2849 + var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures
2850 id = new Identifier(AccessModifier.Private, newId);
2851 signature = null;
2852 break;
@@ -2863,7 +2863,7 @@ namespace WixToolset.Core
2863
2864 if (!this.Core.EncounteredError)
2865 {
2866 - this.Core.AddTuple(new CompLocatorTuple(sourceLineNumbers, id)
2866 + this.Core.AddSymbol(new CompLocatorSymbol(sourceLineNumbers, id)
2867 {
2868 SignatureRef = id.Id,
2869 ComponentId = componentId,
@@ -2934,7 +2934,7 @@ namespace WixToolset.Core
2934
2935 if (!this.Core.EncounteredError)
2936 {
2937 - this.Core.AddTuple(new CreateFolderTuple(sourceLineNumbers)
2937 + this.Core.AddSymbol(new CreateFolderSymbol(sourceLineNumbers)
2938 {
2939 DirectoryRef = directoryId,
2940 ComponentRef = componentId,
@@ -2994,7 +2994,7 @@ namespace WixToolset.Core
2994 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
2995 }
2996 fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2997 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, fileId);
2997 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, fileId);
2998 break;
2999 case "SourceDirectory":
3000 sourceDirectory = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
@@ -3059,7 +3059,7 @@ namespace WixToolset.Core
3059
3060 if (!this.Core.EncounteredError)
3061 {
3062 - this.Core.AddTuple(new MoveFileTuple(sourceLineNumbers, id)
3062 + this.Core.AddSymbol(new MoveFileSymbol(sourceLineNumbers, id)
3063 {
3064 ComponentRef = componentId,
3065 SourceName = sourceName,
@@ -3104,7 +3104,7 @@ namespace WixToolset.Core
3104
3105 if (!this.Core.EncounteredError)
3106 {
3107 - this.Core.AddTuple(new DuplicateFileTuple(sourceLineNumbers, id)
3107 + this.Core.AddSymbol(new DuplicateFileSymbol(sourceLineNumbers, id)
3108 {
3109 ComponentRef = componentId,
3110 FileRef = fileId,
@@ -3158,7 +3158,7 @@ namespace WixToolset.Core
3158 }
3159 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3160 sourceType = CustomActionSourceType.Binary;
3161 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, source); // add a reference to the appropriate Binary
3161 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, source); // add a reference to the appropriate Binary
3162 break;
3163 case "Directory":
3164 if (null != source)
@@ -3185,12 +3185,12 @@ namespace WixToolset.Core
3185 sourceType = CustomActionSourceType.File;
3186 targetType = CustomActionTargetType.TextData;
3187
3188 - // The target can be either a formatted error string or a literal
3188 + // The target can be either a formatted error string or a literal
3189 // error number. Try to convert to error number to determine whether
3190 // to add a reference. No need to look at the value.
3191 if (Int32.TryParse(target, out var ignored))
3192 {
3193 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Error, target);
3193 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Error, target);
3194 }
3195 break;
3196 case "ExeCommand":
@@ -3238,7 +3238,7 @@ namespace WixToolset.Core
3238 }
3239 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3240 sourceType = CustomActionSourceType.File;
3241 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, source); // add a reference to the appropriate File
3241 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, source); // add a reference to the appropriate File
3242 break;
3243 case "HideTarget":
3244 hidden = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
@@ -3459,7 +3459,7 @@ namespace WixToolset.Core
3459
3460 if (!this.Core.EncounteredError)
3461 {
3462 - this.Core.AddTuple(new CustomActionTuple(sourceLineNumbers, id)
3462 + this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, id)
3463 {
3464 ExecutionType = executionType,
3465 Source = source,
@@ -3478,7 +3478,7 @@ namespace WixToolset.Core
3478
3479 if (YesNoType.Yes == suppressModularization)
3480 {
3481 - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, id));
3481 + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, id));
3482 }
3483 }
3484 }
@@ -3487,9 +3487,9 @@ namespace WixToolset.Core
3487 /// Parses a simple reference element.
3488 /// </summary>
3489 /// <param name="node">Element to parse.</param>
3490 - /// <param name="tupleDefinition">Tuple which contains the target of the simple reference.</param>
3490 + /// <param name="symbolDefinition">Symbol which contains the target of the simple reference.</param>
3491 /// <returns>Id of the referenced element.</returns>
3492 - private string ParseSimpleRefElement(XElement node, IntermediateTupleDefinition tupleDefinition)
3492 + private string ParseSimpleRefElement(XElement node, IntermediateSymbolDefinition symbolDefinition)
3493 {
3494 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
3495 string id = null;
@@ -3502,7 +3502,7 @@ namespace WixToolset.Core
3502 {
3503 case "Id":
3504 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3505 - this.Core.CreateSimpleReference(sourceLineNumbers, tupleDefinition.Name, id);
3505 + this.Core.CreateSimpleReference(sourceLineNumbers, symbolDefinition.Name, id);
3506 break;
3507 default:
3508 this.Core.UnexpectedAttribute(node, attrib);
@@ -3565,7 +3565,7 @@ namespace WixToolset.Core
3565 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3566 }
3567
3568 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.MsiPatchSequence, primaryKeys);
3568 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.MsiPatchSequence, primaryKeys);
3569
3570 this.Core.ParseForExtensionElements(node);
3571
@@ -3628,7 +3628,7 @@ namespace WixToolset.Core
3628 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
3629 string tableId = null;
3630 var unreal = false;
3631 - var columns = new List<WixCustomTableColumnTuple>();
3631 + var columns = new List<WixCustomTableColumnSymbol>();
3632
3633 foreach (var attrib in node.Attributes())
3634 {
@@ -3699,9 +3699,9 @@ namespace WixToolset.Core
3699
3700 if (!this.Core.EncounteredError)
3701 {
3702 - var columnNames = String.Join(new string(WixCustomTableTuple.ColumnNamesSeparator, 1), columns.Select(c => c.Name));
3702 + var columnNames = String.Join(new string(WixCustomTableSymbol.ColumnNamesSeparator, 1), columns.Select(c => c.Name));
3703
3704 - this.Core.AddTuple(new WixCustomTableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, tableId))
3704 + this.Core.AddSymbol(new WixCustomTableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, tableId))
3705 {
3706 ColumnNames = columnNames,
3707 Unreal = unreal,
@@ -3716,7 +3716,7 @@ namespace WixToolset.Core
3716 /// <param name="child">Element to parse.</param>
3717 /// <param name="childSourceLineNumbers">Element's SourceLineNumbers.</param>
3718 /// <param name="tableId">Table Id.</param>
3719 - private WixCustomTableColumnTuple ParseColumnElement(XElement child, SourceLineNumber childSourceLineNumbers, string tableId)
3719 + private WixCustomTableColumnSymbol ParseColumnElement(XElement child, SourceLineNumber childSourceLineNumbers, string tableId)
3720 {
3721 string columnName = null;
3722 IntermediateFieldType? columnType = null;
@@ -3968,12 +3968,12 @@ namespace WixToolset.Core
3968 return null;
3969 }
3970
3971 - var attributes = primaryKey ? WixCustomTableColumnTupleAttributes.PrimaryKey : WixCustomTableColumnTupleAttributes.None;
3972 - attributes |= localizable ? WixCustomTableColumnTupleAttributes.Localizable : WixCustomTableColumnTupleAttributes.None;
3973 - attributes |= nullable ? WixCustomTableColumnTupleAttributes.Nullable : WixCustomTableColumnTupleAttributes.None;
3974 - attributes |= columnUnreal ? WixCustomTableColumnTupleAttributes.Unreal : WixCustomTableColumnTupleAttributes.None;
3971 + var attributes = primaryKey ? WixCustomTableColumnSymbolAttributes.PrimaryKey : WixCustomTableColumnSymbolAttributes.None;
3972 + attributes |= localizable ? WixCustomTableColumnSymbolAttributes.Localizable : WixCustomTableColumnSymbolAttributes.None;
3973 + attributes |= nullable ? WixCustomTableColumnSymbolAttributes.Nullable : WixCustomTableColumnSymbolAttributes.None;
3974 + attributes |= columnUnreal ? WixCustomTableColumnSymbolAttributes.Unreal : WixCustomTableColumnSymbolAttributes.None;
3975
3976 - var column = this.Core.AddTuple(new WixCustomTableColumnTuple(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, columnName))
3976 + var column = this.Core.AddSymbol(new WixCustomTableColumnSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, columnName))
3977 {
3978 TableRef = tableId,
3979 Name = columnName,
@@ -4038,7 +4038,7 @@ namespace WixToolset.Core
4038
4039 if (!this.Core.EncounteredError)
4040 {
4041 - this.Core.AddTuple(new WixCustomTableCellTuple(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, rowId, columnName))
4041 + this.Core.AddSymbol(new WixCustomTableCellSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, rowId, columnName))
4042 {
4043 RowId = rowId,
4044 ColumnRef = columnName,
@@ -4055,7 +4055,7 @@ namespace WixToolset.Core
4055
4056 if (!this.Core.EncounteredError)
4057 {
4058 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixCustomTable, tableId);
4058 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixCustomTable, tableId);
4059 }
4060 }
4061
@@ -4153,7 +4153,7 @@ namespace WixToolset.Core
4153 if (inlineSyntax[0].EndsWith(":"))
4154 {
4155 parentId = inlineSyntax[0].TrimEnd(':');
4156 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Directory, parentId);
4156 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Directory, parentId);
4157
4158 pathStartsAt = 1;
4159 }
@@ -4298,7 +4298,7 @@ namespace WixToolset.Core
4298
4299 if (!this.Core.EncounteredError)
4300 {
4301 - this.Core.AddTuple(new DirectoryTuple(sourceLineNumbers, id)
4301 + this.Core.AddSymbol(new DirectorySymbol(sourceLineNumbers, id)
4302 {
4303 ParentDirectoryRef = parentId,
4304 Name = name,
@@ -4310,7 +4310,7 @@ namespace WixToolset.Core
4310
4311 if (null != symbols)
4312 {
4313 - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers, id)
4313 + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers, id)
4314 {
4315 SymbolType = SymbolPathType.Directory,
4316 SymbolId = id.Id,
@@ -4340,7 +4340,7 @@ namespace WixToolset.Core
4340 {
4341 case "Id":
4342 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
4343 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Directory, id);
4343 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Directory, id);
4344 break;
4345 case "DiskId":
4346 diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue);
@@ -4487,7 +4487,7 @@ namespace WixToolset.Core
4487 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4488 }
4489 oneChild = true;
4490 - signature = this.ParseSimpleRefElement(child, TupleDefinitions.Signature);
4490 + signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature);
4491 break;
4492 default:
4493 this.Core.UnexpectedElement(node, child);
@@ -4532,7 +4532,7 @@ namespace WixToolset.Core
4532 signature = id.Id;
4533 }
4534
4535 - var tuple = this.Core.AddTuple(new DrLocatorTuple(sourceLineNumbers, new Identifier(access, rowId, parentSignature, path))
4535 + var symbol = this.Core.AddSymbol(new DrLocatorSymbol(sourceLineNumbers, new Identifier(access, rowId, parentSignature, path))
4536 {
4537 SignatureRef = rowId,
4538 Parent = parentSignature,
@@ -4541,7 +4541,7 @@ namespace WixToolset.Core
4541
4542 if (CompilerConstants.IntegerNotSet != depth)
4543 {
4544 - tuple.Depth = depth;
4544 + symbol.Depth = depth;
4545 }
4546 }
4547
@@ -4645,7 +4645,7 @@ namespace WixToolset.Core
4645 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4646 }
4647 oneChild = true;
4648 - signature = this.ParseSimpleRefElement(child, TupleDefinitions.Signature);
4648 + signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature);
4649 break;
4650 default:
4651 this.Core.UnexpectedElement(node, child);
@@ -4659,7 +4659,7 @@ namespace WixToolset.Core
4659 }
4660
4661
4662 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.DrLocator, id.Id, parentSignature, path);
4662 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.DrLocator, id.Id, parentSignature, path);
4663
4664 return signature;
4665 }
@@ -4670,7 +4670,7 @@ namespace WixToolset.Core
4670 /// <param name="node">Element to parse.</param>
4671 /// <param name="parentType">The type of parent.</param>
4672 /// <param name="parentId">Optional identifer for parent feature.</param>
4673 - /// <param name="lastDisplay">Display value for last feature used to get the features to display in the same order as specified
4673 + /// <param name="lastDisplay">Display value for last feature used to get the features to display in the same order as specified
4674 /// in the source code.</param>
4675 [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
4676 private void ParseFeatureElement(XElement node, ComplexReferenceParentType parentType, string parentId, ref int lastDisplay)
@@ -4899,7 +4899,7 @@ namespace WixToolset.Core
4899
4900 if (!this.Core.EncounteredError)
4901 {
4902 - this.Core.AddTuple(new FeatureTuple(sourceLineNumbers, id)
4902 + this.Core.AddSymbol(new FeatureSymbol(sourceLineNumbers, id)
4903 {
4904 ParentFeatureRef = null, // this field is set in the linker
4905 Title = title,
@@ -4941,7 +4941,7 @@ namespace WixToolset.Core
4941 {
4942 case "Id":
4943 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
4944 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Feature, id);
4944 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Feature, id);
4945 break;
4946 case "IgnoreParent":
4947 ignoreParent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
@@ -5091,7 +5091,7 @@ namespace WixToolset.Core
5091
5092 if (!this.Core.EncounteredError)
5093 {
5094 - this.Core.AddTuple(new WixFeatureGroupTuple(sourceLineNumbers, id));
5094 + this.Core.AddSymbol(new WixFeatureGroupSymbol(sourceLineNumbers, id));
5095
5096 //Add this FeatureGroup and its parent in WixGroup.
5097 this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.FeatureGroup, id.Id);
@@ -5121,7 +5121,7 @@ namespace WixToolset.Core
5121 {
5122 case "Id":
5123 id = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5124 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixFeatureGroup, id);
5124 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixFeatureGroup, id);
5125 break;
5126 case "IgnoreParent":
5127 ignoreParent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
@@ -5290,7 +5290,7 @@ namespace WixToolset.Core
5290
5291 if (!this.Core.EncounteredError)
5292 {
5293 - this.Core.AddTuple(new EnvironmentTuple(sourceLineNumbers, id)
5293 + this.Core.AddSymbol(new EnvironmentSymbol(sourceLineNumbers, id)
5294 {
5295 Name = name,
5296 Value = value,
@@ -5347,7 +5347,7 @@ namespace WixToolset.Core
5347
5348 if (!this.Core.EncounteredError)
5349 {
5350 - this.Core.AddTuple(new ErrorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id))
5350 + this.Core.AddSymbol(new ErrorSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, id))
5351 {
5352 Message = message
5353 });
@@ -5436,7 +5436,7 @@ namespace WixToolset.Core
5436 {
5437 if (!this.Core.EncounteredError)
5438 {
5439 - this.Core.AddTuple(new ExtensionTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, extension, componentId))
5439 + this.Core.AddSymbol(new ExtensionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, extension, componentId))
5440 {
5441 Extension = extension,
5442 ComponentRef = componentId,
@@ -5542,11 +5542,11 @@ namespace WixToolset.Core
5542 break;
5543 case "AssemblyApplication":
5544 assemblyApplication = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5545 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, assemblyApplication);
5545 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, assemblyApplication);
5546 break;
5547 case "AssemblyManifest":
5548 assemblyManifest = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5549 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, assemblyManifest);
5549 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, assemblyManifest);
5550 break;
5551 case "BindPath":
5552 bindPath = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
@@ -5560,7 +5560,7 @@ namespace WixToolset.Core
5560 break;
5561 case "CompanionFile":
5562 companionFile = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5563 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, companionFile);
5563 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, companionFile);
5564 break;
5565 case "Compressed":
5566 var compressedValue = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
@@ -5781,10 +5781,10 @@ namespace WixToolset.Core
5781 this.ParseRangeElement(child, ref ignoreOffsets, ref ignoreLengths);
5782 break;
5783 case "ODBCDriver":
5784 - this.ParseODBCDriverOrTranslator(child, componentId, id.Id, TupleDefinitionType.ODBCDriver);
5784 + this.ParseODBCDriverOrTranslator(child, componentId, id.Id, SymbolDefinitionType.ODBCDriver);
5785 break;
5786 case "ODBCTranslator":
5787 - this.ParseODBCDriverOrTranslator(child, componentId, id.Id, TupleDefinitionType.ODBCTranslator);
5787 + this.ParseODBCDriverOrTranslator(child, componentId, id.Id, SymbolDefinitionType.ODBCTranslator);
5788 break;
5789 case "Permission":
5790 this.ParsePermissionElement(child, id.Id, "File");
@@ -5848,17 +5848,17 @@ namespace WixToolset.Core
5848 source = null == name ? Path.Combine(source, shortName) : Path.Combine(source, name);
5849 }
5850
5851 - var attributes = FileTupleAttributes.None;
5852 - attributes |= readOnly ? FileTupleAttributes.ReadOnly : 0;
5853 - attributes |= hidden ? FileTupleAttributes.Hidden : 0;
5854 - attributes |= system ? FileTupleAttributes.System : 0;
5855 - attributes |= vital ? FileTupleAttributes.Vital : 0;
5856 - attributes |= checksum ? FileTupleAttributes.Checksum : 0;
5857 - attributes |= compressed.HasValue && compressed == true ? FileTupleAttributes.Compressed : 0;
5858 - attributes |= compressed.HasValue && compressed == false ? FileTupleAttributes.Uncompressed : 0;
5859 - attributes |= generatedShortFileName ? FileTupleAttributes.GeneratedShortFileName : 0;
5851 + var attributes = FileSymbolAttributes.None;
5852 + attributes |= readOnly ? FileSymbolAttributes.ReadOnly : 0;
5853 + attributes |= hidden ? FileSymbolAttributes.Hidden : 0;
5854 + attributes |= system ? FileSymbolAttributes.System : 0;
5855 + attributes |= vital ? FileSymbolAttributes.Vital : 0;
5856 + attributes |= checksum ? FileSymbolAttributes.Checksum : 0;
5857 + attributes |= compressed.HasValue && compressed == true ? FileSymbolAttributes.Compressed : 0;
5858 + attributes |= compressed.HasValue && compressed == false ? FileSymbolAttributes.Uncompressed : 0;
5859 + attributes |= generatedShortFileName ? FileSymbolAttributes.GeneratedShortFileName : 0;
5860
5861 - this.Core.AddTuple(new FileTuple(sourceLineNumbers, id)
5861 + this.Core.AddSymbol(new FileSymbol(sourceLineNumbers, id)
5862 {
5863 ComponentRef = componentId,
5864 Name = name,
@@ -5897,7 +5897,7 @@ namespace WixToolset.Core
5897
5898 if (AssemblyType.NotAnAssembly != assemblyType)
5899 {
5900 - this.Core.AddTuple(new AssemblyTuple(sourceLineNumbers, id)
5900 + this.Core.AddSymbol(new AssemblySymbol(sourceLineNumbers, id)
5901 {
5902 ComponentRef = componentId,
5903 FeatureRef = Guid.Empty.ToString("B"),
@@ -5911,7 +5911,7 @@ namespace WixToolset.Core
5911
5912 if (CompilerConstants.IntegerNotSet != diskId)
5913 {
5914 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat));
5914 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat));
5915 }
5916
5917 // If this component does not have a companion file this file is a possible keypath.
@@ -6052,7 +6052,7 @@ namespace WixToolset.Core
6052
6053 if (!this.Core.EncounteredError)
6054 {
6055 - var tuple = this.Core.AddTuple(new SignatureTuple(sourceLineNumbers, id)
6055 + var symbol = this.Core.AddSymbol(new SignatureSymbol(sourceLineNumbers, id)
6056 {
6057 FileName = name ?? shortName,
6058 MinVersion = minVersion,
@@ -6062,22 +6062,22 @@ namespace WixToolset.Core
6062
6063 if (CompilerConstants.IntegerNotSet != minSize)
6064 {
6065 - tuple.MinSize = minSize;
6065 + symbol.MinSize = minSize;
6066 }
6067
6068 if (CompilerConstants.IntegerNotSet != maxSize)
6069 {
6070 - tuple.MaxSize = maxSize;
6070 + symbol.MaxSize = maxSize;
6071 }
6072
6073 if (CompilerConstants.IntegerNotSet != minDate)
6074 {
6075 - tuple.MinDate = minDate;
6075 + symbol.MinDate = minDate;
6076 }
6077
6078 if (CompilerConstants.IntegerNotSet != maxDate)
6079 {
6080 - tuple.MaxDate = maxDate;
6080 + symbol.MaxDate = maxDate;
6081 }
6082
6083 // Create a DrLocator row to associate the file with a directory
@@ -6088,7 +6088,7 @@ namespace WixToolset.Core
6088 {
6089 // Creates the DrLocator row for the directory search while
6090 // the parent DirectorySearch creates the file locator row.
6091 - this.Core.AddTuple(new DrLocatorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, parentSignature, id.Id, String.Empty))
6091 + this.Core.AddSymbol(new DrLocatorSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, parentSignature, id.Id, String.Empty))
6092 {
6093 SignatureRef = parentSignature,
6094 Parent = id.Id
@@ -6096,7 +6096,7 @@ namespace WixToolset.Core
6096 }
6097 else
6098 {
6099 - this.Core.AddTuple(new DrLocatorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id.Id, parentSignature, String.Empty))
6099 + this.Core.AddSymbol(new DrLocatorSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, id.Id, parentSignature, String.Empty))
6100 {
6101 SignatureRef = id.Id,
6102 Parent = parentSignature
@@ -6191,7 +6191,7 @@ namespace WixToolset.Core
6191 this.ParseBundleExtensionElement(child);
6192 break;
6193 case "BundleExtensionRef":
6194 - this.ParseSimpleRefElement(child, TupleDefinitions.WixBundleExtension);
6194 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleExtension);
6195 break;
6196 case "ComplianceCheck":
6197 this.ParseComplianceCheckElement(child);
@@ -6209,7 +6209,7 @@ namespace WixToolset.Core
6209 this.ParseCustomActionElement(child);
6210 break;
6211 case "CustomActionRef":
6212 - this.ParseSimpleRefElement(child, TupleDefinitions.CustomAction);
6212 + this.ParseSimpleRefElement(child, SymbolDefinitions.CustomAction);
6213 break;
6214 case "CustomTable":
6215 this.ParseCustomTableElement(child);
@@ -6224,7 +6224,7 @@ namespace WixToolset.Core
6224 this.ParseEmbeddedChainerElement(child);
6225 break;
6226 case "EmbeddedChainerRef":
6227 - this.ParseSimpleRefElement(child, TupleDefinitions.MsiEmbeddedChainer);
6227 + this.ParseSimpleRefElement(child, SymbolDefinitions.MsiEmbeddedChainer);
6228 break;
6229 case "EnsureTable":
6230 this.ParseEnsureTableElement(child);
@@ -6276,7 +6276,7 @@ namespace WixToolset.Core
6276 this.ParsePropertyElement(child);
6277 break;
6278 case "PropertyRef":
6279 - this.ParseSimpleRefElement(child, TupleDefinitions.Property);
6279 + this.ParseSimpleRefElement(child, SymbolDefinitions.Property);
6280 break;
6281 case "RelatedBundle":
6282 this.ParseRelatedBundleElement(child);
@@ -6291,7 +6291,7 @@ namespace WixToolset.Core
6291 this.ParseSetVariableElement(child);
6292 break;
6293 case "SetVariableRef":
6294 - this.ParseSimpleRefElement(child, TupleDefinitions.WixSetVariable);
6294 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixSetVariable);
6295 break;
6296 case "SFPCatalog":
6297 string parentName = null;
@@ -6301,7 +6301,7 @@ namespace WixToolset.Core
6301 this.ParseUIElement(child);
6302 break;
6303 case "UIRef":
6304 - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI);
6304 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI);
6305 break;
6306 case "Upgrade":
6307 this.ParseUpgradeElement(child);
@@ -6325,7 +6325,7 @@ namespace WixToolset.Core
6325
6326 if (!this.Core.EncounteredError && null != id)
6327 {
6328 - this.Core.AddTuple(new WixFragmentTuple(sourceLineNumbers, id));
6328 + this.Core.AddSymbol(new WixFragmentSymbol(sourceLineNumbers, id));
6329 }
6330 }
6331
@@ -6377,7 +6377,7 @@ namespace WixToolset.Core
6377
6378 if (!this.Core.EncounteredError)
6379 {
6380 - this.Core.AddTuple(new LaunchConditionTuple(sourceLineNumbers)
6380 + this.Core.AddSymbol(new LaunchConditionSymbol(sourceLineNumbers)
6381 {
6382 Condition = condition,
6383 Description = message
@@ -6521,7 +6521,7 @@ namespace WixToolset.Core
6521
6522 if (!this.Core.EncounteredError)
6523 {
6524 - this.Core.AddTuple(new IniFileTuple(sourceLineNumbers, id)
6524 + this.Core.AddSymbol(new IniFileSymbol(sourceLineNumbers, id)
6525 {
6526 FileName = this.GetMsiFilenameValue(shortName, name),
6527 DirProperty = directory,
@@ -6688,7 +6688,7 @@ namespace WixToolset.Core
6688 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
6689 }
6690 oneChild = true;
6691 - var newId = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); // FileSearch signatures override parent signatures
6691 + var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures
6692 id = new Identifier(AccessModifier.Private, newId);
6693 signature = null;
6694 break;
@@ -6705,7 +6705,7 @@ namespace WixToolset.Core
6705
6706 if (!this.Core.EncounteredError)
6707 {
6708 - var tuple = this.Core.AddTuple(new IniLocatorTuple(sourceLineNumbers, id)
6708 + var symbol = this.Core.AddSymbol(new IniLocatorSymbol(sourceLineNumbers, id)
6709 {
6710 SignatureRef = id.Id,
6711 FileName = this.GetMsiFilenameValue(shortName, name),
@@ -6716,7 +6716,7 @@ namespace WixToolset.Core
6716
6717 if (CompilerConstants.IntegerNotSet != field)
6718 {
6719 - tuple.Field = field;
6719 + symbol.Field = field;
6720 }
6721 }
6722
@@ -6741,7 +6741,7 @@ namespace WixToolset.Core
6741 {
6742 case "Shared":
6743 shared = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
6744 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Component, shared);
6744 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Component, shared);
6745 break;
6746 default:
6747 this.Core.UnexpectedAttribute(node, attrib);
@@ -6763,7 +6763,7 @@ namespace WixToolset.Core
6763
6764 if (!this.Core.EncounteredError)
6765 {
6766 - this.Core.AddTuple(new IsolatedComponentTuple(sourceLineNumbers)
6766 + this.Core.AddSymbol(new IsolatedComponentSymbol(sourceLineNumbers)
6767 {
6768 SharedComponentRef = shared,
6769 ApplicationComponentRef = componentId
@@ -6805,7 +6805,7 @@ namespace WixToolset.Core
6805 {
6806 if ("PatchCertificates" == node.Name.LocalName)
6807 {
6808 - this.Core.AddTuple(new MsiPatchCertificateTuple(sourceLineNumbers)
6808 + this.Core.AddSymbol(new MsiPatchCertificateSymbol(sourceLineNumbers)
6809 {
6810 PatchCertificate = name,
6811 DigitalCertificateRef = name,
@@ -6813,7 +6813,7 @@ namespace WixToolset.Core
6813 }
6814 else
6815 {
6816 - this.Core.AddTuple(new MsiPackageCertificateTuple(sourceLineNumbers)
6816 + this.Core.AddSymbol(new MsiPackageCertificateSymbol(sourceLineNumbers)
6817 {
6818 PackageCertificate = name,
6819 DigitalCertificateRef = name,
@@ -6889,7 +6889,7 @@ namespace WixToolset.Core
6889
6890 if (!this.Core.EncounteredError)
6891 {
6892 - this.Core.AddTuple(new MsiDigitalCertificateTuple(sourceLineNumbers, id)
6892 + this.Core.AddSymbol(new MsiDigitalCertificateSymbol(sourceLineNumbers, id)
6893 {
6894 CertData = sourceFile
6895 });
@@ -6962,7 +6962,7 @@ namespace WixToolset.Core
6962
6963 if (!this.Core.EncounteredError)
6964 {
6965 - this.Core.AddTuple(new MsiDigitalSignatureTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "Media", diskId))
6965 + this.Core.AddSymbol(new MsiDigitalSignatureSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "Media", diskId))
6966 {
6967 Table = "Media",
6968 SignObject = diskId,
@@ -7084,7 +7084,7 @@ namespace WixToolset.Core
7084 if (!this.Core.EncounteredError)
7085 {
7086 // create the row that performs the upgrade (or downgrade)
7087 - var tuple = this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers)
7087 + var symbol = this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers)
7088 {
7089 UpgradeCode = upgradeCode,
7090 Remove = removeFeatures,
@@ -7095,21 +7095,21 @@ namespace WixToolset.Core
7095
7096 if (allowDowngrades)
7097 {
7098 - tuple.VersionMin = "0";
7099 - tuple.Language = productLanguage;
7100 - tuple.VersionMinInclusive = true;
7098 + symbol.VersionMin = "0";
7099 + symbol.Language = productLanguage;
7100 + symbol.VersionMinInclusive = true;
7101 }
7102 else
7103 {
7104 - tuple.VersionMax = productVersion;
7105 - tuple.Language = productLanguage;
7106 - tuple.VersionMaxInclusive = allowSameVersionUpgrades;
7104 + symbol.VersionMax = productVersion;
7105 + symbol.Language = productLanguage;
7106 + symbol.VersionMaxInclusive = allowSameVersionUpgrades;
7107 }
7108
7109 // Add launch condition that blocks upgrades
7110 if (blockUpgrades)
7111 {
7112 - this.Core.AddTuple(new LaunchConditionTuple(sourceLineNumbers)
7112 + this.Core.AddSymbol(new LaunchConditionSymbol(sourceLineNumbers)
7113 {
7114 Condition = Common.UpgradePreventedCondition,
7115 Description = downgradeErrorMessage
@@ -7119,7 +7119,7 @@ namespace WixToolset.Core
7119 // now create the Upgrade row and launch conditions to prevent downgrades (unless explicitly permitted)
7120 if (!allowDowngrades)
7121 {
7122 - this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers)
7122 + this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers)
7123 {
7124 UpgradeCode = upgradeCode,
7125 VersionMin = productVersion,
@@ -7129,7 +7129,7 @@ namespace WixToolset.Core
7129 ActionProperty = Common.DowngradeDetectedProperty
7130 });
7131
7132 - this.Core.AddTuple(new LaunchConditionTuple(sourceLineNumbers)
7132 + this.Core.AddSymbol(new LaunchConditionSymbol(sourceLineNumbers)
7133 {
7134 Condition = Common.DowngradePreventedCondition,
7135 Description = downgradeErrorMessage
@@ -7158,7 +7158,7 @@ namespace WixToolset.Core
7158 break;
7159 }
7160
7161 - this.Core.ScheduleActionTuple(sourceLineNumbers, AccessModifier.Public, SequenceTable.InstallExecuteSequence, "RemoveExistingProducts", afterAction: after);
7161 + this.Core.ScheduleActionSymbol(sourceLineNumbers, AccessModifier.Public, SequenceTable.InstallExecuteSequence, "RemoveExistingProducts", afterAction: after);
7162 }
7163 }
7164
@@ -7199,7 +7199,7 @@ namespace WixToolset.Core
7199 break;
7200 case "DiskPrompt":
7201 diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7202 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined
7202 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined
7203 break;
7204 case "EmbedCab":
7205 embedCab = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
@@ -7331,7 +7331,7 @@ namespace WixToolset.Core
7331 // add the row to the section
7332 if (!this.Core.EncounteredError)
7333 {
7334 - this.Core.AddTuple(new MediaTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id))
7334 + this.Core.AddSymbol(new MediaSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, id))
7335 {
7336 DiskId = id,
7337 DiskPrompt = diskPrompt,
@@ -7344,7 +7344,7 @@ namespace WixToolset.Core
7344
7345 if (null != symbols)
7346 {
7347 - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Media, id))
7347 + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Media, id))
7348 {
7349 SymbolType = SymbolPathType.Media,
7350 SymbolId = id.ToString(CultureInfo.InvariantCulture),
@@ -7406,7 +7406,7 @@ namespace WixToolset.Core
7406 break;
7407 case "DiskPrompt":
7408 diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7409 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined
7409 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined
7410 this.Core.Write(WarningMessages.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
7411 break;
7412 case "EmbedCab":
@@ -7440,12 +7440,12 @@ namespace WixToolset.Core
7440
7441 if (!this.Core.EncounteredError)
7442 {
7443 - this.Core.AddTuple(new MediaTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, 1))
7443 + this.Core.AddSymbol(new MediaSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, 1))
7444 {
7445 DiskId = 1
7446 });
7447
7448 - this.Core.AddTuple(new WixMediaTemplateTuple(sourceLineNumbers)
7448 + this.Core.AddSymbol(new WixMediaTemplateSymbol(sourceLineNumbers)
7449 {
7450 CabinetTemplate = cabinetTemplate,
7451 VolumeLabel = volumeLabel,
@@ -7478,7 +7478,7 @@ namespace WixToolset.Core
7478 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
7479 Identifier id = null;
7480 var configData = String.Empty;
7481 - FileTupleAttributes attributes = 0;
7481 + FileSymbolAttributes attributes = 0;
7482 string language = null;
7483 string sourceFile = null;
7484
@@ -7493,12 +7493,12 @@ namespace WixToolset.Core
7493 break;
7494 case "DiskId":
7495 diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue);
7496 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat));
7496 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat));
7497 break;
7498 case "FileCompression":
7499 var compress = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
7500 - attributes |= compress == YesNoType.Yes ? FileTupleAttributes.Compressed : 0;
7501 - attributes |= compress == YesNoType.No ? FileTupleAttributes.Uncompressed : 0;
7500 + attributes |= compress == YesNoType.Yes ? FileSymbolAttributes.Compressed : 0;
7501 + attributes |= compress == YesNoType.No ? FileSymbolAttributes.Uncompressed : 0;
7502 break;
7503 case "Language":
7504 language = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue);
@@ -7561,7 +7561,7 @@ namespace WixToolset.Core
7561
7562 if (!this.Core.EncounteredError)
7563 {
7564 - var tuple = this.Core.AddTuple(new WixMergeTuple(sourceLineNumbers, id)
7564 + var symbol = this.Core.AddSymbol(new WixMergeSymbol(sourceLineNumbers, id)
7565 {
7566 DirectoryRef = directoryId,
7567 SourceFile = sourceFile,
@@ -7571,7 +7571,7 @@ namespace WixToolset.Core
7571 FeatureRef = Guid.Empty.ToString("B")
7572 });
7573
7574 - tuple.Set((int)WixMergeTupleFields.Language, language);
7574 + symbol.Set((int)WixMergeSymbolFields.Language, language);
7575 }
7576 }
7577
@@ -7692,7 +7692,7 @@ namespace WixToolset.Core
7692
7693 if (!this.Core.EncounteredError)
7694 {
7695 - this.Core.AddTuple(new ConditionTuple(sourceLineNumbers)
7695 + this.Core.AddSymbol(new ConditionSymbol(sourceLineNumbers)
7696 {
7697 FeatureRef = featureId,
7698 Level = level.Value,
@@ -7722,7 +7722,7 @@ namespace WixToolset.Core
7722 {
7723 case "Id":
7724 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
7725 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixMerge, id);
7725 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixMerge, id);
7726 break;
7727 case "Primary":
7728 primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
@@ -7815,7 +7815,7 @@ namespace WixToolset.Core
7815
7816 if (!this.Core.EncounteredError)
7817 {
7818 - this.Core.AddTuple(new MIMETuple(sourceLineNumbers, new Identifier(AccessModifier.Private, contentType))
7818 + this.Core.AddSymbol(new MIMESymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, contentType))
7819 {
7820 ContentType = contentType,
7821 ExtensionRef = extension,
@@ -7894,7 +7894,7 @@ namespace WixToolset.Core
7894 if (patch)
7895 {
7896 // /Patch/PatchProperty goes directly into MsiPatchMetadata table
7897 - this.Core.AddTuple(new MsiPatchMetadataTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, company, name))
7897 + this.Core.AddSymbol(new MsiPatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, company, name))
7898 {
7899 Company = company,
7900 Property = name,
@@ -7921,7 +7921,7 @@ namespace WixToolset.Core
7921 {
7922 if (!this.Core.EncounteredError)
7923 {
7924 - this.Core.AddTuple(new PropertyTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, name))
7924 + this.Core.AddSymbol(new PropertySymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, name))
7925 {
7926 Value = value
7927 });
@@ -7971,7 +7971,7 @@ namespace WixToolset.Core
7971
7972 return id;
7973 }
7974 -
7974 +
7975 /// <summary>
7976 /// Parses a ReplacePatch element.
7977 /// </summary>
@@ -8080,7 +8080,7 @@ namespace WixToolset.Core
8080
8081 if (!this.Core.EncounteredError)
8082 {
8083 - this.Core.AddTuple(new WixPatchRefTuple(sourceLineNumbers)
8083 + this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers)
8084 {
8085 Table = "*",
8086 PrimaryKeys = "*",
@@ -8127,7 +8127,7 @@ namespace WixToolset.Core
8127
8128 if (!this.Core.EncounteredError)
8129 {
8130 - this.Core.AddTuple(new WixPatchRefTuple(sourceLineNumbers)
8130 + this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers)
8131 {
8132 Table = tableName,
8133 PrimaryKeys = id
@@ -8245,7 +8245,7 @@ namespace WixToolset.Core
8245
8246 if (!this.Core.EncounteredError)
8247 {
8248 - this.Core.AddTuple(new WixPatchBaselineTuple(sourceLineNumbers, id)
8248 + this.Core.AddSymbol(new WixPatchBaselineSymbol(sourceLineNumbers, id)
8249 {
8250 DiskId = diskId ?? 1,
8251 ValidationFlags = validationFlags,
src/WixToolset.Core/CompilerCore.cs
+24 -24
@@ -13,7 +13,7 @@ namespace WixToolset.Core
13 using System.Text.RegularExpressions;
14 using System.Xml.Linq;
15 using WixToolset.Data;
16 - using WixToolset.Data.Tuples;
16 + using WixToolset.Data.Symbols;
17 using WixToolset.Data.WindowsInstaller;
18 using WixToolset.Extensibility;
19 using WixToolset.Extensibility.Data;
@@ -164,13 +164,13 @@ namespace WixToolset.Core
164 public bool ShowPedanticMessages { get; set; }
165
166 /// <summary>
167 - /// Add a tuple to the active section.
167 + /// Add a symbol to the active section.
168 /// </summary>
169 - /// <param name="tuple">Tuple to add.</param>
170 - public T AddTuple<T>(T tuple)
171 - where T : IntermediateTuple
169 + /// <param name="symbol">Symbol to add.</param>
170 + public T AddSymbol<T>(T symbol)
171 + where T : IntermediateSymbol
172 {
173 - return this.ActiveSection.AddTuple(tuple);
173 + return this.ActiveSection.AddSymbol(symbol);
174 }
175
176 /// <summary>
@@ -355,39 +355,39 @@ namespace WixToolset.Core
355 /// <param name="componentId">The component which will control installation/uninstallation of the registry entry.</param>
356 public Identifier CreateRegistryRow(SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId)
357 {
358 - return this.parseHelper.CreateRegistryTuple(this.ActiveSection, sourceLineNumbers, root, key, name, value, componentId, true);
358 + return this.parseHelper.CreateRegistrySymbol(this.ActiveSection, sourceLineNumbers, root, key, name, value, componentId, true);
359 }
360
361 /// <summary>
362 - /// Create a WixSimpleReferenceTuple in the active section.
362 + /// Create a WixSimpleReferenceSymbol in the active section.
363 /// </summary>
364 /// <param name="sourceLineNumbers">Source line information for the row.</param>
365 - /// <param name="tupleName">The tuple name of the simple reference.</param>
365 + /// <param name="symbolName">The symbol name of the simple reference.</param>
366 /// <param name="primaryKeys">The primary keys of the simple reference.</param>
367 - public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, string tupleName, params string[] primaryKeys)
367 + public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys)
368 {
369 if (!this.EncounteredError)
370 {
371 var joinedKeys = String.Join("/", primaryKeys);
372 - var id = String.Concat(tupleName, ":", joinedKeys);
372 + var id = String.Concat(symbolName, ":", joinedKeys);
373
374 // If this simple reference hasn't been added to the active section already, add it.
375 if (this.activeSectionSimpleReferences.Add(id))
376 {
377 - this.parseHelper.CreateSimpleReference(this.ActiveSection, sourceLineNumbers, tupleName, primaryKeys);
377 + this.parseHelper.CreateSimpleReference(this.ActiveSection, sourceLineNumbers, symbolName, primaryKeys);
378 }
379 }
380 }
381
382 /// <summary>
383 - /// Create a WixSimpleReferenceTuple in the active section.
383 + /// Create a WixSimpleReferenceSymbol in the active section.
384 /// </summary>
385 /// <param name="sourceLineNumbers">Source line information for the row.</param>
386 - /// <param name="tupleDefinition">The tuple definition of the simple reference.</param>
386 + /// <param name="symbolDefinition">The symbol definition of the simple reference.</param>
387 /// <param name="primaryKeys">The primary keys of the simple reference.</param>
388 - public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, params string[] primaryKeys)
388 + public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys)
389 {
390 - this.CreateSimpleReference(sourceLineNumbers, tupleDefinition.Name, primaryKeys);
390 + this.CreateSimpleReference(sourceLineNumbers, symbolDefinition.Name, primaryKeys);
391 }
392
393 /// <summary>
@@ -402,12 +402,12 @@ namespace WixToolset.Core
402 {
403 if (!this.EncounteredError)
404 {
405 - this.parseHelper.CreateWixGroupTuple(this.ActiveSection, sourceLineNumbers, parentType, parentId, childType, childId);
405 + this.parseHelper.CreateWixGroupSymbol(this.ActiveSection, sourceLineNumbers, parentType, parentId, childType, childId);
406 }
407 }
408
409 /// <summary>
410 - /// Add the appropriate tuples to make sure that the given table shows up
410 + /// Add the appropriate symbols to make sure that the given table shows up
411 /// in the resulting output.
412 /// </summary>
413 /// <param name="sourceLineNumbers">Source line numbers.</param>
@@ -421,7 +421,7 @@ namespace WixToolset.Core
421 }
422
423 /// <summary>
424 - /// Add the appropriate tuples to make sure that the given table shows up
424 + /// Add the appropriate symbols to make sure that the given table shows up
425 /// in the resulting output.
426 /// </summary>
427 /// <param name="sourceLineNumbers">Source line numbers.</param>
@@ -1013,12 +1013,12 @@ namespace WixToolset.Core
1013 /// <returns>Identifier for the newly created row.</returns>
1014 internal Identifier CreateDirectoryRow(SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, string shortName = null, string sourceName = null, string shortSourceName = null)
1015 {
1016 - return this.parseHelper.CreateDirectoryTuple(this.ActiveSection, sourceLineNumbers, id, parentId, name, this.activeSectionInlinedDirectoryIds, shortName, sourceName, shortSourceName);
1016 + return this.parseHelper.CreateDirectorySymbol(this.ActiveSection, sourceLineNumbers, id, parentId, name, this.activeSectionInlinedDirectoryIds, shortName, sourceName, shortSourceName);
1017 }
1018
1019 - public void CreateWixSearchTuple(SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after)
1019 + public void CreateWixSearchSymbol(SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after)
1020 {
1021 - this.parseHelper.CreateWixSearchTuple(this.ActiveSection, sourceLineNumbers, elementName, id, variable, condition, after, null);
1021 + this.parseHelper.CreateWixSearchSymbol(this.ActiveSection, sourceLineNumbers, elementName, id, variable, condition, after, null);
1022 }
1023
1024 /// <summary>
@@ -1033,9 +1033,9 @@ namespace WixToolset.Core
1033 return this.parseHelper.GetAttributeInlineDirectorySyntax(sourceLineNumbers, attribute, resultUsedToCreateReference);
1034 }
1035
1036 - internal WixActionTuple ScheduleActionTuple(SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition = null, string beforeAction = null, string afterAction = null, bool overridable = false)
1036 + internal WixActionSymbol ScheduleActionSymbol(SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition = null, string beforeAction = null, string afterAction = null, bool overridable = false)
1037 {
1038 - return this.parseHelper.ScheduleActionTuple(this.ActiveSection, sourceLineNumbers, access, sequence, actionName, condition, beforeAction, afterAction, overridable);
1038 + return this.parseHelper.ScheduleActionSymbol(this.ActiveSection, sourceLineNumbers, access, sequence, actionName, condition, beforeAction, afterAction, overridable);
1039 }
1040
1041 /// <summary>
src/WixToolset.Core/Compiler_2.cs
+103 -103
@@ -10,7 +10,7 @@ namespace WixToolset.Core
10 using System.IO;
11 using System.Xml.Linq;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Data.WindowsInstaller;
15 using WixToolset.Extensibility;
16
@@ -190,7 +190,7 @@ namespace WixToolset.Core
190 this.ParseCustomActionElement(child);
191 break;
192 case "CustomActionRef":
193 - this.ParseSimpleRefElement(child, TupleDefinitions.CustomAction);
193 + this.ParseSimpleRefElement(child, SymbolDefinitions.CustomAction);
194 break;
195 case "CustomTable":
196 this.ParseCustomTableElement(child);
@@ -205,7 +205,7 @@ namespace WixToolset.Core
205 this.ParseEmbeddedChainerElement(child);
206 break;
207 case "EmbeddedChainerRef":
208 - this.ParseSimpleRefElement(child, TupleDefinitions.MsiEmbeddedChainer);
208 + this.ParseSimpleRefElement(child, SymbolDefinitions.MsiEmbeddedChainer);
209 break;
210 case "EnsureTable":
211 this.ParseEnsureTableElement(child);
@@ -248,7 +248,7 @@ namespace WixToolset.Core
248 this.ParsePropertyElement(child);
249 break;
250 case "PropertyRef":
251 - this.ParseSimpleRefElement(child, TupleDefinitions.Property);
251 + this.ParseSimpleRefElement(child, SymbolDefinitions.Property);
252 break;
253 case "SetDirectory":
254 this.ParseSetDirectoryElement(child);
@@ -274,7 +274,7 @@ namespace WixToolset.Core
274 this.ParseUIElement(child);
275 break;
276 case "UIRef":
277 - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI);
277 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI);
278 break;
279 case "Upgrade":
280 this.ParseUpgradeElement(child);
@@ -297,7 +297,7 @@ namespace WixToolset.Core
297 {
298 if (null != symbols)
299 {
300 - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers)
300 + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers)
301 {
302 SymbolId = productCode,
303 SymbolType = SymbolPathType.Product,
@@ -318,8 +318,8 @@ namespace WixToolset.Core
318 /// <param name="node">Element to parse.</param>
319 /// <param name="componentId">Identifier of parent component.</param>
320 /// <param name="fileId">Default identifer for driver/translator file.</param>
321 - /// <param name="tupleDefinitionType">Tuple type we're processing for.</param>
322 - private void ParseODBCDriverOrTranslator(XElement node, string componentId, string fileId, TupleDefinitionType tupleDefinitionType)
321 + /// <param name="symbolDefinitionType">Symbol type we're processing for.</param>
322 + private void ParseODBCDriverOrTranslator(XElement node, string componentId, string fileId, SymbolDefinitionType symbolDefinitionType)
323 {
324 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
325 Identifier id = null;
@@ -338,14 +338,14 @@ namespace WixToolset.Core
338 break;
339 case "File":
340 driver = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
341 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, driver);
341 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, driver);
342 break;
343 case "Name":
344 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
345 break;
346 case "SetupFile":
347 setup = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
348 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, setup);
348 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, setup);
349 break;
350 default:
351 this.Core.UnexpectedAttribute(node, attrib);
@@ -369,7 +369,7 @@ namespace WixToolset.Core
369 }
370
371 // drivers have a few possible children
372 - if (TupleDefinitionType.ODBCDriver == tupleDefinitionType)
372 + if (SymbolDefinitionType.ODBCDriver == symbolDefinitionType)
373 {
374 // process any data sources for the driver
375 foreach (var child in node.Elements())
@@ -383,7 +383,7 @@ namespace WixToolset.Core
383 this.ParseODBCDataSource(child, componentId, name, out ignoredKeyPath);
384 break;
385 case "Property":
386 - this.ParseODBCProperty(child, id.Id, TupleDefinitionType.ODBCAttribute);
386 + this.ParseODBCProperty(child, id.Id, SymbolDefinitionType.ODBCAttribute);
387 break;
388 default:
389 this.Core.UnexpectedElement(node, child);
@@ -403,10 +403,10 @@ namespace WixToolset.Core
403
404 if (!this.Core.EncounteredError)
405 {
406 - switch (tupleDefinitionType)
406 + switch (symbolDefinitionType)
407 {
408 - case TupleDefinitionType.ODBCDriver:
409 - this.Core.AddTuple(new ODBCDriverTuple(sourceLineNumbers, id)
408 + case SymbolDefinitionType.ODBCDriver:
409 + this.Core.AddSymbol(new ODBCDriverSymbol(sourceLineNumbers, id)
410 {
411 ComponentRef = componentId,
412 Description = name,
@@ -414,8 +414,8 @@ namespace WixToolset.Core
414 SetupFileRef = setup,
415 });
416 break;
417 - case TupleDefinitionType.ODBCTranslator:
418 - this.Core.AddTuple(new ODBCTranslatorTuple(sourceLineNumbers, id)
417 + case SymbolDefinitionType.ODBCTranslator:
418 + this.Core.AddSymbol(new ODBCTranslatorSymbol(sourceLineNumbers, id)
419 {
420 ComponentRef = componentId,
421 Description = name,
@@ -424,7 +424,7 @@ namespace WixToolset.Core
424 });
425 break;
426 default:
427 - throw new ArgumentOutOfRangeException(nameof(tupleDefinitionType));
427 + throw new ArgumentOutOfRangeException(nameof(symbolDefinitionType));
428 }
429 }
430 }
@@ -434,8 +434,8 @@ namespace WixToolset.Core
434 /// </summary>
435 /// <param name="node">Element to parse.</param>
436 /// <param name="parentId">Identifier of parent driver or translator.</param>
437 - /// <param name="tupleDefinitionType">Name of the table to create property in.</param>
438 - private void ParseODBCProperty(XElement node, string parentId, TupleDefinitionType tupleDefinitionType)
437 + /// <param name="symbolDefinitionType">Name of the table to create property in.</param>
438 + private void ParseODBCProperty(XElement node, string parentId, SymbolDefinitionType symbolDefinitionType)
439 {
440 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
441 string id = null;
@@ -474,18 +474,18 @@ namespace WixToolset.Core
474 if (!this.Core.EncounteredError)
475 {
476 var identifier = new Identifier(AccessModifier.Private, parentId, id);
477 - switch (tupleDefinitionType)
477 + switch (symbolDefinitionType)
478 {
479 - case TupleDefinitionType.ODBCAttribute:
480 - this.Core.AddTuple(new ODBCAttributeTuple(sourceLineNumbers, identifier)
479 + case SymbolDefinitionType.ODBCAttribute:
480 + this.Core.AddSymbol(new ODBCAttributeSymbol(sourceLineNumbers, identifier)
481 {
482 DriverRef = parentId,
483 Attribute = id,
484 Value = propertyValue,
485 });
486 break;
487 - case TupleDefinitionType.ODBCSourceAttribute:
488 - this.Core.AddTuple(new ODBCSourceAttributeTuple(sourceLineNumbers, identifier)
487 + case SymbolDefinitionType.ODBCSourceAttribute:
488 + this.Core.AddSymbol(new ODBCSourceAttributeSymbol(sourceLineNumbers, identifier)
489 {
490 DataSourceRef = parentId,
491 Attribute = id,
@@ -493,7 +493,7 @@ namespace WixToolset.Core
493 });
494 break;
495 default:
496 - throw new ArgumentOutOfRangeException(nameof(tupleDefinitionType));
496 + throw new ArgumentOutOfRangeException(nameof(symbolDefinitionType));
497 }
498 }
499 }
@@ -578,7 +578,7 @@ namespace WixToolset.Core
578 switch (child.Name.LocalName)
579 {
580 case "Property":
581 - this.ParseODBCProperty(child, id.Id, TupleDefinitionType.ODBCSourceAttribute);
581 + this.ParseODBCProperty(child, id.Id, SymbolDefinitionType.ODBCSourceAttribute);
582 break;
583 default:
584 this.Core.UnexpectedElement(node, child);
@@ -593,7 +593,7 @@ namespace WixToolset.Core
593
594 if (!this.Core.EncounteredError)
595 {
596 - this.Core.AddTuple(new ODBCDataSourceTuple(sourceLineNumbers, id)
596 + this.Core.AddSymbol(new ODBCDataSourceSymbol(sourceLineNumbers, id)
597 {
598 ComponentRef = componentId,
599 Description = name,
@@ -712,7 +712,7 @@ namespace WixToolset.Core
712 switch (installScope)
713 {
714 case "perMachine":
715 - this.Core.AddTuple(new PropertyTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "ALLUSERS"))
715 + this.Core.AddSymbol(new PropertySymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "ALLUSERS"))
716 {
717 Value = "1"
718 });
@@ -870,67 +870,67 @@ namespace WixToolset.Core
870
871 if (!this.Core.EncounteredError)
872 {
873 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
873 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
874 {
875 PropertyId = SummaryInformationType.Codepage,
876 Value = codepage
877 });
878
879 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
879 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
880 {
881 PropertyId = SummaryInformationType.Title,
882 Value = "Installation Database"
883 });
884
885 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
885 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
886 {
887 PropertyId = SummaryInformationType.Subject,
888 Value = packageName
889 });
890
891 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
891 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
892 {
893 PropertyId = SummaryInformationType.Author,
894 Value = packageAuthor
895 });
896
897 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
897 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
898 {
899 PropertyId = SummaryInformationType.Keywords,
900 Value = keywords
901 });
902
903 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
903 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
904 {
905 PropertyId = SummaryInformationType.Comments,
906 Value = comments
907 });
908
909 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
909 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
910 {
911 PropertyId = SummaryInformationType.PlatformAndLanguage,
912 Value = String.Format(CultureInfo.InvariantCulture, "{0};{1}", platform, packageLanguages)
913 });
914
915 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
915 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
916 {
917 PropertyId = SummaryInformationType.PackageCode,
918 Value = packageCode
919 });
920
921 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
921 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
922 {
923 PropertyId = SummaryInformationType.WindowsInstallerVersion,
924 Value = msiVersion.ToString(CultureInfo.InvariantCulture)
925 });
926
927 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
927 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
928 {
929 PropertyId = SummaryInformationType.WordCount,
930 Value = sourceBits.ToString(CultureInfo.InvariantCulture)
931 });
932
933 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
933 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
934 {
935 PropertyId = SummaryInformationType.Security,
936 Value = YesNoDefaultType.No == security ? "0" : YesNoDefaultType.Yes == security ? "4" : "2"
@@ -1007,13 +1007,13 @@ namespace WixToolset.Core
1007
1008 if (!this.Core.EncounteredError)
1009 {
1010 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1010 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1011 {
1012 PropertyId = SummaryInformationType.Codepage,
1013 Value = codepage
1014 });
1015
1016 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1016 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1017 {
1018 PropertyId = SummaryInformationType.Title,
1019 Value = "Patch"
@@ -1021,7 +1021,7 @@ namespace WixToolset.Core
1021
1022 if (null != packageName)
1023 {
1024 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1024 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1025 {
1026 PropertyId = SummaryInformationType.Subject,
1027 Value = packageName
@@ -1030,7 +1030,7 @@ namespace WixToolset.Core
1030
1031 if (null != packageAuthor)
1032 {
1033 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1033 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1034 {
1035 PropertyId = SummaryInformationType.Author,
1036 Value = packageAuthor
@@ -1039,7 +1039,7 @@ namespace WixToolset.Core
1039
1040 if (null != keywords)
1041 {
1042 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1042 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1043 {
1044 PropertyId = SummaryInformationType.Keywords,
1045 Value = keywords
@@ -1048,26 +1048,26 @@ namespace WixToolset.Core
1048
1049 if (null != comments)
1050 {
1051 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1051 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1052 {
1053 PropertyId = SummaryInformationType.Comments,
1054 Value = comments
1055 });
1056 }
1057
1058 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1058 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1059 {
1060 PropertyId = SummaryInformationType.WindowsInstallerVersion,
1061 Value = msiVersion.ToString(CultureInfo.InvariantCulture)
1062 });
1063
1064 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1064 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1065 {
1066 PropertyId = SummaryInformationType.WordCount,
1067 Value = "0"
1068 });
1069
1070 - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers)
1070 + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
1071 {
1072 PropertyId = SummaryInformationType.Security,
1073 Value = YesNoDefaultType.No == security ? "0" : YesNoDefaultType.Yes == security ? "4" : "2"
@@ -1163,7 +1163,7 @@ namespace WixToolset.Core
1163
1164 if (!this.Core.EncounteredError)
1165 {
1166 - this.Core.AddTuple(new LockPermissionsTuple(sourceLineNumbers)
1166 + this.Core.AddSymbol(new LockPermissionsSymbol(sourceLineNumbers)
1167 {
1168 LockObject = objectId,
1169 Table = tableName,
@@ -1239,7 +1239,7 @@ namespace WixToolset.Core
1239
1240 if (!this.Core.EncounteredError)
1241 {
1242 - this.Core.AddTuple(new MsiLockPermissionsExTuple(sourceLineNumbers, id)
1242 + this.Core.AddSymbol(new MsiLockPermissionsExSymbol(sourceLineNumbers, id)
1243 {
1244 LockObject = objectId,
1245 Table = tableName,
@@ -1371,7 +1371,7 @@ namespace WixToolset.Core
1371 {
1372 if (!this.Core.EncounteredError)
1373 {
1374 - var tuple = this.Core.AddTuple(new ProgIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, progId))
1374 + var symbol = this.Core.AddSymbol(new ProgIdSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, progId))
1375 {
1376 ProgId = progId,
1377 ParentProgIdRef = parent,
@@ -1381,13 +1381,13 @@ namespace WixToolset.Core
1381
1382 if (null != icon)
1383 {
1384 - tuple.IconRef = icon;
1385 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Icon, icon);
1384 + symbol.IconRef = icon;
1385 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Icon, icon);
1386 }
1387
1388 if (CompilerConstants.IntegerNotSet != iconIndex)
1389 {
1390 - tuple.IconIndex = iconIndex;
1390 + symbol.IconIndex = iconIndex;
1391 }
1392
1393 this.Core.EnsureTable(sourceLineNumbers, WindowsInstallerTableDefinitions.Class);
@@ -1419,7 +1419,7 @@ namespace WixToolset.Core
1419
1420 if (null != icon) // ProgId's Default Icon
1421 {
1422 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, icon);
1422 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, icon);
1423
1424 icon = String.Format(CultureInfo.InvariantCulture, "\"[#{0}]\"", icon);
1425
@@ -1515,7 +1515,7 @@ namespace WixToolset.Core
1515
1516 if ("ErrorDialog" == id.Id)
1517 {
1518 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, value);
1518 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, value);
1519 }
1520
1521 foreach (var child in node.Elements())
@@ -1550,7 +1550,7 @@ namespace WixToolset.Core
1550 {
1551 if (complianceCheck && !this.Core.EncounteredError)
1552 {
1553 - this.Core.AddTuple(new CCPSearchTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, sig)));
1553 + this.Core.AddSymbol(new CCPSearchSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, sig)));
1554 }
1555
1556 this.AddAppSearch(sourceLineNumbers, id, sig);
@@ -1579,7 +1579,7 @@ namespace WixToolset.Core
1579 {
1580 this.Core.Write(WarningMessages.PropertyModularizationSuppressed(sourceLineNumbers));
1581
1582 - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, id));
1582 + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, id));
1583 }
1584 }
1585
@@ -1766,7 +1766,7 @@ namespace WixToolset.Core
1766
1767 if (!this.Core.EncounteredError && null != name)
1768 {
1769 - this.Core.AddTuple(new RegistryTuple(sourceLineNumbers, id)
1769 + this.Core.AddSymbol(new RegistrySymbol(sourceLineNumbers, id)
1770 {
1771 Root = root.Value,
1772 Key = key,
@@ -2008,7 +2008,7 @@ namespace WixToolset.Core
2008
2009 if (!this.Core.EncounteredError)
2010 {
2011 - this.Core.AddTuple(new RegistryTuple(sourceLineNumbers, id)
2011 + this.Core.AddSymbol(new RegistrySymbol(sourceLineNumbers, id)
2012 {
2013 Root = root.Value,
2014 Key = key,
@@ -2154,7 +2154,7 @@ namespace WixToolset.Core
2154
2155 if (!this.Core.EncounteredError)
2156 {
2157 - this.Core.AddTuple(new RemoveRegistryTuple(sourceLineNumbers, id)
2157 + this.Core.AddSymbol(new RemoveRegistrySymbol(sourceLineNumbers, id)
2158 {
2159 Root = root.Value,
2160 Key = key,
@@ -2230,7 +2230,7 @@ namespace WixToolset.Core
2230
2231 if (!this.Core.EncounteredError)
2232 {
2233 - this.Core.AddTuple(new RemoveRegistryTuple(sourceLineNumbers, id)
2233 + this.Core.AddSymbol(new RemoveRegistrySymbol(sourceLineNumbers, id)
2234 {
2235 Root = root.Value,
2236 Key = key,
@@ -2349,7 +2349,7 @@ namespace WixToolset.Core
2349
2350 if (!this.Core.EncounteredError)
2351 {
2352 - this.Core.AddTuple(new RemoveFileTuple(sourceLineNumbers, id)
2352 + this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id)
2353 {
2354 ComponentRef = componentId,
2355 FileName = this.GetMsiFilenameValue(shortName, name),
@@ -2437,7 +2437,7 @@ namespace WixToolset.Core
2437
2438 if (!this.Core.EncounteredError)
2439 {
2440 - this.Core.AddTuple(new RemoveFileTuple(sourceLineNumbers, id)
2440 + this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id)
2441 {
2442 ComponentRef = componentId,
2443 DirProperty = directory ?? property ?? parentDirectory,
@@ -2508,7 +2508,7 @@ namespace WixToolset.Core
2508
2509 if (!this.Core.EncounteredError)
2510 {
2511 - this.Core.AddTuple(new ReserveCostTuple(sourceLineNumbers, id)
2511 + this.Core.AddSymbol(new ReserveCostSymbol(sourceLineNumbers, id)
2512 {
2513 ComponentRef = componentId,
2514 ReserveFolder = directoryId,
@@ -2552,7 +2552,7 @@ namespace WixToolset.Core
2552 if (customAction)
2553 {
2554 actionName = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib);
2555 - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.CustomAction, actionName);
2555 + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.CustomAction, actionName);
2556 }
2557 else
2558 {
@@ -2563,7 +2563,7 @@ namespace WixToolset.Core
2563 if (customAction || showDialog || specialAction || specialStandardAction)
2564 {
2565 afterAction = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib);
2566 - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.WixAction, sequenceTable.ToString(), afterAction);
2566 + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.WixAction, sequenceTable.ToString(), afterAction);
2567 }
2568 else
2569 {
@@ -2574,7 +2574,7 @@ namespace WixToolset.Core
2574 if (customAction || showDialog || specialAction || specialStandardAction)
2575 {
2576 beforeAction = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib);
2577 - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.WixAction, sequenceTable.ToString(), beforeAction);
2577 + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.WixAction, sequenceTable.ToString(), beforeAction);
2578 }
2579 else
2580 {
@@ -2588,7 +2588,7 @@ namespace WixToolset.Core
2588 if (showDialog)
2589 {
2590 actionName = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib);
2591 - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.Dialog, actionName);
2591 + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.Dialog, actionName);
2592 }
2593 else
2594 {
@@ -2703,7 +2703,7 @@ namespace WixToolset.Core
2703 {
2704 if (suppress)
2705 {
2706 - this.Core.AddTuple(new WixSuppressActionTuple(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName))
2706 + this.Core.AddSymbol(new WixSuppressActionSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName))
2707 {
2708 SequenceTable = sequenceTable,
2709 Action = actionName
@@ -2711,7 +2711,7 @@ namespace WixToolset.Core
2711 }
2712 else
2713 {
2714 - var tuple = this.Core.AddTuple(new WixActionTuple(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName))
2714 + var symbol = this.Core.AddSymbol(new WixActionSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName))
2715 {
2716 SequenceTable = sequenceTable,
2717 Action = actionName,
@@ -2723,7 +2723,7 @@ namespace WixToolset.Core
2723
2724 if (CompilerConstants.IntegerNotSet != sequence)
2725 {
2726 - tuple.Sequence = sequence;
2726 + symbol.Sequence = sequence;
2727 }
2728 }
2729 }
@@ -2897,7 +2897,7 @@ namespace WixToolset.Core
2897 {
2898 if (!String.IsNullOrEmpty(delayedAutoStart))
2899 {
2900 - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".DS")))
2900 + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".DS")))
2901 {
2902 Name = name,
2903 OnInstall = install,
@@ -2911,7 +2911,7 @@ namespace WixToolset.Core
2911
2912 if (!String.IsNullOrEmpty(failureActionsWhen))
2913 {
2914 - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".FA")))
2914 + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".FA")))
2915 {
2916 Name = name,
2917 OnInstall = install,
@@ -2925,7 +2925,7 @@ namespace WixToolset.Core
2925
2926 if (!String.IsNullOrEmpty(sid))
2927 {
2928 - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".SS")))
2928 + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".SS")))
2929 {
2930 Name = name,
2931 OnInstall = install,
@@ -2939,7 +2939,7 @@ namespace WixToolset.Core
2939
2940 if (!String.IsNullOrEmpty(requiredPrivileges))
2941 {
2942 - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".RP")))
2942 + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".RP")))
2943 {
2944 Name = name,
2945 OnInstall = install,
@@ -2953,7 +2953,7 @@ namespace WixToolset.Core
2953
2954 if (!String.IsNullOrEmpty(preShutdownDelay))
2955 {
2956 - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".PD")))
2956 + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".PD")))
2957 {
2958 Name = name,
2959 OnInstall = install,
@@ -3279,12 +3279,12 @@ namespace WixToolset.Core
3279
3280 if (!this.Core.EncounteredError)
3281 {
3282 - this.Core.AddTuple(new MsiServiceConfigFailureActionsTuple(sourceLineNumbers, id)
3282 + this.Core.AddSymbol(new MsiServiceConfigFailureActionsSymbol(sourceLineNumbers, id)
3283 {
3284 Name = name,
3285 - OnInstall = install,
3286 - OnReinstall = reinstall,
3287 - OnUninstall = uninstall,
3285 + OnInstall = install,
3286 + OnReinstall = reinstall,
3287 + OnUninstall = uninstall,
3288 ResetPeriod = resetPeriod,
3289 RebootMessage = rebootMessage,
3290 Command = command,
@@ -3427,7 +3427,7 @@ namespace WixToolset.Core
3427
3428 if (!this.Core.EncounteredError)
3429 {
3430 - this.Core.AddTuple(new ServiceControlTuple(sourceLineNumbers, id)
3430 + this.Core.AddSymbol(new ServiceControlSymbol(sourceLineNumbers, id)
3431 {
3432 Name = name,
3433 InstallRemove = installRemove,
@@ -3715,7 +3715,7 @@ namespace WixToolset.Core
3715
3716 if (!this.Core.EncounteredError)
3717 {
3718 - this.Core.AddTuple(new ServiceInstallTuple(sourceLineNumbers, id)
3718 + this.Core.AddSymbol(new ServiceInstallSymbol(sourceLineNumbers, id)
3719 {
3720 Name = name,
3721 DisplayName = displayName,
@@ -3763,7 +3763,7 @@ namespace WixToolset.Core
3763 break;
3764 case "Id":
3765 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3766 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Directory, id);
3766 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Directory, id);
3767 break;
3768 case "Sequence":
3769 var sequenceValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -3819,7 +3819,7 @@ namespace WixToolset.Core
3819
3820 if (!this.Core.EncounteredError)
3821 {
3822 - this.Core.AddTuple(new CustomActionTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName))
3822 + this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName))
3823 {
3824 ExecutionType = executionType,
3825 SourceType = CustomActionSourceType.Directory,
@@ -3830,7 +3830,7 @@ namespace WixToolset.Core
3830
3831 foreach (var sequence in sequences)
3832 {
3833 - this.Core.ScheduleActionTuple(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, afterAction: "CostInitialize");
3833 + this.Core.ScheduleActionSymbol(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, afterAction: "CostInitialize");
3834 }
3835 }
3836 }
@@ -3946,7 +3946,7 @@ namespace WixToolset.Core
3946 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction));
3947 }
3948
3949 - this.Core.AddTuple(new CustomActionTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName))
3949 + this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName))
3950 {
3951 ExecutionType = executionType,
3952 SourceType = CustomActionSourceType.Property,
@@ -3957,7 +3957,7 @@ namespace WixToolset.Core
3957
3958 foreach (var sequence in sequences)
3959 {
3960 - this.Core.ScheduleActionTuple(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, beforeAction, afterAction);
3960 + this.Core.ScheduleActionSymbol(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, beforeAction, afterAction);
3961 }
3962 }
3963 }
@@ -4001,7 +4001,7 @@ namespace WixToolset.Core
4001
4002 if (!this.Core.EncounteredError)
4003 {
4004 - this.Core.AddTuple(new FileSFPCatalogTuple(sourceLineNumbers)
4004 + this.Core.AddSymbol(new FileSFPCatalogSymbol(sourceLineNumbers)
4005 {
4006 FileRef = id,
4007 SFPCatalogRef = parentSFPCatalog
@@ -4094,7 +4094,7 @@ namespace WixToolset.Core
4094
4095 if (!this.Core.EncounteredError)
4096 {
4097 - this.Core.AddTuple(new SFPCatalogTuple(sourceLineNumbers)
4097 + this.Core.AddSymbol(new SFPCatalogSymbol(sourceLineNumbers)
4098 {
4099 SFPCatalog = name,
4100 Catalog = sourceFile,
@@ -4170,7 +4170,7 @@ namespace WixToolset.Core
4170 break;
4171 case "Icon":
4172 icon = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
4173 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Icon, icon);
4173 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Icon, icon);
4174 break;
4175 case "IconIndex":
4176 iconIndex = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int16.MinValue + 1, Int16.MaxValue);
@@ -4368,7 +4368,7 @@ namespace WixToolset.Core
4368 target = String.Format(CultureInfo.InvariantCulture, "[#{0}]", defaultTarget);
4369 }
4370
4371 - this.Core.AddTuple(new ShortcutTuple(sourceLineNumbers, id)
4371 + this.Core.AddSymbol(new ShortcutSymbol(sourceLineNumbers, id)
4372 {
4373 DirectoryRef = directory,
4374 Name = name,
@@ -4445,7 +4445,7 @@ namespace WixToolset.Core
4445
4446 if (!this.Core.EncounteredError)
4447 {
4448 - this.Core.AddTuple(new MsiShortcutPropertyTuple(sourceLineNumbers, id)
4448 + this.Core.AddSymbol(new MsiShortcutPropertySymbol(sourceLineNumbers, id)
4449 {
4450 ShortcutRef = shortcutId,
4451 PropertyKey = key,
@@ -4642,7 +4642,7 @@ namespace WixToolset.Core
4642
4643 if (!this.Core.EncounteredError)
4644 {
4645 - var tuple = this.Core.AddTuple(new TypeLibTuple(sourceLineNumbers)
4645 + var symbol = this.Core.AddSymbol(new TypeLibSymbol(sourceLineNumbers)
4646 {
4647 LibId = id,
4648 Language = language,
@@ -4654,12 +4654,12 @@ namespace WixToolset.Core
4654
4655 if (CompilerConstants.IntegerNotSet != majorVersion || CompilerConstants.IntegerNotSet != minorVersion)
4656 {
4657 - tuple.Version = (CompilerConstants.IntegerNotSet != majorVersion ? majorVersion * 256 : 0) + (CompilerConstants.IntegerNotSet != minorVersion ? minorVersion : 0);
4657 + symbol.Version = (CompilerConstants.IntegerNotSet != majorVersion ? majorVersion * 256 : 0) + (CompilerConstants.IntegerNotSet != minorVersion ? minorVersion : 0);
4658 }
4659
4660 if (CompilerConstants.IntegerNotSet != cost)
4661 {
4662 - tuple.Cost = cost;
4662 + symbol.Cost = cost;
4663 }
4664 }
4665 }
@@ -4855,7 +4855,7 @@ namespace WixToolset.Core
4855
4856 if (!this.Core.EncounteredError)
4857 {
4858 - this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers)
4858 + this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers)
4859 {
4860 UpgradeCode = upgradeId,
4861 VersionMin = minimum,
@@ -4875,7 +4875,7 @@ namespace WixToolset.Core
4875 // if at least one row in Upgrade table lacks the OnlyDetect attribute.
4876 if (!onlyDetect)
4877 {
4878 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixAction, "InstallExecuteSequence", "RemoveExistingProducts");
4878 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixAction, "InstallExecuteSequence", "RemoveExistingProducts");
4879 }
4880 }
4881 }
@@ -4923,7 +4923,7 @@ namespace WixToolset.Core
4923 break;
4924 case "TargetFile":
4925 targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4926 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, targetFile);
4926 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, targetFile);
4927 break;
4928 case "TargetProperty":
4929 targetProperty = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -4980,7 +4980,7 @@ namespace WixToolset.Core
4980
4981 if (!this.Core.EncounteredError)
4982 {
4983 - var tuple = this.Core.AddTuple(new VerbTuple(sourceLineNumbers)
4983 + var symbol = this.Core.AddSymbol(new VerbSymbol(sourceLineNumbers)
4984 {
4985 ExtensionRef = extension,
4986 Verb = id,
@@ -4990,7 +4990,7 @@ namespace WixToolset.Core
4990
4991 if (CompilerConstants.IntegerNotSet != sequence)
4992 {
4993 - tuple.Sequence = sequence;
4993 + symbol.Sequence = sequence;
4994 }
4995 }
4996 }
@@ -5086,7 +5086,7 @@ namespace WixToolset.Core
5086
5087 if (!this.Core.EncounteredError)
5088 {
5089 - this.Core.AddTuple(new WixVariableTuple(sourceLineNumbers, id)
5089 + this.Core.AddSymbol(new WixVariableSymbol(sourceLineNumbers, id)
5090 {
5091 Value = value,
5092 Overridable = overridable
src/WixToolset.Core/Compiler_Bundle.cs
+71 -71
@@ -11,7 +11,7 @@ namespace WixToolset.Core
11 using System.Xml.Linq;
12 using WixToolset.Data;
13 using WixToolset.Data.Burn;
14 - using WixToolset.Data.Tuples;
14 + using WixToolset.Data.Symbols;
15 using WixToolset.Extensibility;
16
17 /// <summary>
@@ -85,7 +85,7 @@ namespace WixToolset.Core
85
86 if (!this.Core.EncounteredError)
87 {
88 - this.Core.AddTuple(new WixApprovedExeForElevationTuple(sourceLineNumbers, id)
88 + this.Core.AddSymbol(new WixApprovedExeForElevationSymbol(sourceLineNumbers, id)
89 {
90 Key = key,
91 ValueName = valueName,
@@ -287,7 +287,7 @@ namespace WixToolset.Core
287 this.ParseBundleExtensionElement(child);
288 break;
289 case "BundleExtensionRef":
290 - this.ParseSimpleRefElement(child, TupleDefinitions.WixBundleExtension);
290 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleExtension);
291 break;
292 case "OptionalUpdateRegistration":
293 this.ParseOptionalUpdateRegistrationElement(child, manufacturer, parentName, name);
@@ -308,7 +308,7 @@ namespace WixToolset.Core
308 this.ParseContainerElement(child);
309 break;
310 case "ContainerRef":
311 - this.ParseSimpleRefElement(child, TupleDefinitions.WixBundleContainer);
311 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleContainer);
312 break;
313 case "Log":
314 if (logSeen)
@@ -332,7 +332,7 @@ namespace WixToolset.Core
332 this.ParseSetVariableElement(child);
333 break;
334 case "SetVariableRef":
335 - this.ParseSimpleRefElement(child, TupleDefinitions.WixSetVariable);
335 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixSetVariable);
336 break;
337 case "Update":
338 this.ParseUpdateElement(child);
@@ -361,7 +361,7 @@ namespace WixToolset.Core
361
362 if (!this.Core.EncounteredError)
363 {
364 - var tuple = this.Core.AddTuple(new WixBundleTuple(sourceLineNumbers)
364 + var symbol = this.Core.AddSymbol(new WixBundleSymbol(sourceLineNumbers)
365 {
366 UpgradeCode = upgradeCode,
367 Version = version,
@@ -385,46 +385,46 @@ namespace WixToolset.Core
385 if (!String.IsNullOrEmpty(logVariablePrefixAndExtension))
386 {
387 var split = logVariablePrefixAndExtension.Split(':');
388 - tuple.LogPathVariable = split[0];
389 - tuple.LogPrefix = split[1];
390 - tuple.LogExtension = split[2];
388 + symbol.LogPathVariable = split[0];
389 + symbol.LogPrefix = split[1];
390 + symbol.LogExtension = split[2];
391 }
392
393 if (null != upgradeCode)
394 {
395 - this.Core.AddTuple(new WixRelatedBundleTuple(sourceLineNumbers)
395 + this.Core.AddSymbol(new WixRelatedBundleSymbol(sourceLineNumbers)
396 {
397 BundleId = upgradeCode,
398 Action = RelatedBundleActionType.Upgrade,
399 });
400 }
401
402 - this.Core.AddTuple(new WixBundleContainerTuple(sourceLineNumbers, Compiler.BurnDefaultAttachedContainerId)
402 + this.Core.AddSymbol(new WixBundleContainerSymbol(sourceLineNumbers, Compiler.BurnDefaultAttachedContainerId)
403 {
404 Name = "bundle-attached.cab",
405 Type = ContainerType.Attached,
406 });
407
408 // Ensure that the bundle stores the well-known persisted values.
409 - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_NAME))
409 + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_NAME))
410 {
411 Hidden = false,
412 Persisted = true,
413 });
414
415 - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE))
415 + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE))
416 {
417 Hidden = false,
418 Persisted = true,
419 });
420
421 - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE_FOLDER))
421 + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE_FOLDER))
422 {
423 Hidden = false,
424 Persisted = true,
425 });
426
427 - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_LAST_USED_SOURCE))
427 + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_LAST_USED_SOURCE))
428 {
429 Hidden = false,
430 Persisted = true,
@@ -529,7 +529,7 @@ namespace WixToolset.Core
529 {
530 this.CreatePayloadRow(sourceLineNumbers, id, Path.GetFileName(sourceFile), sourceFile, null, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId, ComplexReferenceChildType.Unknown, null, YesNoDefaultType.Yes, YesNoType.Yes, null, null, null);
531
532 - this.Core.AddTuple(new WixBundleCatalogTuple(sourceLineNumbers, id)
532 + this.Core.AddSymbol(new WixBundleCatalogSymbol(sourceLineNumbers, id)
533 {
534 PayloadRef = id.Id,
535 });
@@ -631,7 +631,7 @@ namespace WixToolset.Core
631
632 if (!this.Core.EncounteredError)
633 {
634 - this.Core.AddTuple(new WixBundleContainerTuple(sourceLineNumbers, id)
634 + this.Core.AddSymbol(new WixBundleContainerSymbol(sourceLineNumbers, id)
635 {
636 Name = name,
637 Type = type,
@@ -694,7 +694,7 @@ namespace WixToolset.Core
694 // Add the application as an attached container and if an Id was provided add that too.
695 if (!this.Core.EncounteredError)
696 {
697 - this.Core.AddTuple(new WixBundleContainerTuple(sourceLineNumbers, Compiler.BurnUXContainerId)
697 + this.Core.AddSymbol(new WixBundleContainerSymbol(sourceLineNumbers, Compiler.BurnUXContainerId)
698 {
699 Name = "bundle-ux.cab",
700 Type = ContainerType.Attached
@@ -702,7 +702,7 @@ namespace WixToolset.Core
702
703 if (null != id)
704 {
705 - this.Core.AddTuple(new WixBootstrapperApplicationTuple(sourceLineNumbers, id));
705 + this.Core.AddSymbol(new WixBootstrapperApplicationSymbol(sourceLineNumbers, id));
706 }
707 }
708 }
@@ -770,7 +770,7 @@ namespace WixToolset.Core
770 }
771 else
772 {
773 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBootstrapperApplication, id);
773 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBootstrapperApplication, id);
774 }
775 }
776
@@ -786,7 +786,7 @@ namespace WixToolset.Core
786 string customDataId = null;
787 WixBundleCustomDataType? customDataType = null;
788 string extensionId = null;
789 - var attributeDefinitions = new List<WixBundleCustomDataAttributeTuple>();
789 + var attributeDefinitions = new List<WixBundleCustomDataAttributeSymbol>();
790 var foundAttributeDefinitions = false;
791
792 foreach (var attrib in node.Attributes())
@@ -816,7 +816,7 @@ namespace WixToolset.Core
816 break;
817 case "ExtensionId":
818 extensionId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
819 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundleExtension, extensionId);
819 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundleExtension, extensionId);
820 break;
821 default:
822 this.Core.UnexpectedAttribute(node, attrib);
@@ -890,9 +890,9 @@ namespace WixToolset.Core
890 {
891 if (!this.Core.EncounteredError)
892 {
893 - var attributeNames = String.Join(new string(WixBundleCustomDataTuple.AttributeNamesSeparator, 1), attributeDefinitions.Select(c => c.Name));
893 + var attributeNames = String.Join(new string(WixBundleCustomDataSymbol.AttributeNamesSeparator, 1), attributeDefinitions.Select(c => c.Name));
894
895 - this.Core.AddTuple(new WixBundleCustomDataTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, customDataId))
895 + this.Core.AddSymbol(new WixBundleCustomDataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, customDataId))
896 {
897 AttributeNames = attributeNames,
898 Type = customDataType.Value,
@@ -975,7 +975,7 @@ namespace WixToolset.Core
975 /// <param name="node">Element to parse.</param>
976 /// <param name="sourceLineNumbers">Element's SourceLineNumbers.</param>
977 /// <param name="customDataId">BundleCustomData Id.</param>
978 - private WixBundleCustomDataAttributeTuple ParseBundleAttributeDefinitionElement(XElement node, SourceLineNumber sourceLineNumbers, string customDataId)
978 + private WixBundleCustomDataAttributeSymbol ParseBundleAttributeDefinitionElement(XElement node, SourceLineNumber sourceLineNumbers, string customDataId)
979 {
980 string attributeName = null;
981
@@ -1004,7 +1004,7 @@ namespace WixToolset.Core
1004 return null;
1005 }
1006
1007 - var customDataAttribute = this.Core.AddTuple(new WixBundleCustomDataAttributeTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, attributeName))
1007 + var customDataAttribute = this.Core.AddSymbol(new WixBundleCustomDataAttributeSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, attributeName))
1008 {
1009 CustomDataRef = customDataId,
1010 Name = attributeName,
@@ -1058,7 +1058,7 @@ namespace WixToolset.Core
1058
1059 if (!this.Core.EncounteredError)
1060 {
1061 - this.Core.AddTuple(new WixBundleCustomDataCellTuple(childSourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, elementId, attributeName))
1061 + this.Core.AddSymbol(new WixBundleCustomDataCellSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, elementId, attributeName))
1062 {
1063 ElementId = elementId,
1064 AttributeRef = attributeName,
@@ -1075,7 +1075,7 @@ namespace WixToolset.Core
1075
1076 if (!this.Core.EncounteredError)
1077 {
1078 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundleCustomData, customDataId);
1078 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundleCustomData, customDataId);
1079 }
1080 }
1081
@@ -1138,7 +1138,7 @@ namespace WixToolset.Core
1138 // Add the BundleExtension.
1139 if (!this.Core.EncounteredError)
1140 {
1141 - this.Core.AddTuple(new WixBundleExtensionTuple(sourceLineNumbers, id)
1141 + this.Core.AddSymbol(new WixBundleExtensionSymbol(sourceLineNumbers, id)
1142 {
1143 PayloadRef = id.Id,
1144 });
@@ -1236,7 +1236,7 @@ namespace WixToolset.Core
1236
1237 if (!this.Core.EncounteredError)
1238 {
1239 - this.Core.AddTuple(new WixUpdateRegistrationTuple(sourceLineNumbers)
1239 + this.Core.AddSymbol(new WixUpdateRegistrationSymbol(sourceLineNumbers)
1240 {
1241 Manufacturer = manufacturer,
1242 Department = department,
@@ -1493,15 +1493,15 @@ namespace WixToolset.Core
1493 /// <param name="node">Element to parse</param>
1494 /// <param name="parentType">ComplexReferenceParentType of parent element</param>
1495 /// <param name="parentId">Identifier of parent element.</param>
1496 - private WixBundlePayloadTuple CreatePayloadRow(SourceLineNumber sourceLineNumbers, Identifier id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType,
1496 + private WixBundlePayloadSymbol CreatePayloadRow(SourceLineNumber sourceLineNumbers, Identifier id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType,
1497 Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, YesNoDefaultType compressed, YesNoType enableSignatureVerification, string displayName, string description,
1498 RemotePayload remotePayload)
1499 {
1500 - WixBundlePayloadTuple tuple = null;
1500 + WixBundlePayloadSymbol symbol = null;
1501
1502 if (!this.Core.EncounteredError)
1503 {
1504 - tuple = this.Core.AddTuple(new WixBundlePayloadTuple(sourceLineNumbers, id)
1504 + symbol = this.Core.AddSymbol(new WixBundlePayloadSymbol(sourceLineNumbers, id)
1505 {
1506 Name = String.IsNullOrEmpty(name) ? Path.GetFileName(sourceFile) : name,
1507 SourceFile = new IntermediateFieldPathValue { Path = sourceFile },
@@ -1515,19 +1515,19 @@ namespace WixToolset.Core
1515
1516 if (null != remotePayload)
1517 {
1518 - tuple.Description = remotePayload.Description;
1519 - tuple.DisplayName = remotePayload.ProductName;
1520 - tuple.Hash = remotePayload.Hash;
1521 - tuple.PublicKey = remotePayload.CertificatePublicKey;
1522 - tuple.Thumbprint = remotePayload.CertificateThumbprint;
1523 - tuple.FileSize = remotePayload.Size;
1524 - tuple.Version = remotePayload.Version;
1518 + symbol.Description = remotePayload.Description;
1519 + symbol.DisplayName = remotePayload.ProductName;
1520 + symbol.Hash = remotePayload.Hash;
1521 + symbol.PublicKey = remotePayload.CertificatePublicKey;
1522 + symbol.Thumbprint = remotePayload.CertificateThumbprint;
1523 + symbol.FileSize = remotePayload.Size;
1524 + symbol.Version = remotePayload.Version;
1525 }
1526
1527 this.CreateGroupAndOrderingRows(sourceLineNumbers, parentType, parentId.Id, ComplexReferenceChildType.Payload, id.Id, previousType, previousId?.Id);
1528 }
1529
1530 - return tuple;
1530 + return symbol;
1531 }
1532
1533 /// <summary>
@@ -1599,7 +1599,7 @@ namespace WixToolset.Core
1599
1600 if (!this.Core.EncounteredError)
1601 {
1602 - this.Core.AddTuple(new WixBundlePayloadGroupTuple(sourceLineNumbers, id));
1602 + this.Core.AddSymbol(new WixBundlePayloadGroupSymbol(sourceLineNumbers, id));
1603
1604 this.CreateGroupAndOrderingRows(sourceLineNumbers, parentType, parentId?.Id, ComplexReferenceChildType.PayloadGroup, id.Id, ComplexReferenceChildType.Unknown, null);
1605 }
@@ -1627,7 +1627,7 @@ namespace WixToolset.Core
1627 {
1628 case "Id":
1629 id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
1630 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundlePayloadGroup, id.Id);
1630 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, id.Id);
1631 break;
1632 default:
1633 this.Core.UnexpectedAttribute(node, attrib);
@@ -1682,7 +1682,7 @@ namespace WixToolset.Core
1682 // TODO: Should we define our own enum for this, just to ensure there's no "cross-contamination"?
1683 // TODO: Also, we could potentially include an 'Attributes' field to track things like
1684 // 'before' vs. 'after', and explicit vs. inferred dependencies.
1685 - this.Core.AddTuple(new WixOrderingTuple(sourceLineNumbers)
1685 + this.Core.AddSymbol(new WixOrderingSymbol(sourceLineNumbers)
1686 {
1687 ItemType = type,
1688 ItemIdRef = id,
@@ -1739,7 +1739,7 @@ namespace WixToolset.Core
1739
1740 if (!this.Core.EncounteredError)
1741 {
1742 - this.Core.AddTuple(new WixBundlePackageExitCodeTuple(sourceLineNumbers)
1742 + this.Core.AddSymbol(new WixBundlePackageExitCodeSymbol(sourceLineNumbers)
1743 {
1744 ChainPackageId = packageId,
1745 Code = value,
@@ -1847,7 +1847,7 @@ namespace WixToolset.Core
1847
1848 if (!this.Core.EncounteredError)
1849 {
1850 - this.Core.AddTuple(new WixChainTuple(sourceLineNumbers)
1850 + this.Core.AddSymbol(new WixChainSymbol(sourceLineNumbers)
1851 {
1852 Attributes = attributes
1853 });
@@ -2393,13 +2393,13 @@ namespace WixToolset.Core
2393 this.CreatePayloadRow(sourceLineNumbers, id, name, sourceFile, downloadUrl, ComplexReferenceParentType.Package, id,
2394 ComplexReferenceChildType.Unknown, null, compressed, enableSignatureVerification, displayName, description, remotePayload);
2395
2396 - this.Core.AddTuple(new WixChainItemTuple(sourceLineNumbers, id));
2396 + this.Core.AddSymbol(new WixChainItemSymbol(sourceLineNumbers, id));
2397
2398 WixBundlePackageAttributes attributes = 0;
2399 attributes |= (YesNoType.Yes == permanent) ? WixBundlePackageAttributes.Permanent : 0;
2400 attributes |= (YesNoType.Yes == visible) ? WixBundlePackageAttributes.Visible : 0;
2401
2402 - var chainPackageTuple = this.Core.AddTuple(new WixBundlePackageTuple(sourceLineNumbers, id)
2402 + var chainPackageSymbol = this.Core.AddSymbol(new WixBundlePackageSymbol(sourceLineNumbers, id)
2403 {
2404 Type = packageType,
2405 PayloadRef = id.Id,
@@ -2412,28 +2412,28 @@ namespace WixToolset.Core
2412
2413 if (YesNoAlwaysType.NotSet != cache)
2414 {
2415 - chainPackageTuple.Cache = cache;
2415 + chainPackageSymbol.Cache = cache;
2416 }
2417
2418 if (YesNoType.NotSet != vital)
2419 {
2420 - chainPackageTuple.Vital = (vital == YesNoType.Yes);
2420 + chainPackageSymbol.Vital = (vital == YesNoType.Yes);
2421 }
2422
2423 if (YesNoDefaultType.NotSet != perMachine)
2424 {
2425 - chainPackageTuple.PerMachine = perMachine;
2425 + chainPackageSymbol.PerMachine = perMachine;
2426 }
2427
2428 if (CompilerConstants.IntegerNotSet != installSize)
2429 {
2430 - chainPackageTuple.InstallSize = installSize;
2430 + chainPackageSymbol.InstallSize = installSize;
2431 }
2432
2433 switch (packageType)
2434 {
2435 case WixBundlePackageType.Exe:
2436 - this.Core.AddTuple(new WixBundleExePackageTuple(sourceLineNumbers, id)
2436 + this.Core.AddSymbol(new WixBundleExePackageSymbol(sourceLineNumbers, id)
2437 {
2438 Attributes = WixBundleExePackageAttributes.None,
2439 DetectCondition = detectCondition,
@@ -2449,7 +2449,7 @@ namespace WixToolset.Core
2449 msiAttributes |= (YesNoType.Yes == enableFeatureSelection) ? WixBundleMsiPackageAttributes.EnableFeatureSelection : 0;
2450 msiAttributes |= (YesNoType.Yes == forcePerMachine) ? WixBundleMsiPackageAttributes.ForcePerMachine : 0;
2451
2452 - this.Core.AddTuple(new WixBundleMsiPackageTuple(sourceLineNumbers, id)
2452 + this.Core.AddSymbol(new WixBundleMsiPackageSymbol(sourceLineNumbers, id)
2453 {
2454 Attributes = msiAttributes
2455 });
@@ -2459,14 +2459,14 @@ namespace WixToolset.Core
2459 WixBundleMspPackageAttributes mspAttributes = 0;
2460 mspAttributes |= (YesNoType.Yes == slipstream) ? WixBundleMspPackageAttributes.Slipstream : 0;
2461
2462 - this.Core.AddTuple(new WixBundleMspPackageTuple(sourceLineNumbers, id)
2462 + this.Core.AddSymbol(new WixBundleMspPackageSymbol(sourceLineNumbers, id)
2463 {
2464 Attributes = mspAttributes
2465 });
2466 break;
2467
2468 case WixBundlePackageType.Msu:
2469 - this.Core.AddTuple(new WixBundleMsuPackageTuple(sourceLineNumbers, id)
2469 + this.Core.AddSymbol(new WixBundleMsuPackageSymbol(sourceLineNumbers, id)
2470 {
2471 DetectCondition = detectCondition,
2472 MsuKB = msuKB
@@ -2530,7 +2530,7 @@ namespace WixToolset.Core
2530
2531 if (!this.Core.EncounteredError)
2532 {
2533 - this.Core.AddTuple(new WixBundlePackageCommandLineTuple(sourceLineNumbers)
2533 + this.Core.AddSymbol(new WixBundlePackageCommandLineSymbol(sourceLineNumbers)
2534 {
2535 WixBundlePackageRef = packageId,
2536 InstallArgument = installArgument,
@@ -2622,7 +2622,7 @@ namespace WixToolset.Core
2622
2623 if (!this.Core.EncounteredError)
2624 {
2625 - this.Core.AddTuple(new WixBundlePackageGroupTuple(sourceLineNumbers, id));
2625 + this.Core.AddSymbol(new WixBundlePackageGroupSymbol(sourceLineNumbers, id));
2626 }
2627 }
2628
@@ -2664,7 +2664,7 @@ namespace WixToolset.Core
2664 {
2665 case "Id":
2666 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2667 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundlePackageGroup, id);
2667 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundlePackageGroup, id);
2668 break;
2669 case "After":
2670 after = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
@@ -2717,9 +2717,9 @@ namespace WixToolset.Core
2717 /// <param name="previousId">Identifier of previous item, if any.</param>
2718 private void CreateRollbackBoundary(SourceLineNumber sourceLineNumbers, Identifier id, YesNoType vital, YesNoType transaction, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId)
2719 {
2720 - this.Core.AddTuple(new WixChainItemTuple(sourceLineNumbers, id));
2720 + this.Core.AddSymbol(new WixChainItemSymbol(sourceLineNumbers, id));
2721
2722 - var rollbackBoundary = this.Core.AddTuple(new WixBundleRollbackBoundaryTuple(sourceLineNumbers, id));
2722 + var rollbackBoundary = this.Core.AddSymbol(new WixBundleRollbackBoundarySymbol(sourceLineNumbers, id));
2723
2724 if (YesNoType.NotSet != vital)
2725 {
@@ -2812,7 +2812,7 @@ namespace WixToolset.Core
2812
2813 if (!this.Core.EncounteredError)
2814 {
2815 - var tuple = this.Core.AddTuple(new WixBundleMsiPropertyTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, name))
2815 + var symbol = this.Core.AddSymbol(new WixBundleMsiPropertySymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, name))
2816 {
2817 PackageRef = packageId,
2818 Name = name,
@@ -2821,7 +2821,7 @@ namespace WixToolset.Core
2821
2822 if (!String.IsNullOrEmpty(condition))
2823 {
2824 - tuple.Condition = condition;
2824 + symbol.Condition = condition;
2825 }
2826 }
2827 }
@@ -2844,7 +2844,7 @@ namespace WixToolset.Core
2844 {
2845 case "Id":
2846 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2847 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundlePackage, id);
2847 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundlePackage, id);
2848 break;
2849 default:
2850 this.Core.UnexpectedAttribute(node, attrib);
@@ -2866,7 +2866,7 @@ namespace WixToolset.Core
2866
2867 if (!this.Core.EncounteredError)
2868 {
2869 - this.Core.AddTuple(new WixBundleSlipstreamMspTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, id))
2869 + this.Core.AddSymbol(new WixBundleSlipstreamMspSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, id))
2870 {
2871 TargetPackageRef = packageId,
2872 MspPackageRef = id
@@ -2940,7 +2940,7 @@ namespace WixToolset.Core
2940
2941 if (!this.Core.EncounteredError)
2942 {
2943 - this.Core.AddTuple(new WixRelatedBundleTuple(sourceLineNumbers)
2943 + this.Core.AddSymbol(new WixRelatedBundleSymbol(sourceLineNumbers)
2944 {
2945 BundleId = id,
2946 Action = actionType,
@@ -2986,7 +2986,7 @@ namespace WixToolset.Core
2986
2987 if (!this.Core.EncounteredError)
2988 {
2989 - this.Core.AddTuple(new WixBundleUpdateTuple(sourceLineNumbers)
2989 + this.Core.AddSymbol(new WixBundleUpdateSymbol(sourceLineNumbers)
2990 {
2991 Location = location
2992 });
@@ -3052,11 +3052,11 @@ namespace WixToolset.Core
3052 id = this.Core.CreateIdentifier("sbv", variable, condition, after, value, type);
3053 }
3054
3055 - this.Core.CreateWixSearchTuple(sourceLineNumbers, node.Name.LocalName, id, variable, condition, after);
3055 + this.Core.CreateWixSearchSymbol(sourceLineNumbers, node.Name.LocalName, id, variable, condition, after);
3056
3057 if (!this.Messaging.EncounteredError)
3058 {
3059 - this.Core.AddTuple(new WixSetVariableTuple(sourceLineNumbers, id)
3059 + this.Core.AddSymbol(new WixSetVariableSymbol(sourceLineNumbers, id)
3060 {
3061 Value = value,
3062 Type = type,
@@ -3130,7 +3130,7 @@ namespace WixToolset.Core
3130
3131 if (!this.Core.EncounteredError)
3132 {
3133 - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, name))
3133 + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, name))
3134 {
3135 Value = value,
3136 Type = type,
@@ -3145,7 +3145,7 @@ namespace WixToolset.Core
3145 var newType = type;
3146 if (newType == null && value != null)
3147 {
3148 - // Infer the type from the current value...
3148 + // Infer the type from the current value...
3149 if (value.StartsWith("v", StringComparison.OrdinalIgnoreCase))
3150 {
3151 // Version constructor does not support simple "v#" syntax so check to see if the value is
src/WixToolset.Core/Compiler_EmbeddedUI.cs
+6 -6
@@ -6,7 +6,7 @@ namespace WixToolset.Core
6 using System.IO;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10 using WixToolset.Data.WindowsInstaller;
11
12 /// <summary>
@@ -43,7 +43,7 @@ namespace WixToolset.Core
43 }
44 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
45 type = 0x2;
46 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, source); // add a reference to the appropriate Binary
46 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, source); // add a reference to the appropriate Binary
47 break;
48 case "CommandLine":
49 commandLine = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -58,7 +58,7 @@ namespace WixToolset.Core
58 }
59 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
60 type = 0x12;
61 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, source); // add a reference to the appropriate File
61 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, source); // add a reference to the appropriate File
62 break;
63 case "PropertySource":
64 if (null != source)
@@ -92,7 +92,7 @@ namespace WixToolset.Core
92
93 if (!this.Core.EncounteredError)
94 {
95 - this.Core.AddTuple(new MsiEmbeddedChainerTuple(sourceLineNumbers, id)
95 + this.Core.AddSymbol(new MsiEmbeddedChainerSymbol(sourceLineNumbers, id)
96 {
97 Condition = condition,
98 CommandLine = commandLine,
@@ -318,7 +318,7 @@ namespace WixToolset.Core
318
319 if (!this.Core.EncounteredError)
320 {
321 - this.Core.AddTuple(new MsiEmbeddedUITuple(sourceLineNumbers, id)
321 + this.Core.AddSymbol(new MsiEmbeddedUISymbol(sourceLineNumbers, id)
322 {
323 FileName = name,
324 EntryPoint = true,
@@ -405,7 +405,7 @@ namespace WixToolset.Core
405
406 if (!this.Core.EncounteredError)
407 {
408 - this.Core.AddTuple(new MsiEmbeddedUITuple(sourceLineNumbers, id)
408 + this.Core.AddSymbol(new MsiEmbeddedUISymbol(sourceLineNumbers, id)
409 {
410 FileName = name,
411 Source = sourceFile
src/WixToolset.Core/Compiler_Module.cs
+16 -16
@@ -6,7 +6,7 @@ namespace WixToolset.Core
6 using System.Globalization;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility;
11
12 /// <summary>
@@ -136,7 +136,7 @@ namespace WixToolset.Core
136 this.ParseCustomActionElement(child);
137 break;
138 case "CustomActionRef":
139 - this.ParseSimpleRefElement(child, TupleDefinitions.CustomAction);
139 + this.ParseSimpleRefElement(child, SymbolDefinitions.CustomAction);
140 break;
141 case "CustomTable":
142 this.ParseCustomTableElement(child);
@@ -154,7 +154,7 @@ namespace WixToolset.Core
154 this.ParseEmbeddedChainerElement(child);
155 break;
156 case "EmbeddedChainerRef":
157 - this.ParseSimpleRefElement(child, TupleDefinitions.MsiEmbeddedChainer);
157 + this.ParseSimpleRefElement(child, SymbolDefinitions.MsiEmbeddedChainer);
158 break;
159 case "EnsureTable":
160 this.ParseEnsureTableElement(child);
@@ -178,7 +178,7 @@ namespace WixToolset.Core
178 this.ParsePropertyElement(child);
179 break;
180 case "PropertyRef":
181 - this.ParseSimpleRefElement(child, TupleDefinitions.Property);
181 + this.ParseSimpleRefElement(child, SymbolDefinitions.Property);
182 break;
183 case "SetDirectory":
184 this.ParseSetDirectoryElement(child);
@@ -197,7 +197,7 @@ namespace WixToolset.Core
197 this.ParseUIElement(child);
198 break;
199 case "UIRef":
200 - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI);
200 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI);
201 break;
202 case "WixVariable":
203 this.ParseWixVariableElement(child);
@@ -216,13 +216,13 @@ namespace WixToolset.Core
216
217 if (!this.Core.EncounteredError)
218 {
219 - var tuple = this.Core.AddTuple(new ModuleSignatureTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, this.activeName, this.activeLanguage))
219 + var symbol = this.Core.AddSymbol(new ModuleSignatureSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, this.activeName, this.activeLanguage))
220 {
221 ModuleID = this.activeName,
222 Version = version
223 });
224
225 - tuple.Set((int)ModuleSignatureTupleFields.Language, this.activeLanguage);
225 + symbol.Set((int)ModuleSignatureSymbolFields.Language, this.activeLanguage);
226 }
227 }
228 finally
@@ -284,7 +284,7 @@ namespace WixToolset.Core
284
285 if (!this.Core.EncounteredError)
286 {
287 - var tuple = this.Core.AddTuple(new ModuleDependencyTuple(sourceLineNumbers)
287 + var symbol = this.Core.AddSymbol(new ModuleDependencySymbol(sourceLineNumbers)
288 {
289 ModuleID = this.activeName,
290 RequiredID = requiredId,
@@ -292,7 +292,7 @@ namespace WixToolset.Core
292 RequiredVersion = requiredVersion
293 });
294
295 - tuple.Set((int)ModuleDependencyTupleFields.ModuleLanguage, this.activeLanguage);
295 + symbol.Set((int)ModuleDependencySymbolFields.ModuleLanguage, this.activeLanguage);
296 }
297 }
298
@@ -365,7 +365,7 @@ namespace WixToolset.Core
365
366 if (!this.Core.EncounteredError)
367 {
368 - var tuple = this.Core.AddTuple(new ModuleExclusionTuple(sourceLineNumbers)
368 + var symbol = this.Core.AddSymbol(new ModuleExclusionSymbol(sourceLineNumbers)
369 {
370 ModuleID = this.activeName,
371 ExcludedID = excludedId,
@@ -373,8 +373,8 @@ namespace WixToolset.Core
373 ExcludedMaxVersion = excludedMaxVersion
374 });
375
376 - tuple.Set((int)ModuleExclusionTupleFields.ModuleLanguage, this.activeLanguage);
377 - tuple.Set((int)ModuleExclusionTupleFields.ExcludedLanguage, excludedLanguageField);
376 + symbol.Set((int)ModuleExclusionSymbolFields.ModuleLanguage, this.activeLanguage);
377 + symbol.Set((int)ModuleExclusionSymbolFields.ExcludedLanguage, excludedLanguageField);
378 }
379 }
380
@@ -485,7 +485,7 @@ namespace WixToolset.Core
485
486 if (!this.Core.EncounteredError)
487 {
488 - this.Core.AddTuple(new ModuleConfigurationTuple(sourceLineNumbers, name)
488 + this.Core.AddSymbol(new ModuleConfigurationSymbol(sourceLineNumbers, name)
489 {
490 Format = format,
491 Type = type,
@@ -563,7 +563,7 @@ namespace WixToolset.Core
563
564 if (!this.Core.EncounteredError)
565 {
566 - this.Core.AddTuple(new ModuleSubstitutionTuple(sourceLineNumbers)
566 + this.Core.AddSymbol(new ModuleSubstitutionSymbol(sourceLineNumbers)
567 {
568 Table = table,
569 Row = rowKeys,
@@ -616,7 +616,7 @@ namespace WixToolset.Core
616
617 if (!this.Core.EncounteredError)
618 {
619 - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, name)));
619 + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, name)));
620 }
621 }
622
@@ -658,7 +658,7 @@ namespace WixToolset.Core
658
659 if (!this.Core.EncounteredError)
660 {
661 - this.Core.AddTuple(new ModuleIgnoreTableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, id)));
661 + this.Core.AddSymbol(new ModuleIgnoreTableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, id)));
662 }
663 }
664 }
src/WixToolset.Core/Compiler_Patch.cs
+8 -8
@@ -8,7 +8,7 @@ namespace WixToolset.Core
8 using System.Globalization;
9 using System.Xml.Linq;
10 using WixToolset.Data;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12 using WixToolset.Extensibility;
13
14 /// <summary>
@@ -197,7 +197,7 @@ namespace WixToolset.Core
197
198 if (!this.Core.EncounteredError)
199 {
200 - this.Core.AddTuple(new WixPatchIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, patchId))
200 + this.Core.AddSymbol(new WixPatchIdSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, patchId))
201 {
202 ClientPatchId = clientPatchId,
203 OptimizePatchSizeForLargeFiles = optimizePatchSizeForLargeFiles,
@@ -425,7 +425,7 @@ namespace WixToolset.Core
425
426 if (!this.Core.EncounteredError)
427 {
428 - this.Core.AddTuple(new MsiPatchSequenceTuple(sourceLineNumbers)
428 + this.Core.AddSymbol(new MsiPatchSequenceSymbol(sourceLineNumbers)
429 {
430 PatchFamily = id.Id,
431 ProductCode = productCode,
@@ -504,7 +504,7 @@ namespace WixToolset.Core
504
505 if (!this.Core.EncounteredError)
506 {
507 - this.Core.AddTuple(new WixPatchFamilyGroupTuple(sourceLineNumbers, id));
507 + this.Core.AddSymbol(new WixPatchFamilyGroupSymbol(sourceLineNumbers, id));
508
509 //Add this PatchFamilyGroup and its parent in WixGroup.
510 this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.PatchFamilyGroup, id.Id);
@@ -532,7 +532,7 @@ namespace WixToolset.Core
532 {
533 case "Id":
534 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
535 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixPatchFamilyGroup, id);
535 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixPatchFamilyGroup, id);
536 break;
537 default:
538 this.Core.UnexpectedAttribute(node, attrib);
@@ -621,7 +621,7 @@ namespace WixToolset.Core
621 // By default, target ProductCodes should be added.
622 if (!replace)
623 {
624 - this.Core.AddTuple(new WixPatchTargetTuple(sourceLineNumbers)
624 + this.Core.AddSymbol(new WixPatchTargetSymbol(sourceLineNumbers)
625 {
626 ProductCode = "*"
627 });
@@ -629,7 +629,7 @@ namespace WixToolset.Core
629
630 foreach (var targetProductCode in targetProductCodes)
631 {
632 - this.Core.AddTuple(new WixPatchTargetTuple(sourceLineNumbers)
632 + this.Core.AddSymbol(new WixPatchTargetSymbol(sourceLineNumbers)
633 {
634 ProductCode = targetProductCode
635 });
@@ -639,7 +639,7 @@ namespace WixToolset.Core
639
640 private void AddMsiPatchMetadata(SourceLineNumber sourceLineNumbers, string company, string property, string value)
641 {
642 - this.Core.AddTuple(new MsiPatchMetadataTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property))
642 + this.Core.AddSymbol(new MsiPatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property))
643 {
644 Company = company,
645 Property = property,
src/WixToolset.Core/Compiler_PatchCreation.cs
+19 -19
@@ -7,7 +7,7 @@ namespace WixToolset.Core
7 using System.Globalization;
8 using System.Xml.Linq;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Extensibility;
12
13 /// <summary>
@@ -258,7 +258,7 @@ namespace WixToolset.Core
258
259 if (!this.Core.EncounteredError)
260 {
261 - var tuple = this.Core.AddTuple(new ImageFamiliesTuple(sourceLineNumbers)
261 + var symbol = this.Core.AddSymbol(new ImageFamiliesSymbol(sourceLineNumbers)
262 {
263 Family = name,
264 MediaSrcPropName = mediaSrcProp,
@@ -268,12 +268,12 @@ namespace WixToolset.Core
268
269 if (CompilerConstants.IntegerNotSet != diskId)
270 {
271 - tuple.MediaDiskId = diskId;
271 + symbol.MediaDiskId = diskId;
272 }
273
274 if (CompilerConstants.IntegerNotSet != sequenceStart)
275 {
276 - tuple.FileSequenceStart = sequenceStart;
276 + symbol.FileSequenceStart = sequenceStart;
277 }
278 }
279 }
@@ -379,7 +379,7 @@ namespace WixToolset.Core
379
380 if (!this.Core.EncounteredError)
381 {
382 - this.Core.AddTuple(new UpgradedImagesTuple(sourceLineNumbers)
382 + this.Core.AddSymbol(new UpgradedImagesSymbol(sourceLineNumbers)
383 {
384 Upgraded = upgrade,
385 MsiPath = sourceFile,
@@ -462,7 +462,7 @@ namespace WixToolset.Core
462 {
463 if (ignore)
464 {
465 - this.Core.AddTuple(new UpgradedFilesToIgnoreTuple(sourceLineNumbers)
465 + this.Core.AddSymbol(new UpgradedFilesToIgnoreSymbol(sourceLineNumbers)
466 {
467 Upgraded = upgrade,
468 FTK = file
@@ -470,7 +470,7 @@ namespace WixToolset.Core
470 }
471 else
472 {
473 - this.Core.AddTuple(new UpgradedFilesOptionalDataTuple(sourceLineNumbers)
473 + this.Core.AddSymbol(new UpgradedFilesOptionalDataSymbol(sourceLineNumbers)
474 {
475 Upgraded = upgrade,
476 FTK = file,
@@ -591,7 +591,7 @@ namespace WixToolset.Core
591
592 if (!this.Core.EncounteredError)
593 {
594 - this.Core.AddTuple(new TargetImagesTuple(sourceLineNumbers)
594 + this.Core.AddSymbol(new TargetImagesSymbol(sourceLineNumbers)
595 {
596 Target = target,
597 MsiPath = sourceFile,
@@ -673,7 +673,7 @@ namespace WixToolset.Core
673
674 if (!this.Core.EncounteredError)
675 {
676 - var tuple = this.Core.AddTuple(new TargetFilesOptionalDataTuple(sourceLineNumbers)
676 + var symbol = this.Core.AddSymbol(new TargetFilesOptionalDataSymbol(sourceLineNumbers)
677 {
678 Target = target,
679 FTK = file,
@@ -684,9 +684,9 @@ namespace WixToolset.Core
684
685 if (null != protectOffsets)
686 {
687 - tuple.RetainOffsets = protectOffsets;
687 + symbol.RetainOffsets = protectOffsets;
688
689 - this.Core.AddTuple(new FamilyFileRangesTuple(sourceLineNumbers)
689 + this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers)
690 {
691 Family = family,
692 FTK = file,
@@ -793,7 +793,7 @@ namespace WixToolset.Core
793
794 if (!this.Core.EncounteredError)
795 {
796 - var tuple = this.Core.AddTuple(new ExternalFilesTuple(sourceLineNumbers)
796 + var symbol = this.Core.AddSymbol(new ExternalFilesSymbol(sourceLineNumbers)
797 {
798 Family = family,
799 FTK = file,
@@ -805,17 +805,17 @@ namespace WixToolset.Core
805
806 if (null != protectOffsets)
807 {
808 - tuple.RetainOffsets = protectOffsets;
808 + symbol.RetainOffsets = protectOffsets;
809 }
810
811 if (CompilerConstants.IntegerNotSet != order)
812 {
813 - tuple.Order = order;
813 + symbol.Order = order;
814 }
815
816 if (null != protectOffsets)
817 {
818 - this.Core.AddTuple(new FamilyFileRangesTuple(sourceLineNumbers)
818 + this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers)
819 {
820 Family = family,
821 FTK = file,
@@ -890,7 +890,7 @@ namespace WixToolset.Core
890
891 if (!this.Core.EncounteredError)
892 {
893 - this.Core.AddTuple(new FamilyFileRangesTuple(sourceLineNumbers)
893 + this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers)
894 {
895 Family = family,
896 FTK = file,
@@ -1251,7 +1251,7 @@ namespace WixToolset.Core
1251 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "ProductCode"));
1252 }
1253 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1254 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.TargetImages, target);
1254 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.TargetImages, target);
1255 break;
1256 case "Sequence":
1257 sequence = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
@@ -1282,7 +1282,7 @@ namespace WixToolset.Core
1282
1283 if (!this.Core.EncounteredError)
1284 {
1285 - this.Core.AddTuple(new PatchSequenceTuple(sourceLineNumbers)
1285 + this.Core.AddSymbol(new PatchSequenceSymbol(sourceLineNumbers)
1286 {
1287 PatchFamily = family,
1288 Target = target,
@@ -1294,7 +1294,7 @@ namespace WixToolset.Core
1294
1295 private void AddPatchMetadata(SourceLineNumber sourceLineNumbers, string company, string property, string value)
1296 {
1297 - this.Core.AddTuple(new PatchMetadataTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property))
1297 + this.Core.AddSymbol(new PatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property))
1298 {
1299 Company = company,
1300 Property = property,
src/WixToolset.Core/Compiler_UI.cs
+85 -85
@@ -6,7 +6,7 @@ namespace WixToolset.Core
6 using System.Collections;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10 using WixToolset.Data.WindowsInstaller;
11 using WixToolset.Extensibility;
12
@@ -70,13 +70,13 @@ namespace WixToolset.Core
70 this.ParseBillboardActionElement(child);
71 break;
72 case "ComboBox":
73 - this.ParseControlGroupElement(child, TupleDefinitionType.ComboBox, "ListItem");
73 + this.ParseControlGroupElement(child, SymbolDefinitionType.ComboBox, "ListItem");
74 break;
75 case "Dialog":
76 this.ParseDialogElement(child);
77 break;
78 case "DialogRef":
79 - this.ParseSimpleRefElement(child, TupleDefinitions.Dialog);
79 + this.ParseSimpleRefElement(child, SymbolDefinitions.Dialog);
80 break;
81 case "EmbeddedUI":
82 if (0 < embeddedUICount) // there can be only one embedded UI
@@ -91,10 +91,10 @@ namespace WixToolset.Core
91 this.ParseErrorElement(child);
92 break;
93 case "ListBox":
94 - this.ParseControlGroupElement(child, TupleDefinitionType.ListBox, "ListItem");
94 + this.ParseControlGroupElement(child, SymbolDefinitionType.ListBox, "ListItem");
95 break;
96 case "ListView":
97 - this.ParseControlGroupElement(child, TupleDefinitionType.ListView, "ListItem");
97 + this.ParseControlGroupElement(child, SymbolDefinitionType.ListView, "ListItem");
98 break;
99 case "ProgressText":
100 this.ParseActionTextElement(child);
@@ -132,10 +132,10 @@ namespace WixToolset.Core
132 this.ParsePropertyElement(child);
133 break;
134 case "PropertyRef":
135 - this.ParseSimpleRefElement(child, TupleDefinitions.Property);
135 + this.ParseSimpleRefElement(child, SymbolDefinitions.Property);
136 break;
137 case "UIRef":
138 - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI);
138 + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI);
139 break;
140
141 default:
@@ -151,7 +151,7 @@ namespace WixToolset.Core
151
152 if (null != id && !this.Core.EncounteredError)
153 {
154 - this.Core.AddTuple(new WixUITuple(sourceLineNumbers, id));
154 + this.Core.AddSymbol(new WixUISymbol(sourceLineNumbers, id));
155 }
156 }
157
@@ -159,10 +159,10 @@ namespace WixToolset.Core
159 /// Parses a list item element.
160 /// </summary>
161 /// <param name="node">Element to parse.</param>
162 - /// <param name="tupleType">Type of tuple to create.</param>
162 + /// <param name="symbolType">Type of symbol to create.</param>
163 /// <param name="property">Identifier of property referred to by list item.</param>
164 /// <param name="order">Relative order of list items.</param>
165 - private void ParseListItemElement(XElement node, TupleDefinitionType tupleType, string property, ref int order)
165 + private void ParseListItemElement(XElement node, SymbolDefinitionType symbolType, string property, ref int order)
166 {
167 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
168 string icon = null;
@@ -176,10 +176,10 @@ namespace WixToolset.Core
176 switch (attrib.Name.LocalName)
177 {
178 case "Icon":
179 - if (TupleDefinitionType.ListView == tupleType)
179 + if (SymbolDefinitionType.ListView == symbolType)
180 {
181 icon = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
182 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, icon);
182 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, icon);
183 }
184 else
185 {
@@ -212,10 +212,10 @@ namespace WixToolset.Core
212
213 if (!this.Core.EncounteredError)
214 {
215 - switch (tupleType)
215 + switch (symbolType)
216 {
217 - case TupleDefinitionType.ComboBox:
218 - this.Core.AddTuple(new ComboBoxTuple(sourceLineNumbers)
217 + case SymbolDefinitionType.ComboBox:
218 + this.Core.AddSymbol(new ComboBoxSymbol(sourceLineNumbers)
219 {
220 Property = property,
221 Order = ++order,
@@ -223,8 +223,8 @@ namespace WixToolset.Core
223 Text = text,
224 });
225 break;
226 - case TupleDefinitionType.ListBox:
227 - this.Core.AddTuple(new ListBoxTuple(sourceLineNumbers)
226 + case SymbolDefinitionType.ListBox:
227 + this.Core.AddSymbol(new ListBoxSymbol(sourceLineNumbers)
228 {
229 Property = property,
230 Order = ++order,
@@ -232,8 +232,8 @@ namespace WixToolset.Core
232 Text = text,
233 });
234 break;
235 - case TupleDefinitionType.ListView:
236 - var tuple = this.Core.AddTuple(new ListViewTuple(sourceLineNumbers)
235 + case SymbolDefinitionType.ListView:
236 + var symbol = this.Core.AddSymbol(new ListViewSymbol(sourceLineNumbers)
237 {
238 Property = property,
239 Order = ++order,
@@ -243,11 +243,11 @@ namespace WixToolset.Core
243
244 if (null != icon)
245 {
246 - tuple.BinaryRef = icon;
246 + symbol.BinaryRef = icon;
247 }
248 break;
249 default:
250 - throw new ArgumentOutOfRangeException(nameof(tupleType));
250 + throw new ArgumentOutOfRangeException(nameof(symbolType));
251 }
252 }
253 }
@@ -284,7 +284,7 @@ namespace WixToolset.Core
284 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Icon", "Text"));
285 }
286 text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
287 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text);
287 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text);
288 type = RadioButtonType.Bitmap;
289 break;
290 case "Height":
@@ -299,7 +299,7 @@ namespace WixToolset.Core
299 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Text"));
300 }
301 text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
302 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text);
302 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text);
303 type = RadioButtonType.Icon;
304 break;
305 case "Text":
@@ -365,7 +365,7 @@ namespace WixToolset.Core
365
366 if (!this.Core.EncounteredError)
367 {
368 - var tuple = this.Core.AddTuple(new RadioButtonTuple(sourceLineNumbers)
368 + var symbol = this.Core.AddSymbol(new RadioButtonSymbol(sourceLineNumbers)
369 {
370 Property = property,
371 Order = ++order,
@@ -374,10 +374,10 @@ namespace WixToolset.Core
374 Help = (null != tooltip || null != help) ? String.Concat(tooltip, "|", help) : null
375 });
376
377 - tuple.Set((int)RadioButtonTupleFields.X, x);
378 - tuple.Set((int)RadioButtonTupleFields.Y, y);
379 - tuple.Set((int)RadioButtonTupleFields.Width, width);
380 - tuple.Set((int)RadioButtonTupleFields.Height, height);
377 + symbol.Set((int)RadioButtonSymbolFields.X, x);
378 + symbol.Set((int)RadioButtonSymbolFields.Y, y);
379 + symbol.Set((int)RadioButtonSymbolFields.Width, width);
380 + symbol.Set((int)RadioButtonSymbolFields.Height, height);
381 }
382
383 return type;
@@ -401,7 +401,7 @@ namespace WixToolset.Core
401 {
402 case "Id":
403 action = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
404 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixAction, "InstallExecuteSequence", action);
404 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixAction, "InstallExecuteSequence", action);
405 break;
406 default:
407 this.Core.UnexpectedAttribute(node, attrib);
@@ -464,7 +464,7 @@ namespace WixToolset.Core
464 break;
465 case "Feature":
466 feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
467 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Feature, feature);
467 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Feature, feature);
468 break;
469 default:
470 this.Core.UnexpectedAttribute(node, attrib);
@@ -490,12 +490,12 @@ namespace WixToolset.Core
490 {
491 case "Control":
492 // These are all thrown away.
493 - ControlTuple lastTabTuple = null;
493 + ControlSymbol lastTabSymbol = null;
494 string firstControl = null;
495 string defaultControl = null;
496 string cancelControl = null;
497
498 - this.ParseControlElement(child, id.Id, TupleDefinitionType.BBControl, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl);
498 + this.ParseControlElement(child, id.Id, SymbolDefinitionType.BBControl, ref lastTabSymbol, ref firstControl, ref defaultControl, ref cancelControl);
499 break;
500 default:
501 this.Core.UnexpectedElement(node, child);
@@ -511,7 +511,7 @@ namespace WixToolset.Core
511
512 if (!this.Core.EncounteredError)
513 {
514 - this.Core.AddTuple(new BillboardTuple(sourceLineNumbers, id)
514 + this.Core.AddSymbol(new BillboardSymbol(sourceLineNumbers, id)
515 {
516 FeatureRef = feature,
517 Action = action,
@@ -524,9 +524,9 @@ namespace WixToolset.Core
524 /// Parses a control group element.
525 /// </summary>
526 /// <param name="node">Element to parse.</param>
527 - /// <param name="tupleType">Tuple type referred to by control group.</param>
527 + /// <param name="symbolType">Symbol type referred to by control group.</param>
528 /// <param name="childTag">Expected child elements.</param>
529 - private void ParseControlGroupElement(XElement node, TupleDefinitionType tupleType, string childTag)
529 + private void ParseControlGroupElement(XElement node, SymbolDefinitionType symbolType, string childTag)
530 {
531 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
532 var order = 0;
@@ -569,7 +569,7 @@ namespace WixToolset.Core
569 switch (child.Name.LocalName)
570 {
571 case "ListItem":
572 - this.ParseListItemElement(child, tupleType, property, ref order);
572 + this.ParseListItemElement(child, symbolType, property, ref order);
573 break;
574 case "Property":
575 this.ParsePropertyElement(child);
@@ -607,7 +607,7 @@ namespace WixToolset.Core
607 {
608 case "Property":
609 property = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
610 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, property);
610 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, property);
611 break;
612 default:
613 this.Core.UnexpectedAttribute(node, attrib);
@@ -704,7 +704,7 @@ namespace WixToolset.Core
704
705 if (!this.Core.EncounteredError)
706 {
707 - this.Core.AddTuple(new ActionTextTuple(sourceLineNumbers)
707 + this.Core.AddSymbol(new ActionTextSymbol(sourceLineNumbers)
708 {
709 Action = action,
710 Description = message,
@@ -755,7 +755,7 @@ namespace WixToolset.Core
755
756 if (!this.Core.EncounteredError)
757 {
758 - this.Core.AddTuple(new UITextTuple(sourceLineNumbers, id)
758 + this.Core.AddSymbol(new UITextSymbol(sourceLineNumbers, id)
759 {
760 Text = text,
761 });
@@ -860,7 +860,7 @@ namespace WixToolset.Core
860
861 if (!this.Core.EncounteredError)
862 {
863 - var tuple = this.Core.AddTuple(new TextStyleTuple(sourceLineNumbers, id)
863 + var symbol = this.Core.AddSymbol(new TextStyleSymbol(sourceLineNumbers, id)
864 {
865 FaceName = faceName,
866 Red = red,
@@ -872,7 +872,7 @@ namespace WixToolset.Core
872 Underline = underline,
873 });
874
875 - tuple.Set((int)TextStyleTupleFields.Size, size);
875 + symbol.Set((int)TextStyleSymbolFields.Size, size);
876 }
877 }
878
@@ -976,7 +976,7 @@ namespace WixToolset.Core
976 id = Identifier.Invalid;
977 }
978
979 - ControlTuple lastTabTuple = null;
979 + ControlSymbol lastTabSymbol = null;
980 string cancelControl = null;
981 string defaultControl = null;
982 string firstControl = null;
@@ -988,7 +988,7 @@ namespace WixToolset.Core
988 switch (child.Name.LocalName)
989 {
990 case "Control":
991 - this.ParseControlElement(child, id.Id, TupleDefinitionType.Control, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl);
991 + this.ParseControlElement(child, id.Id, SymbolDefinitionType.Control, ref lastTabSymbol, ref firstControl, ref defaultControl, ref cancelControl);
992 break;
993 default:
994 this.Core.UnexpectedElement(node, child);
@@ -1001,11 +1001,11 @@ namespace WixToolset.Core
1001 }
1002 }
1003
1004 - if (null != lastTabTuple && null != lastTabTuple.Control)
1004 + if (null != lastTabSymbol && null != lastTabSymbol.Control)
1005 {
1006 - if (firstControl != lastTabTuple.Control)
1006 + if (firstControl != lastTabSymbol.Control)
1007 {
1008 - lastTabTuple.NextControlRef = firstControl;
1008 + lastTabSymbol.NextControlRef = firstControl;
1009 }
1010 }
1011
@@ -1016,7 +1016,7 @@ namespace WixToolset.Core
1016
1017 if (!this.Core.EncounteredError)
1018 {
1019 - this.Core.AddTuple(new DialogTuple(sourceLineNumbers, id)
1019 + this.Core.AddSymbol(new DialogSymbol(sourceLineNumbers, id)
1020 {
1021 HCentering = x,
1022 VCentering = y,
@@ -1047,12 +1047,12 @@ namespace WixToolset.Core
1047 /// <param name="node">Element to parse.</param>
1048 /// <param name="dialog">Identifier for parent dialog.</param>
1049 /// <param name="table">Table control belongs in.</param>
1050 - /// <param name="lastTabTuple">Last control in the tab order.</param>
1050 + /// <param name="lastTabSymbol">Last control in the tab order.</param>
1051 /// <param name="firstControl">Name of the first control in the tab order.</param>
1052 /// <param name="defaultControl">Name of the default control.</param>
1053 /// <param name="cancelControl">Name of the candle control.</param>
1054 /// <param name="trackDiskSpace">True if the containing dialog tracks disk space.</param>
1055 - private void ParseControlElement(XElement node, string dialog, TupleDefinitionType tupleType, ref ControlTuple lastTabTuple, ref string firstControl, ref string defaultControl, ref string cancelControl)
1055 + private void ParseControlElement(XElement node, string dialog, SymbolDefinitionType symbolType, ref ControlSymbol lastTabSymbol, ref string firstControl, ref string defaultControl, ref string cancelControl)
1056 {
1057 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1058 Identifier controlId = null;
@@ -1379,13 +1379,13 @@ namespace WixToolset.Core
1379 this.ParseBinaryElement(child);
1380 break;
1381 case "ComboBox":
1382 - this.ParseControlGroupElement(child, TupleDefinitionType.ComboBox, "ListItem");
1382 + this.ParseControlGroupElement(child, SymbolDefinitionType.ComboBox, "ListItem");
1383 break;
1384 case "ListBox":
1385 - this.ParseControlGroupElement(child, TupleDefinitionType.ListBox, "ListItem");
1385 + this.ParseControlGroupElement(child, SymbolDefinitionType.ListBox, "ListItem");
1386 break;
1387 case "ListView":
1388 - this.ParseControlGroupElement(child, TupleDefinitionType.ListView, "ListItem");
1388 + this.ParseControlGroupElement(child, SymbolDefinitionType.ListView, "ListItem");
1389 break;
1390 case "Property":
1391 this.ParsePropertyElement(child);
@@ -1454,7 +1454,7 @@ namespace WixToolset.Core
1454 }
1455
1456 // the logic for creating control rows is a little tricky because of the way tabable controls are set
1457 - IntermediateTuple tuple = null;
1457 + IntermediateSymbol symbol = null;
1458 if (!this.Core.EncounteredError)
1459 {
1460 if ("CheckBox" == controlType)
@@ -1469,7 +1469,7 @@ namespace WixToolset.Core
1469 }
1470 else if (!String.IsNullOrEmpty(property))
1471 {
1472 - this.Core.AddTuple(new CheckBoxTuple(sourceLineNumbers)
1472 + this.Core.AddSymbol(new CheckBoxSymbol(sourceLineNumbers)
1473 {
1474 Property = property,
1475 Value = checkboxValue,
@@ -1477,15 +1477,15 @@ namespace WixToolset.Core
1477 }
1478 else
1479 {
1480 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.CheckBox, checkBoxPropertyRef);
1480 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.CheckBox, checkBoxPropertyRef);
1481 }
1482 }
1483
1484 var id = new Identifier(controlId.Access, dialog, controlId.Id);
1485
1486 - if (TupleDefinitionType.BBControl == tupleType)
1486 + if (SymbolDefinitionType.BBControl == symbolType)
1487 {
1488 - var bbTuple = this.Core.AddTuple(new BBControlTuple(sourceLineNumbers, id)
1488 + var bbSymbol = this.Core.AddSymbol(new BBControlSymbol(sourceLineNumbers, id)
1489 {
1490 BillboardRef = dialog,
1491 BBControl = controlId.Id,
@@ -1503,16 +1503,16 @@ namespace WixToolset.Core
1503 SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile }
1504 });
1505
1506 - bbTuple.Set((int)BBControlTupleFields.X, x);
1507 - bbTuple.Set((int)BBControlTupleFields.Y, y);
1508 - bbTuple.Set((int)BBControlTupleFields.Width, width);
1509 - bbTuple.Set((int)BBControlTupleFields.Height, height);
1506 + bbSymbol.Set((int)BBControlSymbolFields.X, x);
1507 + bbSymbol.Set((int)BBControlSymbolFields.Y, y);
1508 + bbSymbol.Set((int)BBControlSymbolFields.Width, width);
1509 + bbSymbol.Set((int)BBControlSymbolFields.Height, height);
1510
1511 - tuple = bbTuple;
1511 + symbol = bbSymbol;
1512 }
1513 else
1514 {
1515 - var controlTuple = this.Core.AddTuple(new ControlTuple(sourceLineNumbers, id)
1515 + var controlSymbol = this.Core.AddSymbol(new ControlSymbol(sourceLineNumbers, id)
1516 {
1517 DialogRef = dialog,
1518 Control = controlId.Id,
@@ -1532,17 +1532,17 @@ namespace WixToolset.Core
1532 SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile }
1533 });
1534
1535 - controlTuple.Set((int)BBControlTupleFields.X, x);
1536 - controlTuple.Set((int)BBControlTupleFields.Y, y);
1537 - controlTuple.Set((int)BBControlTupleFields.Width, width);
1538 - controlTuple.Set((int)BBControlTupleFields.Height, height);
1535 + controlSymbol.Set((int)BBControlSymbolFields.X, x);
1536 + controlSymbol.Set((int)BBControlSymbolFields.Y, y);
1537 + controlSymbol.Set((int)BBControlSymbolFields.Width, width);
1538 + controlSymbol.Set((int)BBControlSymbolFields.Height, height);
1539
1540 - tuple = controlTuple;
1540 + symbol = controlSymbol;
1541 }
1542
1543 if (!String.IsNullOrEmpty(defaultCondition))
1544 {
1545 - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers)
1545 + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers)
1546 {
1547 DialogRef = dialog,
1548 ControlRef = controlId.Id,
@@ -1553,7 +1553,7 @@ namespace WixToolset.Core
1553
1554 if (!String.IsNullOrEmpty(enableCondition))
1555 {
1556 - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers)
1556 + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers)
1557 {
1558 DialogRef = dialog,
1559 ControlRef = controlId.Id,
@@ -1564,7 +1564,7 @@ namespace WixToolset.Core
1564
1565 if (!String.IsNullOrEmpty(disableCondition))
1566 {
1567 - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers)
1567 + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers)
1568 {
1569 DialogRef = dialog,
1570 ControlRef = controlId.Id,
@@ -1575,7 +1575,7 @@ namespace WixToolset.Core
1575
1576 if (!String.IsNullOrEmpty(hideCondition))
1577 {
1578 - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers)
1578 + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers)
1579 {
1580 DialogRef = dialog,
1581 ControlRef = controlId.Id,
@@ -1586,7 +1586,7 @@ namespace WixToolset.Core
1586
1587 if (!String.IsNullOrEmpty(showCondition))
1588 {
1589 - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers)
1589 + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers)
1590 {
1591 DialogRef = dialog,
1592 ControlRef = controlId.Id,
@@ -1598,15 +1598,15 @@ namespace WixToolset.Core
1598
1599 if (!notTabbable)
1600 {
1601 - if (tuple is ControlTuple controlTuple)
1601 + if (symbol is ControlSymbol controlSymbol)
1602 {
1603 - if (null != lastTabTuple)
1603 + if (null != lastTabSymbol)
1604 {
1605 - lastTabTuple.NextControlRef = controlTuple.Control;
1605 + lastTabSymbol.NextControlRef = controlSymbol.Control;
1606 }
1607 - lastTabTuple = controlTuple;
1607 + lastTabSymbol = controlSymbol;
1608 }
1609 - else if (tuple != null)
1609 + else if (symbol != null)
1610 {
1611 this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType));
1612 }
@@ -1621,7 +1621,7 @@ namespace WixToolset.Core
1621 // add a reference if the identifier of the binary entry is known during compilation
1622 if (("Bitmap" == controlType || "Icon" == controlType) && Common.IsIdentifier(text))
1623 {
1624 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text);
1624 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text);
1625 }
1626 }
1627
@@ -1665,7 +1665,7 @@ namespace WixToolset.Core
1665 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
1666 }
1667 dialog = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1668 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, dialog);
1668 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, dialog);
1669 break;
1670 case "Event":
1671 controlEvent = Compiler.UppercaseFirstChar(this.Core.GetAttributeValue(sourceLineNumbers, attrib));
@@ -1726,7 +1726,7 @@ namespace WixToolset.Core
1726
1727 if (!this.Core.EncounteredError)
1728 {
1729 - this.Core.AddTuple(new ControlEventTuple(sourceLineNumbers)
1729 + this.Core.AddSymbol(new ControlEventSymbol(sourceLineNumbers)
1730 {
1731 DialogRef = dialog,
1732 ControlRef = control,
@@ -1739,18 +1739,18 @@ namespace WixToolset.Core
1739
1740 if ("DoAction" == controlEvent && null != argument)
1741 {
1742 - // if we're not looking at a standard action or a formatted string then create a reference
1742 + // if we're not looking at a standard action or a formatted string then create a reference
1743 // to the custom action.
1744 if (!WindowsInstallerStandard.IsStandardAction(argument) && !Common.ContainsProperty(argument))
1745 {
1746 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.CustomAction, argument);
1746 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.CustomAction, argument);
1747 }
1748 }
1749
1750 // if we're referring to a dialog but not through a property, add it to the references
1751 if (("NewDialog" == controlEvent || "SpawnDialog" == controlEvent || "SpawnWaitDialog" == controlEvent || "SelectionBrowse" == controlEvent) && Common.IsIdentifier(argument))
1752 {
1753 - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, argument);
1753 + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, argument);
1754 }
1755 }
1756
@@ -1793,7 +1793,7 @@ namespace WixToolset.Core
1793
1794 if (!this.Core.EncounteredError)
1795 {
1796 - this.Core.AddTuple(new EventMappingTuple(sourceLineNumbers)
1796 + this.Core.AddSymbol(new EventMappingSymbol(sourceLineNumbers)
1797 {
1798 DialogRef = dialog,
1799 ControlRef = control,
src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
+63 -63
@@ -12,7 +12,7 @@ namespace WixToolset.Core.ExtensibilityServices
12 using System.Text.RegularExpressions;
13 using System.Xml.Linq;
14 using WixToolset.Data;
15 - using WixToolset.Data.Tuples;
15 + using WixToolset.Data.Symbols;
16 using WixToolset.Data.WindowsInstaller;
17 using WixToolset.Extensibility;
18 using WixToolset.Extensibility.Data;
@@ -44,7 +44,7 @@ namespace WixToolset.Core.ExtensibilityServices
44
45 private IMessaging Messaging { get; }
46
47 - private ITupleDefinitionCreator Creator { get; set; }
47 + private ISymbolDefinitionCreator Creator { get; set; }
48
49 public bool ContainsProperty(string possibleProperty)
50 {
@@ -54,7 +54,7 @@ namespace WixToolset.Core.ExtensibilityServices
54 public void CreateComplexReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary)
55 {
56
57 - section.AddTuple(new WixComplexReferenceTuple(sourceLineNumbers)
57 + section.AddSymbol(new WixComplexReferenceSymbol(sourceLineNumbers)
58 {
59 Parent = parentId,
60 ParentType = parentType,
@@ -64,16 +64,16 @@ namespace WixToolset.Core.ExtensibilityServices
64 IsPrimary = isPrimary
65 });
66
67 - this.CreateWixGroupTuple(section, sourceLineNumbers, parentType, parentId, childType, childId);
67 + this.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId);
68 }
69
70 [Obsolete]
71 public Identifier CreateDirectoryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet<string> sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null)
72 {
73 - return this.CreateDirectoryTuple(section, sourceLineNumbers, id, parentId, name, sectionInlinedDirectoryIds, shortName, sourceName, shortSourceName);
73 + return this.CreateDirectorySymbol(section, sourceLineNumbers, id, parentId, name, sectionInlinedDirectoryIds, shortName, sourceName, shortSourceName);
74 }
75
76 - public Identifier CreateDirectoryTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet<string> sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null)
76 + public Identifier CreateDirectorySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet<string> sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null)
77 {
78 if (String.IsNullOrEmpty(shortName) && !name.Equals("SourceDir") && !this.IsValidShortFilename(name))
79 {
@@ -86,7 +86,7 @@ namespace WixToolset.Core.ExtensibilityServices
86 }
87
88 // For anonymous directories, create the identifier. If this identifier already exists in the
89 - // active section, bail so we don't add duplicate anonymous directory tuples (which are legal
89 + // active section, bail so we don't add duplicate anonymous directory symbols (which are legal
90 // but bloat the intermediate and ultimately make the linker do "busy work").
91 if (null == id)
92 {
@@ -98,7 +98,7 @@ namespace WixToolset.Core.ExtensibilityServices
98 }
99 }
100
101 - var tuple = section.AddTuple(new DirectoryTuple(sourceLineNumbers, id)
101 + var symbol = section.AddSymbol(new DirectorySymbol(sourceLineNumbers, id)
102 {
103 ParentDirectoryRef = parentId,
104 Name = name,
@@ -107,7 +107,7 @@ namespace WixToolset.Core.ExtensibilityServices
107 SourceShortName = shortSourceName
108 });
109
110 - return tuple.Id;
110 + return symbol.Id;
111 }
112
113 public string CreateDirectoryReferenceFromInlineSyntax(IntermediateSection section, SourceLineNumber sourceLineNumbers, string parentId, XAttribute attribute, ISet<string> sectionInlinedDirectoryIds)
@@ -122,9 +122,9 @@ namespace WixToolset.Core.ExtensibilityServices
122 if (1 == inlineSyntax.Length)
123 {
124 id = inlineSyntax[0];
125 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, id);
125 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, id);
126 }
127 - else // start creating tuples for the entries in the inline syntax
127 + else // start creating symbols for the entries in the inline syntax
128 {
129 id = parentId;
130
@@ -138,14 +138,14 @@ namespace WixToolset.Core.ExtensibilityServices
138 //}
139
140 id = inlineSyntax[0].TrimEnd(':');
141 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, id);
141 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, id);
142
143 pathStartsAt = 1;
144 }
145
146 for (var i = pathStartsAt; i < inlineSyntax.Length; ++i)
147 {
148 - var inlineId = this.CreateDirectoryTuple(section, sourceLineNumbers, null, id, inlineSyntax[i], sectionInlinedDirectoryIds);
148 + var inlineId = this.CreateDirectorySymbol(section, sourceLineNumbers, null, id, inlineSyntax[i], sectionInlinedDirectoryIds);
149 id = inlineId.Id;
150 }
151 }
@@ -174,10 +174,10 @@ namespace WixToolset.Core.ExtensibilityServices
174 [Obsolete]
175 public Identifier CreateRegistryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
176 {
177 - return this.CreateRegistryTuple(section, sourceLineNumbers, root, key, name, value, componentId, escapeLeadingHash);
177 + return this.CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, escapeLeadingHash);
178 }
179
180 - public Identifier CreateRegistryTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
180 + public Identifier CreateRegistrySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
181 {
182 if (RegistryRootType.Unknown == root)
183 {
@@ -202,7 +202,7 @@ namespace WixToolset.Core.ExtensibilityServices
202
203 var id = this.CreateIdentifier("reg", componentId, ((int)root).ToString(CultureInfo.InvariantCulture.NumberFormat), key.ToLowerInvariant(), (null != name ? name.ToLowerInvariant() : name));
204
205 - var tuple = section.AddTuple(new RegistryTuple(sourceLineNumbers, id)
205 + var symbol = section.AddSymbol(new RegistrySymbol(sourceLineNumbers, id)
206 {
207 Root = root,
208 Key = key,
@@ -211,30 +211,30 @@ namespace WixToolset.Core.ExtensibilityServices
211 ComponentRef = componentId,
212 });
213
214 - return tuple.Id;
214 + return symbol.Id;
215 }
216
217 - public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, params string[] primaryKeys)
217 + public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys)
218 {
219 - section.AddTuple(new WixSimpleReferenceTuple(sourceLineNumbers)
219 + section.AddSymbol(new WixSimpleReferenceSymbol(sourceLineNumbers)
220 {
221 - Table = tupleName,
221 + Table = symbolName,
222 PrimaryKeys = String.Join("/", primaryKeys)
223 });
224 }
225
226 - public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, params string[] primaryKeys)
226 + public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys)
227 {
228 - this.CreateSimpleReference(section, sourceLineNumbers, tupleDefinition.Name, primaryKeys);
228 + this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKeys);
229 }
230
231 [Obsolete]
232 public void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
233 {
234 - this.CreateWixGroupTuple(section, sourceLineNumbers, parentType, parentId, childType, childId);
234 + this.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId);
235 }
236
237 - public void CreateWixGroupTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
237 + public void CreateWixGroupSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
238 {
239 if (null == parentId || ComplexReferenceParentType.Unknown == parentType)
240 {
@@ -246,7 +246,7 @@ namespace WixToolset.Core.ExtensibilityServices
246 throw new ArgumentNullException("childId");
247 }
248
249 - section.AddTuple(new WixGroupTuple(sourceLineNumbers)
249 + section.AddSymbol(new WixGroupSymbol(sourceLineNumbers)
250 {
251 ParentId = parentId,
252 ParentType = parentType,
@@ -255,7 +255,7 @@ namespace WixToolset.Core.ExtensibilityServices
255 });
256 }
257
258 - public void CreateWixSearchTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId)
258 + public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId)
259 {
260 // TODO: verify variable is not a standard bundle variable
261 if (variable == null)
@@ -263,7 +263,7 @@ namespace WixToolset.Core.ExtensibilityServices
263 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, elementName, "Variable"));
264 }
265
266 - section.AddTuple(new WixSearchTuple(sourceLineNumbers, id)
266 + section.AddSymbol(new WixSearchSymbol(sourceLineNumbers, id)
267 {
268 Variable = variable,
269 Condition = condition,
@@ -272,20 +272,20 @@ namespace WixToolset.Core.ExtensibilityServices
272
273 if (after != null)
274 {
275 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixSearch, after);
275 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixSearch, after);
276 // TODO: We're currently defaulting to "always run after", which we will need to change...
277 - this.CreateWixSearchRelationTuple(section, sourceLineNumbers, id, after, 2);
277 + this.CreateWixSearchRelationSymbol(section, sourceLineNumbers, id, after, 2);
278 }
279
280 if (!String.IsNullOrEmpty(bundleExtensionId))
281 {
282 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixBundleExtension, bundleExtensionId);
282 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundleExtension, bundleExtensionId);
283 }
284 }
285
286 - public void CreateWixSearchRelationTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes)
286 + public void CreateWixSearchRelationSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes)
287 {
288 - section.AddTuple(new WixSearchRelationTuple(sourceLineNumbers, id)
288 + section.AddSymbol(new WixSearchRelationSymbol(sourceLineNumbers, id)
289 {
290 ParentSearchRef = parentId,
291 Attributes = attributes,
@@ -293,43 +293,43 @@ namespace WixToolset.Core.ExtensibilityServices
293 }
294
295 [Obsolete]
296 - public IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null)
296 + public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null)
297 {
298 - return this.CreateTuple(section, sourceLineNumbers, tableName, identifier);
298 + return this.CreateSymbol(section, sourceLineNumbers, tableName, identifier);
299 }
300
301 [Obsolete]
302 - public IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null)
302 + public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null)
303 {
304 - return this.CreateTuple(section, sourceLineNumbers, tupleType, identifier);
304 + return this.CreateSymbol(section, sourceLineNumbers, symbolType, identifier);
305 }
306
307 - public IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, Identifier identifier = null)
307 + public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, Identifier identifier = null)
308 {
309 if (this.Creator == null)
310 {
311 - this.CreateTupleDefinitionCreator();
311 + this.CreateSymbolDefinitionCreator();
312 }
313
314 - if (!this.Creator.TryGetTupleDefinitionByName(tupleName, out var tupleDefinition))
314 + if (!this.Creator.TryGetSymbolDefinitionByName(symbolName, out var symbolDefinition))
315 {
316 - throw new ArgumentException(nameof(tupleName));
316 + throw new ArgumentException(nameof(symbolName));
317 }
318
319 - return this.CreateTuple(section, sourceLineNumbers, tupleDefinition, identifier);
319 + return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier);
320 }
321
322 [Obsolete]
323 - public IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null)
323 + public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null)
324 {
325 - var tupleDefinition = TupleDefinitions.ByType(tupleType);
325 + var symbolDefinition = SymbolDefinitions.ByType(symbolType);
326
327 - return this.CreateTuple(section, sourceLineNumbers, tupleDefinition, identifier);
327 + return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier);
328 }
329
330 - public IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, Identifier identifier = null)
330 + public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, Identifier identifier = null)
331 {
332 - return section.AddTuple(tupleDefinition.CreateTuple(sourceLineNumbers, identifier));
332 + return section.AddSymbol(symbolDefinition.CreateSymbol(sourceLineNumbers, identifier));
333 }
334
335 public string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args)
@@ -384,34 +384,34 @@ namespace WixToolset.Core.ExtensibilityServices
384
385 public void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition)
386 {
387 - section.AddTuple(new WixEnsureTableTuple(sourceLineNumbers)
387 + section.AddSymbol(new WixEnsureTableSymbol(sourceLineNumbers)
388 {
389 Table = tableDefinition.Name,
390 });
391
392 // TODO: Check if the given table definition is a custom table. For now we have to assume that it isn't.
393 - //this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixCustomTable, tableDefinition.Name);
393 + //this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixCustomTable, tableDefinition.Name);
394 }
395
396 public void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName)
397 {
398 - section.AddTuple(new WixEnsureTableTuple(sourceLineNumbers)
398 + section.AddSymbol(new WixEnsureTableSymbol(sourceLineNumbers)
399 {
400 Table = tableName,
401 });
402
403 if (this.Creator == null)
404 {
405 - this.CreateTupleDefinitionCreator();
405 + this.CreateSymbolDefinitionCreator();
406 }
407
408 - // TODO: The tableName may not be the same as the tupleName. For now, we have to assume that it is.
408 + // TODO: The tableName may not be the same as the symbolName. For now, we have to assume that it is.
409 // We don't add custom table definitions to the tableDefinitions collection,
410 // so if it's not in there, it better be a custom table. If the Id is just wrong,
411 // instead of a custom table, we get an unresolved reference at link time.
412 - if (!this.Creator.TryGetTupleDefinitionByName(tableName, out var _))
412 + if (!this.Creator.TryGetSymbolDefinitionByName(tableName, out var _))
413 {
414 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixCustomTable, tableName);
414 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixCustomTable, tableName);
415 }
416 }
417
@@ -898,11 +898,11 @@ namespace WixToolset.Core.ExtensibilityServices
898 }
899 }
900
901 - public WixActionTuple ScheduleActionTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition, string beforeAction, string afterAction, bool overridable = false)
901 + public WixActionSymbol ScheduleActionSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition, string beforeAction, string afterAction, bool overridable = false)
902 {
903 var actionId = new Identifier(access, sequence, actionName);
904
905 - var actionTuple = section.AddTuple(new WixActionTuple(sourceLineNumbers, actionId)
905 + var actionSymbol = section.AddSymbol(new WixActionSymbol(sourceLineNumbers, actionId)
906 {
907 SequenceTable = sequence,
908 Action = actionName,
@@ -916,11 +916,11 @@ namespace WixToolset.Core.ExtensibilityServices
916 {
917 if (WindowsInstallerStandard.IsStandardAction(beforeAction))
918 {
919 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), beforeAction);
919 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), beforeAction);
920 }
921 else
922 {
923 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, beforeAction);
923 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, beforeAction);
924 }
925 }
926
@@ -928,15 +928,15 @@ namespace WixToolset.Core.ExtensibilityServices
928 {
929 if (WindowsInstallerStandard.IsStandardAction(afterAction))
930 {
931 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), afterAction);
931 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), afterAction);
932 }
933 else
934 {
935 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, afterAction);
935 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, afterAction);
936 }
937 }
938
939 - return actionTuple;
939 + return actionSymbol;
940 }
941
942 public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform currentPlatform, CustomActionPlatforms supportedPlatforms)
@@ -968,7 +968,7 @@ namespace WixToolset.Core.ExtensibilityServices
968 break;
969 }
970
971 - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, name + suffix);
971 + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, name + suffix);
972 }
973 }
974
@@ -984,9 +984,9 @@ namespace WixToolset.Core.ExtensibilityServices
984 this.Messaging.Write(ErrorMessages.UnexpectedElement(sourceLineNumbers, parentElement.Name.LocalName, childElement.Name.LocalName));
985 }
986
987 - private void CreateTupleDefinitionCreator()
987 + private void CreateSymbolDefinitionCreator()
988 {
989 - this.Creator = this.ServiceProvider.GetService<ITupleDefinitionCreator>();
989 + this.Creator = this.ServiceProvider.GetService<ISymbolDefinitionCreator>();
990 }
991
992 private static bool TryFindExtension(IEnumerable<ICompilerExtension> extensions, XNamespace ns, out ICompilerExtension extension)
src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs
+12 -12
@@ -8,9 +8,9 @@ namespace WixToolset.Core.ExtensibilityServices
8 using WixToolset.Extensibility;
9 using WixToolset.Extensibility.Services;
10
11 - internal class TupleDefinitionCreator : ITupleDefinitionCreator
11 + internal class SymbolDefinitionCreator : ISymbolDefinitionCreator
12 {
13 - public TupleDefinitionCreator(IWixToolsetServiceProvider serviceProvider)
13 + public SymbolDefinitionCreator(IWixToolsetServiceProvider serviceProvider)
14 {
15 this.ServiceProvider = serviceProvider;
16 }
@@ -19,9 +19,9 @@ namespace WixToolset.Core.ExtensibilityServices
19
20 private IEnumerable<IExtensionData> ExtensionData { get; set; }
21
22 - private Dictionary<string, IntermediateTupleDefinition> CustomDefinitionByName { get; } = new Dictionary<string, IntermediateTupleDefinition>();
22 + private Dictionary<string, IntermediateSymbolDefinition> CustomDefinitionByName { get; } = new Dictionary<string, IntermediateSymbolDefinition>();
23
24 - public void AddCustomTupleDefinition(IntermediateTupleDefinition definition)
24 + public void AddCustomSymbolDefinition(IntermediateSymbolDefinition definition)
25 {
26 if (!this.CustomDefinitionByName.TryGetValue(definition.Name, out var existing) || definition.Revision > existing.Revision)
27 {
@@ -29,12 +29,12 @@ namespace WixToolset.Core.ExtensibilityServices
29 }
30 }
31
32 - public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
32 + public bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition)
33 {
34 // First, look in the built-ins.
35 - tupleDefinition = TupleDefinitions.ByName(name);
35 + symbolDefinition = SymbolDefinitions.ByName(name);
36
37 - if (tupleDefinition == null)
37 + if (symbolDefinition == null)
38 {
39 if (this.ExtensionData == null)
40 {
@@ -44,20 +44,20 @@ namespace WixToolset.Core.ExtensibilityServices
44 // Second, look in the extensions.
45 foreach (var data in this.ExtensionData)
46 {
47 - if (data.TryGetTupleDefinitionByName(name, out tupleDefinition))
47 + if (data.TryGetSymbolDefinitionByName(name, out symbolDefinition))
48 {
49 break;
50 }
51 }
52
53 - // Finally, look in the custom tuple definitions provided during an intermediate load.
54 - if (tupleDefinition == null)
53 + // Finally, look in the custom symbol definitions provided during an intermediate load.
54 + if (symbolDefinition == null)
55 {
56 - this.CustomDefinitionByName.TryGetValue(name, out tupleDefinition);
56 + this.CustomDefinitionByName.TryGetValue(name, out symbolDefinition);
57 }
58 }
59
60 - return tupleDefinition != null;
60 + return symbolDefinition != null;
61 }
62
63 private void LoadExtensionData()
src/WixToolset.Core/Librarian.cs
+5 -5
@@ -89,17 +89,17 @@ namespace WixToolset.Core
89
90 var fileResolver = new FileResolver(context.BindPaths, context.Extensions);
91
92 - foreach (var tuple in sections.SelectMany(s => s.Tuples))
92 + foreach (var symbol in sections.SelectMany(s => s.Symbols))
93 {
94 - foreach (var field in tuple.Fields.Where(f => f?.Type == IntermediateFieldType.Path))
94 + foreach (var field in symbol.Fields.Where(f => f?.Type == IntermediateFieldType.Path))
95 {
96 var pathField = field.AsPath();
97
98 if (pathField != null && !String.IsNullOrEmpty(pathField.Path))
99 {
100 - var resolution = variableResolver.ResolveVariables(tuple.SourceLineNumbers, pathField.Path);
100 + var resolution = variableResolver.ResolveVariables(symbol.SourceLineNumbers, pathField.Path);
101
102 - var file = fileResolver.Resolve(tuple.SourceLineNumbers, tuple.Definition, resolution.Value);
102 + var file = fileResolver.Resolve(symbol.SourceLineNumbers, symbol.Definition, resolution.Value);
103
104 if (!String.IsNullOrEmpty(file))
105 {
@@ -108,7 +108,7 @@ namespace WixToolset.Core
108 }
109 else
110 {
111 - this.Messaging.Write(ErrorMessages.FileNotFound(tuple.SourceLineNumbers, pathField.Path, tuple.Definition.Name));
111 + this.Messaging.Write(ErrorMessages.FileNotFound(symbol.SourceLineNumbers, pathField.Path, symbol.Definition.Name));
112 }
113 }
114 }
src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
+17 -17
@@ -31,17 +31,17 @@ namespace WixToolset.Core.Link
31 /// <summary>
32 /// Gets the collection of loaded symbols.
33 /// </summary>
34 - public IDictionary<string, TupleWithSection> TuplesByName { get; private set; }
34 + public IDictionary<string, SymbolWithSection> SymbolsByName { get; private set; }
35
36 /// <summary>
37 /// Gets the collection of possibly conflicting symbols.
38 /// </summary>
39 - public IEnumerable<TupleWithSection> PossibleConflicts { get; private set; }
39 + public IEnumerable<SymbolWithSection> PossibleConflicts { get; private set; }
40
41 public void Execute()
42 {
43 - var tuplesByName = new Dictionary<string, TupleWithSection>();
44 - var possibleConflicts = new HashSet<TupleWithSection>();
43 + var symbolsByName = new Dictionary<string, SymbolWithSection>();
44 + var possibleConflicts = new HashSet<SymbolWithSection>();
45
46 if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType))
47 {
@@ -66,44 +66,44 @@ namespace WixToolset.Core.Link
66 }
67 else
68 {
69 - this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Tuples.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id));
70 - this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Tuples.FirstOrDefault()?.SourceLineNumbers));
69 + this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Symbols.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id));
70 + this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Symbols.FirstOrDefault()?.SourceLineNumbers));
71 }
72 }
73
74 // Load all the symbols from the section's tables that create symbols.
75 - foreach (var tuple in section.Tuples.Where(t => t.Id != null))
75 + foreach (var symbol in section.Symbols.Where(t => t.Id != null))
76 {
77 - var symbol = new TupleWithSection(section, tuple);
77 + var symbolWithSection = new SymbolWithSection(section, symbol);
78
79 - if (!tuplesByName.TryGetValue(symbol.Name, out var existingSymbol))
79 + if (!symbolsByName.TryGetValue(symbolWithSection.Name, out var existingSymbol))
80 {
81 - tuplesByName.Add(symbol.Name, symbol);
81 + symbolsByName.Add(symbolWithSection.Name, symbolWithSection);
82 }
83 else // uh-oh, duplicate symbols.
84 {
85 // If the duplicate symbols are both private directories, there is a chance that they
86 - // point to identical tuples. Identical directory tuples are redundant and will not cause
86 + // point to identical symbols. Identical directory symbols are redundant and will not cause
87 // conflicts.
88 - if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbol.Access &&
89 - TupleDefinitionType.Directory == existingSymbol.Tuple.Definition.Type && existingSymbol.Tuple.IsIdentical(symbol.Tuple))
88 + if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbolWithSection.Access &&
89 + SymbolDefinitionType.Directory == existingSymbol.Symbol.Definition.Type && existingSymbol.Symbol.IsIdentical(symbolWithSection.Symbol))
90 {
91 - // Ensure identical symbol's tuple is marked redundant to ensure (should the tuple be
91 + // Ensure identical symbol's symbol is marked redundant to ensure (should the symbol be
92 // referenced into the final output) it will not add duplicate primary keys during
93 // the .IDT importing.
94 //symbol.Row.Redundant = true; - TODO: remove this
95 - existingSymbol.AddRedundant(symbol);
95 + existingSymbol.AddRedundant(symbolWithSection);
96 }
97 else
98 {
99 - existingSymbol.AddPossibleConflict(symbol);
99 + existingSymbol.AddPossibleConflict(symbolWithSection);
100 possibleConflicts.Add(existingSymbol);
101 }
102 }
103 }
104 }
105
106 - this.TuplesByName = tuplesByName;
106 + this.SymbolsByName = symbolsByName;
107 this.PossibleConflicts = possibleConflicts;
108 }
109 }
src/WixToolset.Core/Link/IntermediateTupleExtensions.cs
+4 -4
@@ -4,12 +4,12 @@ namespace WixToolset.Core.Link
4 {
5 using WixToolset.Data;
6
7 - internal static class IntermediateTupleExtensions
7 + internal static class IntermediateSymbolExtensions
8 {
9 - public static bool IsIdentical(this IntermediateTuple first, IntermediateTuple second)
9 + public static bool IsIdentical(this IntermediateSymbol first, IntermediateSymbol second)
10 {
11 - var identical = (first.Definition.Type == second.Definition.Type &&
12 - first.Definition.Name == second.Definition.Name &&
11 + var identical = (first.Definition.Type == second.Definition.Type &&
12 + first.Definition.Name == second.Definition.Name &&
13 first.Definition.FieldDefinitions.Length == second.Definition.FieldDefinitions.Length);
14
15 for (int i = 0; identical && i < first.Definition.FieldDefinitions.Length; ++i)
src/WixToolset.Core/Link/ReportConflictingTuplesCommand.cs
+9 -9
@@ -7,9 +7,9 @@ namespace WixToolset.Core.Link
7 using WixToolset.Data;
8 using WixToolset.Extensibility.Services;
9
10 - internal class ReportConflictingTuplesCommand
10 + internal class ReportConflictingSymbolsCommand
11 {
12 - public ReportConflictingTuplesCommand(IMessaging messaging, IEnumerable<TupleWithSection> possibleConflicts, IEnumerable<IntermediateSection> resolvedSections)
12 + public ReportConflictingSymbolsCommand(IMessaging messaging, IEnumerable<SymbolWithSection> possibleConflicts, IEnumerable<IntermediateSection> resolvedSections)
13 {
14 this.Messaging = messaging;
15 this.PossibleConflicts = possibleConflicts;
@@ -18,18 +18,18 @@ namespace WixToolset.Core.Link
18
19 private IMessaging Messaging { get; }
20
21 - private IEnumerable<TupleWithSection> PossibleConflicts { get; }
21 + private IEnumerable<SymbolWithSection> PossibleConflicts { get; }
22
23 private IEnumerable<IntermediateSection> ResolvedSections { get; }
24
25 public void Execute()
26 {
27 // Do a quick check if there are any possibly conflicting symbols that don't come from tables that allow
28 - // overriding. Hopefully the tuples with possible conflicts list is usually very short list (empty should
28 + // overriding. Hopefully the symbols with possible conflicts list is usually very short list (empty should
29 // be the most common). If we find any matches, we'll do a more costly check to see if the possible conflicting
30 - // tuples are in sections we actually referenced. From the resulting set, show an error for each duplicate
31 - // (aka: conflicting) tuple.
32 - var illegalDuplicates = this.PossibleConflicts.Where(s => s.Tuple.Definition.Type != TupleDefinitionType.WixAction && s.Tuple.Definition.Type != TupleDefinitionType.WixVariable).ToList();
30 + // symbols are in sections we actually referenced. From the resulting set, show an error for each duplicate
31 + // (aka: conflicting) symbol.
32 + var illegalDuplicates = this.PossibleConflicts.Where(s => s.Symbol.Definition.Type != SymbolDefinitionType.WixAction && s.Symbol.Definition.Type != SymbolDefinitionType.WixVariable).ToList();
33 if (0 < illegalDuplicates.Count)
34 {
35 var referencedSections = new HashSet<IntermediateSection>(this.ResolvedSections);
@@ -40,11 +40,11 @@ namespace WixToolset.Core.Link
40
41 if (actuallyReferencedDuplicates.Any())
42 {
43 - this.Messaging.Write(ErrorMessages.DuplicateSymbol(referencedDuplicate.Tuple.SourceLineNumbers, referencedDuplicate.Name));
43 + this.Messaging.Write(ErrorMessages.DuplicateSymbol(referencedDuplicate.Symbol.SourceLineNumbers, referencedDuplicate.Name));
44
45 foreach (var duplicate in actuallyReferencedDuplicates)
46 {
47 - this.Messaging.Write(ErrorMessages.DuplicateSymbol2(duplicate.Tuple.SourceLineNumbers));
47 + this.Messaging.Write(ErrorMessages.DuplicateSymbol2(duplicate.Symbol.SourceLineNumbers));
48 }
49 }
50 }
src/WixToolset.Core/Link/ResolveReferencesCommand.cs
+52 -52
@@ -6,7 +6,7 @@ namespace WixToolset.Core.Link
6 using System.Collections.Generic;
7 using System.Linq;
8 using WixToolset.Data;
9 - using WixToolset.Data.Tuples;
9 + using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility.Services;
11
12 /// <summary>
@@ -15,19 +15,19 @@ namespace WixToolset.Core.Link
15 internal class ResolveReferencesCommand
16 {
17 private readonly IntermediateSection entrySection;
18 - private readonly IDictionary<string, TupleWithSection> tuplesWithSections;
19 - private HashSet<TupleWithSection> referencedTuples;
18 + private readonly IDictionary<string, SymbolWithSection> symbolsWithSections;
19 + private HashSet<SymbolWithSection> referencedSymbols;
20 private HashSet<IntermediateSection> resolvedSections;
21
22 - public ResolveReferencesCommand(IMessaging messaging, IntermediateSection entrySection, IDictionary<string, TupleWithSection> tuplesWithSections)
22 + public ResolveReferencesCommand(IMessaging messaging, IntermediateSection entrySection, IDictionary<string, SymbolWithSection> symbolsWithSections)
23 {
24 this.Messaging = messaging;
25 this.entrySection = entrySection;
26 - this.tuplesWithSections = tuplesWithSections;
26 + this.symbolsWithSections = symbolsWithSections;
27 this.BuildingMergeModule = (SectionType.Module == entrySection.Type);
28 }
29
30 - public IEnumerable<TupleWithSection> ReferencedTupleWithSections => this.referencedTuples;
30 + public IEnumerable<SymbolWithSection> ReferencedSymbolWithSections => this.referencedSymbols;
31
32 public IEnumerable<IntermediateSection> ResolvedSections => this.resolvedSections;
33
@@ -41,7 +41,7 @@ namespace WixToolset.Core.Link
41 public void Execute()
42 {
43 this.resolvedSections = new HashSet<IntermediateSection>();
44 - this.referencedTuples = new HashSet<TupleWithSection>();
44 + this.referencedSymbols = new HashSet<SymbolWithSection>();
45
46 this.RecursivelyResolveReferences(this.entrySection);
47 }
@@ -60,10 +60,10 @@ namespace WixToolset.Core.Link
60 }
61
62 // Process all of the references contained in this section using the collection of
63 - // tuples provided. Then recursively call this method to process the
64 - // located tuple's section. All in all this is a very simple depth-first
63 + // symbols provided. Then recursively call this method to process the
64 + // located symbol's section. All in all this is a very simple depth-first
65 // search of the references per-section.
66 - foreach (var wixSimpleReferenceRow in section.Tuples.OfType<WixSimpleReferenceTuple>())
66 + foreach (var wixSimpleReferenceRow in section.Symbols.OfType<WixSimpleReferenceSymbol>())
67 {
68 // If we're building a Merge Module, ignore all references to the Media table
69 // because Merge Modules don't have Media tables.
@@ -72,44 +72,44 @@ namespace WixToolset.Core.Link
72 continue;
73 }
74
75 - if (!this.tuplesWithSections.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var tupleWithSection))
75 + if (!this.symbolsWithSections.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbolWithSection))
76 {
77 this.Messaging.Write(ErrorMessages.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName));
78 }
79 - else // see if the tuple (and any of its duplicates) are appropriately accessible.
79 + else // see if the symbol (and any of its duplicates) are appropriately accessible.
80 {
81 - var accessible = this.DetermineAccessibleTuples(section, tupleWithSection);
81 + var accessible = this.DetermineAccessibleSymbols(section, symbolWithSection);
82 if (!accessible.Any())
83 {
84 - this.Messaging.Write(ErrorMessages.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName, tupleWithSection.Access));
84 + this.Messaging.Write(ErrorMessages.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName, symbolWithSection.Access));
85 }
86 else if (1 == accessible.Count)
87 {
88 - var accessibleTuple = accessible[0];
89 - this.referencedTuples.Add(accessibleTuple);
88 + var accessibleSymbol = accessible[0];
89 + this.referencedSymbols.Add(accessibleSymbol);
90
91 - if (null != accessibleTuple.Section)
91 + if (null != accessibleSymbol.Section)
92 {
93 - this.RecursivelyResolveReferences(accessibleTuple.Section);
93 + this.RecursivelyResolveReferences(accessibleSymbol.Section);
94 }
95 }
96 - else // display errors for the duplicate tuples.
96 + else // display errors for the duplicate symbols.
97 {
98 - var accessibleTuple = accessible[0];
98 + var accessibleSymbol = accessible[0];
99 var referencingSourceLineNumber = wixSimpleReferenceRow.SourceLineNumbers?.ToString();
100
101 if (String.IsNullOrEmpty(referencingSourceLineNumber))
102 {
103 - this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleTuple.Tuple.SourceLineNumbers, accessibleTuple.Name));
103 + this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleSymbol.Symbol.SourceLineNumbers, accessibleSymbol.Name));
104 }
105 else
106 {
107 - this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleTuple.Tuple.SourceLineNumbers, accessibleTuple.Name, referencingSourceLineNumber));
107 + this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleSymbol.Symbol.SourceLineNumbers, accessibleSymbol.Name, referencingSourceLineNumber));
108 }
109
110 foreach (var accessibleDuplicate in accessible.Skip(1))
111 {
112 - this.Messaging.Write(ErrorMessages.DuplicateSymbol2(accessibleDuplicate.Tuple.SourceLineNumbers));
112 + this.Messaging.Write(ErrorMessages.DuplicateSymbol2(accessibleDuplicate.Symbol.SourceLineNumbers));
113 }
114 }
115 }
@@ -117,67 +117,67 @@ namespace WixToolset.Core.Link
117 }
118
119 /// <summary>
120 - /// Determine if the tuple and any of its duplicates are accessbile by referencing section.
120 + /// Determine if the symbol and any of its duplicates are accessbile by referencing section.
121 /// </summary>
122 - /// <param name="referencingSection">Section referencing the tuple.</param>
123 - /// <param name="tupleWithSection">Tuple being referenced.</param>
124 - /// <returns>List of tuples accessible by referencing section.</returns>
125 - private List<TupleWithSection> DetermineAccessibleTuples(IntermediateSection referencingSection, TupleWithSection tupleWithSection)
122 + /// <param name="referencingSection">Section referencing the symbol.</param>
123 + /// <param name="symbolWithSection">Symbol being referenced.</param>
124 + /// <returns>List of symbols accessible by referencing section.</returns>
125 + private List<SymbolWithSection> DetermineAccessibleSymbols(IntermediateSection referencingSection, SymbolWithSection symbolWithSection)
126 {
127 - var accessibleTuples = new List<TupleWithSection>();
127 + var accessibleSymbols = new List<SymbolWithSection>();
128
129 - if (this.AccessibleTuple(referencingSection, tupleWithSection))
129 + if (this.AccessibleSymbol(referencingSection, symbolWithSection))
130 {
131 - accessibleTuples.Add(tupleWithSection);
131 + accessibleSymbols.Add(symbolWithSection);
132 }
133
134 - foreach (var dupe in tupleWithSection.PossiblyConflicts)
134 + foreach (var dupe in symbolWithSection.PossiblyConflicts)
135 {
136 - // don't count overridable WixActionTuples
137 - var tupleAction = tupleWithSection.Tuple as WixActionTuple;
138 - var dupeAction = dupe.Tuple as WixActionTuple;
139 - if (tupleAction?.Overridable != dupeAction?.Overridable)
136 + // don't count overridable WixActionSymbols
137 + var symbolAction = symbolWithSection.Symbol as WixActionSymbol;
138 + var dupeAction = dupe.Symbol as WixActionSymbol;
139 + if (symbolAction?.Overridable != dupeAction?.Overridable)
140 {
141 continue;
142 }
143
144 - if (this.AccessibleTuple(referencingSection, dupe))
144 + if (this.AccessibleSymbol(referencingSection, dupe))
145 {
146 - accessibleTuples.Add(dupe);
146 + accessibleSymbols.Add(dupe);
147 }
148 }
149
150 - foreach (var dupe in tupleWithSection.Redundants)
150 + foreach (var dupe in symbolWithSection.Redundants)
151 {
152 - if (this.AccessibleTuple(referencingSection, dupe))
152 + if (this.AccessibleSymbol(referencingSection, dupe))
153 {
154 - accessibleTuples.Add(dupe);
154 + accessibleSymbols.Add(dupe);
155 }
156 }
157
158 - return accessibleTuples;
158 + return accessibleSymbols;
159 }
160
161 /// <summary>
162 - /// Determine if a single tuple is accessible by the referencing section.
162 + /// Determine if a single symbol is accessible by the referencing section.
163 /// </summary>
164 - /// <param name="referencingSection">Section referencing the tuple.</param>
165 - /// <param name="tupleWithSection">Tuple being referenced.</param>
166 - /// <returns>True if tuple is accessible.</returns>
167 - private bool AccessibleTuple(IntermediateSection referencingSection, TupleWithSection tupleWithSection)
164 + /// <param name="referencingSection">Section referencing the symbol.</param>
165 + /// <param name="symbolWithSection">Symbol being referenced.</param>
166 + /// <returns>True if symbol is accessible.</returns>
167 + private bool AccessibleSymbol(IntermediateSection referencingSection, SymbolWithSection symbolWithSection)
168 {
169 - switch (tupleWithSection.Access)
169 + switch (symbolWithSection.Access)
170 {
171 case AccessModifier.Public:
172 return true;
173 case AccessModifier.Internal:
174 - return tupleWithSection.Section.CompilationId.Equals(referencingSection.CompilationId) || (null != tupleWithSection.Section.LibraryId && tupleWithSection.Section.LibraryId.Equals(referencingSection.LibraryId));
174 + return symbolWithSection.Section.CompilationId.Equals(referencingSection.CompilationId) || (null != symbolWithSection.Section.LibraryId && symbolWithSection.Section.LibraryId.Equals(referencingSection.LibraryId));
175 case AccessModifier.Protected:
176 - return tupleWithSection.Section.CompilationId.Equals(referencingSection.CompilationId);
176 + return symbolWithSection.Section.CompilationId.Equals(referencingSection.CompilationId);
177 case AccessModifier.Private:
178 - return referencingSection == tupleWithSection.Section;
178 + return referencingSection == symbolWithSection.Section;
179 default:
180 - throw new ArgumentOutOfRangeException(nameof(tupleWithSection.Access));
180 + throw new ArgumentOutOfRangeException(nameof(symbolWithSection.Access));
181 }
182 }
183 }
src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs
+16 -16
@@ -3,17 +3,17 @@
3 namespace WixToolset.Core.Link
4 {
5 using System;
6 - using WixToolset.Data.Tuples;
6 + using WixToolset.Data.Symbols;
7
8 - internal static class WixComplexReferenceTupleExtensions
8 + internal static class WixComplexReferenceSymbolExtensions
9 {
10 /// <summary>
11 /// Creates a shallow copy of the ComplexReference.
12 /// </summary>
13 /// <returns>A shallow copy of the ComplexReference.</returns>
14 - public static WixComplexReferenceTuple Clone(this WixComplexReferenceTuple source)
14 + public static WixComplexReferenceSymbol Clone(this WixComplexReferenceSymbol source)
15 {
16 - var clone = new WixComplexReferenceTuple(source.SourceLineNumbers, source.Id);
16 + var clone = new WixComplexReferenceSymbol(source.SourceLineNumbers, source.Id);
17 clone.ParentType = source.ParentType;
18 clone.Parent = source.Parent;
19 clone.ParentLanguage = source.ParentLanguage;
@@ -29,23 +29,23 @@ namespace WixToolset.Core.Link
29 /// </summary>
30 /// <param name="obj">Complex reference to compare to.</param>
31 /// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns>
32 - public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple other)
32 + public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol other)
33 {
34 - var comparison = tuple.ChildType - other.ChildType;
34 + var comparison = symbol.ChildType - other.ChildType;
35 if (0 == comparison)
36 {
37 - comparison = String.Compare(tuple.Child, other.Child, StringComparison.Ordinal);
37 + comparison = String.Compare(symbol.Child, other.Child, StringComparison.Ordinal);
38 if (0 == comparison)
39 {
40 - comparison = tuple.ParentType - other.ParentType;
40 + comparison = symbol.ParentType - other.ParentType;
41 if (0 == comparison)
42 {
43 - string thisParentLanguage = null == tuple.ParentLanguage ? String.Empty : tuple.ParentLanguage;
43 + string thisParentLanguage = null == symbol.ParentLanguage ? String.Empty : symbol.ParentLanguage;
44 string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage;
45 comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal);
46 if (0 == comparison)
47 {
48 - comparison = String.Compare(tuple.Parent, other.Parent, StringComparison.Ordinal);
48 + comparison = String.Compare(symbol.Parent, other.Parent, StringComparison.Ordinal);
49 }
50 }
51 }
@@ -58,15 +58,15 @@ namespace WixToolset.Core.Link
58 /// Changes all of the parent references to point to the passed in parent reference.
59 /// </summary>
60 /// <param name="parent">New parent complex reference.</param>
61 - public static void Reparent(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple parent)
61 + public static void Reparent(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol parent)
62 {
63 - tuple.Parent = parent.Parent;
64 - tuple.ParentLanguage = parent.ParentLanguage;
65 - tuple.ParentType = parent.ParentType;
63 + symbol.Parent = parent.Parent;
64 + symbol.ParentLanguage = parent.ParentLanguage;
65 + symbol.ParentType = parent.ParentType;
66
67 - if (!tuple.IsPrimary)
67 + if (!symbol.IsPrimary)
68 {
69 - tuple.IsPrimary = parent.IsPrimary;
69 + symbol.IsPrimary = parent.IsPrimary;
70 }
71 }
72 }
src/WixToolset.Core/Link/WixGroupingOrdering.cs
+8 -8
@@ -10,7 +10,7 @@ namespace WixToolset.Core.Link
10 using System.Linq;
11 using System.Text;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Extensibility.Services;
15 using WixToolset.Data.Burn;
16
@@ -155,7 +155,7 @@ namespace WixToolset.Core.Link
155 foreach (int rowIndex in sortedIndexes)
156 {
157 //wixGroupTable.Rows.RemoveAt(rowIndex);
158 - this.EntrySection.Tuples.RemoveAt(rowIndex);
158 + this.EntrySection.Symbols.RemoveAt(rowIndex);
159 }
160 }
161
@@ -173,7 +173,7 @@ namespace WixToolset.Core.Link
173 // groups to read from that table instead.
174 foreach (var item in orderedItems)
175 {
176 - this.EntrySection.AddTuple(new WixGroupTuple(item.Row.SourceLineNumbers)
176 + this.EntrySection.AddSymbol(new WixGroupSymbol(item.Row.SourceLineNumbers)
177 {
178 ParentId = parentId,
179 ParentType = (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), parentType),
@@ -238,9 +238,9 @@ namespace WixToolset.Core.Link
238 //}
239
240 // Collect all of the groups
241 - for (int rowIndex = 0; rowIndex < this.EntrySection.Tuples.Count; ++rowIndex)
241 + for (int rowIndex = 0; rowIndex < this.EntrySection.Symbols.Count; ++rowIndex)
242 {
243 - if (this.EntrySection.Tuples[rowIndex] is WixGroupTuple row)
243 + if (this.EntrySection.Symbols[rowIndex] is WixGroupSymbol row)
244 {
245 var rowParentName = row.ParentId;
246 var rowParentType = row.ParentType.ToString();
@@ -357,7 +357,7 @@ namespace WixToolset.Core.Link
357 // return;
358 //}
359
360 - foreach (var row in this.EntrySection.Tuples.OfType<WixOrderingTuple>())
360 + foreach (var row in this.EntrySection.Symbols.OfType<WixOrderingSymbol>())
361 {
362 var rowItemType = row.ItemType.ToString();
363 var rowItemName = row.ItemIdRef;
@@ -513,7 +513,7 @@ namespace WixToolset.Core.Link
513 private readonly ItemCollection beforeItems; // for checking for circular references
514 private bool flattenedAfterItems;
515
516 - public Item(IntermediateTuple row, string type, string id)
516 + public Item(IntermediateSymbol row, string type, string id)
517 {
518 this.Row = row;
519 this.Type = type;
@@ -526,7 +526,7 @@ namespace WixToolset.Core.Link
526 this.flattenedAfterItems = false;
527 }
528
529 - public IntermediateTuple Row { get; private set; }
529 + public IntermediateSymbol Row { get; private set; }
530 public string Type { get; private set; }
531 public string Id { get; private set; }
532 public string Key { get; private set; }
src/WixToolset.Core/LinkContext.cs
+1 -1
@@ -26,7 +26,7 @@ namespace WixToolset.Core
26
27 public IEnumerable<Intermediate> Intermediates { get; set; }
28
29 - public ITupleDefinitionCreator TupleDefinitionCreator { get; set; }
29 + public ISymbolDefinitionCreator SymbolDefinitionCreator { get; set; }
30
31 public CancellationToken CancellationToken { get; set; }
32 }
src/WixToolset.Core/Linker.cs
+89 -89
@@ -10,7 +10,7 @@ namespace WixToolset.Core
10 using System.Linq;
11 using WixToolset.Core.Link;
12 using WixToolset.Data;
13 - using WixToolset.Data.Tuples;
13 + using WixToolset.Data.Symbols;
14 using WixToolset.Data.WindowsInstaller;
15 using WixToolset.Extensibility.Data;
16 using WixToolset.Extensibility.Services;
@@ -60,9 +60,9 @@ namespace WixToolset.Core
60 {
61 this.Context = context;
62
63 - if (this.Context.TupleDefinitionCreator == null)
63 + if (this.Context.SymbolDefinitionCreator == null)
64 {
65 - this.Context.TupleDefinitionCreator = this.ServiceProvider.GetService<ITupleDefinitionCreator>();
65 + this.Context.SymbolDefinitionCreator = this.ServiceProvider.GetService<ISymbolDefinitionCreator>();
66 }
67
68 foreach (var extension in this.Context.Extensions)
@@ -85,7 +85,7 @@ namespace WixToolset.Core
85 // Add sections from the extensions with data.
86 foreach (var data in this.Context.ExtensionData)
87 {
88 - var library = data.GetLibrary(this.Context.TupleDefinitionCreator);
88 + var library = data.GetLibrary(this.Context.SymbolDefinitionCreator);
89
90 if (library != null)
91 {
@@ -107,7 +107,7 @@ namespace WixToolset.Core
107
108 var multipleFeatureComponents = new Hashtable();
109
110 - var wixVariables = new Dictionary<string, WixVariableTuple>();
110 + var wixVariables = new Dictionary<string, WixVariableSymbol>();
111
112 #if MOVE_TO_BACKEND
113 // verify that modularization types match for foreign key relationships
@@ -149,12 +149,12 @@ namespace WixToolset.Core
149 throw new WixException(ErrorMessages.MissingEntrySection(this.Context.ExpectedOutputType.ToString()));
150 }
151
152 - // Add the missing standard action tuples.
153 - this.LoadStandardActions(find.EntrySection, find.TuplesByName);
152 + // Add the missing standard action symbols.
153 + this.LoadStandardActions(find.EntrySection, find.SymbolsByName);
154
155 - // Resolve the tuple references to find the set of sections we care about for linking.
155 + // Resolve the symbol references to find the set of sections we care about for linking.
156 // Of course, we start with the entry section (that's how it got its name after all).
157 - var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.TuplesByName);
157 + var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.SymbolsByName);
158
159 resolve.Execute();
160
@@ -190,16 +190,16 @@ namespace WixToolset.Core
190 }
191
192 // Display an error message for Components that were not referenced by a Feature.
193 - foreach (var tupleWithSection in resolve.ReferencedTupleWithSections.Where(s => s.Tuple.Definition.Type == TupleDefinitionType.Component))
193 + foreach (var symbolWithSection in resolve.ReferencedSymbolWithSections.Where(s => s.Symbol.Definition.Type == SymbolDefinitionType.Component))
194 {
195 - if (!referencedComponents.Contains(tupleWithSection.Name))
195 + if (!referencedComponents.Contains(symbolWithSection.Name))
196 {
197 - this.Messaging.Write(ErrorMessages.OrphanedComponent(tupleWithSection.Tuple.SourceLineNumbers, tupleWithSection.Tuple.Id.Id));
197 + this.Messaging.Write(ErrorMessages.OrphanedComponent(symbolWithSection.Symbol.SourceLineNumbers, symbolWithSection.Symbol.Id.Id));
198 }
199 }
200
201 // Report duplicates that would ultimately end up being primary key collisions.
202 - var reportDupes = new ReportConflictingTuplesCommand(this.Messaging, find.PossibleConflicts, resolve.ResolvedSections);
202 + var reportDupes = new ReportConflictingSymbolsCommand(this.Messaging, find.PossibleConflicts, resolve.ResolvedSections);
203 reportDupes.Execute();
204
205 if (this.Messaging.EncounteredError)
@@ -208,7 +208,7 @@ namespace WixToolset.Core
208 }
209
210 // resolve the feature to feature connects
211 - this.ResolveFeatureToFeatureConnects(featuresToFeatures, find.TuplesByName);
211 + this.ResolveFeatureToFeatureConnects(featuresToFeatures, find.SymbolsByName);
212
213 // Create the section to hold the linked content.
214 var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type, find.EntrySection.Codepage);
@@ -225,17 +225,17 @@ namespace WixToolset.Core
225 sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture);
226 }
227
228 - foreach (var tuple in section.Tuples)
228 + foreach (var symbol in section.Symbols)
229 {
230 - var copyTuple = true; // by default, copy tuples.
230 + var copySymbol = true; // by default, copy symbols.
231
232 // handle special tables
233 - switch (tuple.Definition.Type)
233 + switch (symbol.Definition.Type)
234 {
235 - case TupleDefinitionType.Class:
235 + case SymbolDefinitionType.Class:
236 if (SectionType.Product == resolvedSection.Type)
237 {
238 - this.ResolveFeatures(tuple, (int)ClassTupleFields.ComponentRef, (int)ClassTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
238 + this.ResolveFeatures(symbol, (int)ClassSymbolFields.ComponentRef, (int)ClassSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
239 }
240 break;
241
@@ -287,48 +287,48 @@ namespace WixToolset.Core
287 }
288 break;
289 #endif
290 - case TupleDefinitionType.Extension:
290 + case SymbolDefinitionType.Extension:
291 if (SectionType.Product == resolvedSection.Type)
292 {
293 - this.ResolveFeatures(tuple, (int)ExtensionTupleFields.ComponentRef, (int)ExtensionTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
293 + this.ResolveFeatures(symbol, (int)ExtensionSymbolFields.ComponentRef, (int)ExtensionSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
294 }
295 break;
296
297 #if MOVE_TO_BACKEND
298 - case TupleDefinitionType.ModuleSubstitution:
298 + case SymbolDefinitionType.ModuleSubstitution:
299 containsModuleSubstitution = true;
300 break;
301
302 - case TupleDefinitionType.ModuleConfiguration:
302 + case SymbolDefinitionType.ModuleConfiguration:
303 containsModuleConfiguration = true;
304 break;
305 #endif
306
307 - case TupleDefinitionType.Assembly:
307 + case SymbolDefinitionType.Assembly:
308 if (SectionType.Product == resolvedSection.Type)
309 {
310 - this.ResolveFeatures(tuple, (int)AssemblyTupleFields.ComponentRef, (int)AssemblyTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
310 + this.ResolveFeatures(symbol, (int)AssemblySymbolFields.ComponentRef, (int)AssemblySymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
311 }
312 break;
313
314 - case TupleDefinitionType.PublishComponent:
314 + case SymbolDefinitionType.PublishComponent:
315 if (SectionType.Product == resolvedSection.Type)
316 {
317 - this.ResolveFeatures(tuple, (int)PublishComponentTupleFields.ComponentRef, (int)PublishComponentTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
317 + this.ResolveFeatures(symbol, (int)PublishComponentSymbolFields.ComponentRef, (int)PublishComponentSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
318 }
319 break;
320
321 - case TupleDefinitionType.Shortcut:
321 + case SymbolDefinitionType.Shortcut:
322 if (SectionType.Product == resolvedSection.Type)
323 {
324 - this.ResolveFeatures(tuple, (int)ShortcutTupleFields.ComponentRef, (int)ShortcutTupleFields.Target, componentsToFeatures, multipleFeatureComponents);
324 + this.ResolveFeatures(symbol, (int)ShortcutSymbolFields.ComponentRef, (int)ShortcutSymbolFields.Target, componentsToFeatures, multipleFeatureComponents);
325 }
326 break;
327
328 - case TupleDefinitionType.TypeLib:
328 + case SymbolDefinitionType.TypeLib:
329 if (SectionType.Product == resolvedSection.Type)
330 {
331 - this.ResolveFeatures(tuple, (int)TypeLibTupleFields.ComponentRef, (int)TypeLibTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
331 + this.ResolveFeatures(symbol, (int)TypeLibSymbolFields.ComponentRef, (int)TypeLibSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents);
332 }
333 break;
334
@@ -352,51 +352,51 @@ namespace WixToolset.Core
352 break;
353 #endif
354
355 - case TupleDefinitionType.WixMerge:
355 + case SymbolDefinitionType.WixMerge:
356 if (SectionType.Product == resolvedSection.Type)
357 {
358 - this.ResolveFeatures(tuple, -1, (int)WixMergeTupleFields.FeatureRef, modulesToFeatures, null);
358 + this.ResolveFeatures(symbol, -1, (int)WixMergeSymbolFields.FeatureRef, modulesToFeatures, null);
359 }
360 break;
361
362 - case TupleDefinitionType.WixComplexReference:
363 - copyTuple = false;
362 + case SymbolDefinitionType.WixComplexReference:
363 + copySymbol = false;
364 break;
365
366 - case TupleDefinitionType.WixSimpleReference:
367 - copyTuple = false;
366 + case SymbolDefinitionType.WixSimpleReference:
367 + copySymbol = false;
368 break;
369
370 - case TupleDefinitionType.WixVariable:
370 + case SymbolDefinitionType.WixVariable:
371 // check for colliding values and collect the wix variable rows
372 {
373 - var wixVariableTuple = (WixVariableTuple)tuple;
374 - var id = wixVariableTuple.Id.Id;
373 + var wixVariableSymbol = (WixVariableSymbol)symbol;
374 + var id = wixVariableSymbol.Id.Id;
375
376 - if (wixVariables.TryGetValue(id, out var collidingTuple))
376 + if (wixVariables.TryGetValue(id, out var collidingSymbol))
377 {
378 - if (collidingTuple.Overridable && !wixVariableTuple.Overridable)
378 + if (collidingSymbol.Overridable && !wixVariableSymbol.Overridable)
379 {
380 - wixVariables[id] = wixVariableTuple;
380 + wixVariables[id] = wixVariableSymbol;
381 }
382 - else if (!wixVariableTuple.Overridable || (collidingTuple.Overridable && wixVariableTuple.Overridable))
382 + else if (!wixVariableSymbol.Overridable || (collidingSymbol.Overridable && wixVariableSymbol.Overridable))
383 {
384 - this.Messaging.Write(ErrorMessages.WixVariableCollision(wixVariableTuple.SourceLineNumbers, id));
384 + this.Messaging.Write(ErrorMessages.WixVariableCollision(wixVariableSymbol.SourceLineNumbers, id));
385 }
386 }
387 else
388 {
389 - wixVariables.Add(id, wixVariableTuple);
389 + wixVariables.Add(id, wixVariableSymbol);
390 }
391 }
392
393 - copyTuple = false;
393 + copySymbol = false;
394 break;
395 }
396
397 - if (copyTuple)
397 + if (copySymbol)
398 {
399 - resolvedSection.AddTuple(tuple);
399 + resolvedSection.AddSymbol(symbol);
400 }
401 }
402 }
@@ -406,7 +406,7 @@ namespace WixToolset.Core
406 {
407 foreach (var feature in connectToFeature.ConnectFeatures)
408 {
409 - resolvedSection.AddTuple(new WixFeatureModulesTuple
409 + resolvedSection.AddSymbol(new WixFeatureModulesSymbol
410 {
411 FeatureRef = feature,
412 WixMergeRef = connectToFeature.ChildId
@@ -462,16 +462,16 @@ namespace WixToolset.Core
462 {
463 //var componentSectionIds = new Dictionary<string, string>();
464
465 - //foreach (var componentTuple in entrySection.Tuples.OfType<ComponentTuple>())
465 + //foreach (var componentSymbol in entrySection.Symbols.OfType<ComponentSymbol>())
466 //{
467 - // componentSectionIds.Add(componentTuple.Id.Id, componentTuple.SectionId);
467 + // componentSectionIds.Add(componentSymbol.Id.Id, componentSymbol.SectionId);
468 //}
469
470 - //foreach (var featureComponentTuple in entrySection.Tuples.OfType<FeatureComponentsTuple>())
470 + //foreach (var featureComponentSymbol in entrySection.Symbols.OfType<FeatureComponentsSymbol>())
471 //{
472 - // if (componentSectionIds.TryGetValue(featureComponentTuple.Component_, out var componentSectionId))
472 + // if (componentSectionIds.TryGetValue(featureComponentSymbol.Component_, out var componentSectionId))
473 // {
474 - // featureComponentTuple.SectionId = componentSectionId;
474 + // featureComponentSymbol.SectionId = componentSectionId;
475 // }
476 //}
477 }
@@ -544,9 +544,9 @@ namespace WixToolset.Core
544 #endif
545
546 // copy the wix variable rows to the output after all overriding has been accounted for.
547 - foreach (var tuple in wixVariables.Values)
547 + foreach (var symbol in wixVariables.Values)
548 {
549 - resolvedSection.AddTuple(tuple);
549 + resolvedSection.AddSymbol(symbol);
550 }
551
552 // Bundles have groups of data that must be flattened in a way different from other types.
@@ -734,17 +734,17 @@ namespace WixToolset.Core
734 /// <summary>
735 /// Load the standard action symbols.
736 /// </summary>
737 - /// <param name="tuplesByName">Collection of symbols.</param>
738 - private void LoadStandardActions(IntermediateSection section, IDictionary<string, TupleWithSection> tuplesByName)
737 + /// <param name="symbolsByName">Collection of symbols.</param>
738 + private void LoadStandardActions(IntermediateSection section, IDictionary<string, SymbolWithSection> symbolsByName)
739 {
740 - foreach (var actionTuple in WindowsInstallerStandard.StandardActions())
740 + foreach (var actionSymbol in WindowsInstallerStandard.StandardActions())
741 {
742 - var tupleWithSection = new TupleWithSection(section, actionTuple);
742 + var symbolWithSection = new SymbolWithSection(section, actionSymbol);
743
744 - // If the action's tuple has not already been defined (i.e. overriden by the user), add it now.
745 - if (!tuplesByName.ContainsKey(tupleWithSection.Name))
744 + // If the action's symbol has not already been defined (i.e. overriden by the user), add it now.
745 + if (!symbolsByName.ContainsKey(symbolWithSection.Name))
746 {
747 - tuplesByName.Add(tupleWithSection.Name, tupleWithSection);
747 + symbolsByName.Add(symbolWithSection.Name, symbolWithSection);
748 }
749 }
750 }
@@ -752,7 +752,7 @@ namespace WixToolset.Core
752 /// <summary>
753 /// Process the complex references.
754 /// </summary>
755 - /// <param name="resolvedSection">Active section to add tuples to.</param>
755 + /// <param name="resolvedSection">Active section to add symbols to.</param>
756 /// <param name="sections">Sections that are referenced during the link process.</param>
757 /// <param name="referencedComponents">Collection of all components referenced by complex reference.</param>
758 /// <param name="componentsToFeatures">Component to feature complex references.</param>
@@ -764,8 +764,8 @@ namespace WixToolset.Core
764
765 foreach (var section in sections)
766 {
767 - // Need ToList since we might want to add tuples while processing.
768 - foreach (var wixComplexReferenceRow in section.Tuples.OfType<WixComplexReferenceTuple>().ToList())
767 + // Need ToList since we might want to add symbols while processing.
768 + foreach (var wixComplexReferenceRow in section.Symbols.OfType<WixComplexReferenceSymbol>().ToList())
769 {
770 ConnectToFeature connection;
771 switch (wixComplexReferenceRow.ParentType)
@@ -799,7 +799,7 @@ namespace WixToolset.Core
799 }
800
801 // add a row to the FeatureComponents table
802 - section.AddTuple(new FeatureComponentsTuple
802 + section.AddSymbol(new FeatureComponentsSymbol
803 {
804 FeatureRef = wixComplexReferenceRow.Parent,
805 ComponentRef = wixComplexReferenceRow.Child,
@@ -867,7 +867,7 @@ namespace WixToolset.Core
867 componentsToModules.Add(wixComplexReferenceRow.Child, wixComplexReferenceRow); // should always be new
868
869 // add a row to the ModuleComponents table
870 - section.AddTuple(new ModuleComponentsTuple
870 + section.AddSymbol(new ModuleComponentsSymbol
871 {
872 Component = wixComplexReferenceRow.Child,
873 ModuleID = wixComplexReferenceRow.Parent,
@@ -931,7 +931,7 @@ namespace WixToolset.Core
931 /// <param name="sections">Sections that are referenced during the link process.</param>
932 private void FlattenSectionsComplexReferences(IEnumerable<IntermediateSection> sections)
933 {
934 - var parentGroups = new Dictionary<string, List<WixComplexReferenceTuple>>();
934 + var parentGroups = new Dictionary<string, List<WixComplexReferenceSymbol>>();
935 var parentGroupsSections = new Dictionary<string, IntermediateSection>();
936 var parentGroupsNeedingProcessing = new Dictionary<string, IntermediateSection>();
937
@@ -945,12 +945,12 @@ namespace WixToolset.Core
945 foreach (var section in sections)
946 {
947 // Count down because we'll sometimes remove items from the list.
948 - for (var i = section.Tuples.Count - 1; i >= 0; --i)
948 + for (var i = section.Symbols.Count - 1; i >= 0; --i)
949 {
950 // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature,
951 // and Module. Non-grouping complex references are simple and
952 // resolved during normal complex reference resolutions.
953 - if (section.Tuples[i] is WixComplexReferenceTuple wixComplexReferenceRow &&
953 + if (section.Symbols[i] is WixComplexReferenceSymbol wixComplexReferenceRow &&
954 (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType ||
955 ComplexReferenceParentType.ComponentGroup == wixComplexReferenceRow.ParentType ||
956 ComplexReferenceParentType.Feature == wixComplexReferenceRow.ParentType ||
@@ -965,12 +965,12 @@ namespace WixToolset.Core
965 // Step 2.
966 if (!parentGroups.TryGetValue(parentTypeAndId, out var childrenComplexRefs))
967 {
968 - childrenComplexRefs = new List<WixComplexReferenceTuple>();
968 + childrenComplexRefs = new List<WixComplexReferenceSymbol>();
969 parentGroups.Add(parentTypeAndId, childrenComplexRefs);
970 }
971
972 childrenComplexRefs.Add(wixComplexReferenceRow);
973 - section.Tuples.RemoveAt(i);
973 + section.Symbols.RemoveAt(i);
974
975 // Remember the mapping from set of complex references with a common
976 // parent to their section. We'll need this to add them back to the
@@ -1034,7 +1034,7 @@ namespace WixToolset.Core
1034 (ComplexReferenceParentType.ComponentGroup != wixComplexReferenceRow.ParentType) &&
1035 (ComplexReferenceParentType.PatchFamilyGroup != wixComplexReferenceRow.ParentType))
1036 {
1037 - section.AddTuple(wixComplexReferenceRow);
1037 + section.AddSymbol(wixComplexReferenceRow);
1038 }
1039 }
1040 }
@@ -1059,12 +1059,12 @@ namespace WixToolset.Core
1059 /// <param name="loopDetector">Stack of groups processed thus far. Used to detect loops.</param>
1060 /// <param name="parentGroups">Hash table of complex references grouped by parent id.</param>
1061 /// <param name="parentGroupsNeedingProcessing">Hash table of parent groups that still have nested groups that need to be flattened.</param>
1062 - private void FlattenGroup(string parentTypeAndId, Stack<string> loopDetector, Dictionary<string, List<WixComplexReferenceTuple>> parentGroups, Dictionary<string, IntermediateSection> parentGroupsNeedingProcessing)
1062 + private void FlattenGroup(string parentTypeAndId, Stack<string> loopDetector, Dictionary<string, List<WixComplexReferenceSymbol>> parentGroups, Dictionary<string, IntermediateSection> parentGroupsNeedingProcessing)
1063 {
1064 Debug.Assert(parentGroupsNeedingProcessing.ContainsKey(parentTypeAndId));
1065 loopDetector.Push(parentTypeAndId); // push this complex reference parent identfier into the stack for loop verifying
1066
1067 - var allNewChildComplexReferences = new List<WixComplexReferenceTuple>();
1067 + var allNewChildComplexReferences = new List<WixComplexReferenceSymbol>();
1068
1069 var referencesToParent = parentGroups[parentTypeAndId];
1070 foreach (var wixComplexReferenceRow in referencesToParent)
@@ -1158,7 +1158,7 @@ namespace WixToolset.Core
1158 }
1159 }
1160
1161 - int ComplexReferenceComparision(WixComplexReferenceTuple x, WixComplexReferenceTuple y)
1161 + int ComplexReferenceComparision(WixComplexReferenceSymbol x, WixComplexReferenceSymbol y)
1162 {
1163 var comparison = x.ChildType - y.ChildType;
1164 if (0 == comparison)
@@ -1242,11 +1242,11 @@ namespace WixToolset.Core
1242 /// </summary>
1243 /// <param name="featuresToFeatures">Feature to feature complex references.</param>
1244 /// <param name="allSymbols">All symbols loaded from the sections.</param>
1245 - private void ResolveFeatureToFeatureConnects(ConnectToFeatureCollection featuresToFeatures, IDictionary<string, TupleWithSection> allSymbols)
1245 + private void ResolveFeatureToFeatureConnects(ConnectToFeatureCollection featuresToFeatures, IDictionary<string, SymbolWithSection> allSymbols)
1246 {
1247 foreach (ConnectToFeature connection in featuresToFeatures)
1248 {
1249 - var wixSimpleReferenceRow = new WixSimpleReferenceTuple
1249 + var wixSimpleReferenceRow = new WixSimpleReferenceSymbol
1250 {
1251 Table = "Feature",
1252 PrimaryKeys = connection.ChildId
@@ -1254,8 +1254,8 @@ namespace WixToolset.Core
1254
1255 if (allSymbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbol))
1256 {
1257 - var featureTuple = (FeatureTuple)symbol.Tuple;
1258 - featureTuple.ParentFeatureRef = connection.PrimaryFeature;
1257 + var featureSymbol = (FeatureSymbol)symbol.Symbol;
1258 + featureSymbol.ParentFeatureRef = connection.PrimaryFeature;
1259 }
1260 }
1261 }
@@ -1308,15 +1308,15 @@ namespace WixToolset.Core
1308 /// <summary>
1309 /// Resolve features for columns that have null guid placeholders.
1310 /// </summary>
1311 - /// <param name="tuple">Tuple to resolve.</param>
1311 + /// <param name="symbol">Symbol to resolve.</param>
1312 /// <param name="connectionColumn">Number of the column containing the connection identifier.</param>
1313 /// <param name="featureColumn">Number of the column containing the feature.</param>
1314 /// <param name="connectToFeatures">Connect to feature complex references.</param>
1315 /// <param name="multipleFeatureComponents">Hashtable of known components under multiple features.</param>
1316 - private void ResolveFeatures(IntermediateTuple tuple, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents)
1316 + private void ResolveFeatures(IntermediateSymbol symbol, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents)
1317 {
1318 - var connectionId = connectionColumn < 0 ? tuple.Id.Id : tuple.AsString(connectionColumn);
1319 - var featureId = tuple.AsString(featureColumn);
1318 + var connectionId = connectionColumn < 0 ? symbol.Id.Id : symbol.AsString(connectionColumn);
1319 + var featureId = symbol.AsString(featureColumn);
1320
1321 if (EmptyGuid == featureId)
1322 {
@@ -1327,11 +1327,11 @@ namespace WixToolset.Core
1327 // display an error for the component or merge module as appropriate
1328 if (null != multipleFeatureComponents)
1329 {
1330 - this.Messaging.Write(ErrorMessages.ComponentExpectedFeature(tuple.SourceLineNumbers, connectionId, tuple.Definition.Name, tuple.Id.Id));
1330 + this.Messaging.Write(ErrorMessages.ComponentExpectedFeature(symbol.SourceLineNumbers, connectionId, symbol.Definition.Name, symbol.Id.Id));
1331 }
1332 else
1333 {
1334 - this.Messaging.Write(ErrorMessages.MergeModuleExpectedFeature(tuple.SourceLineNumbers, connectionId));
1334 + this.Messaging.Write(ErrorMessages.MergeModuleExpectedFeature(symbol.SourceLineNumbers, connectionId));
1335 }
1336 }
1337 else
@@ -1359,7 +1359,7 @@ namespace WixToolset.Core
1359 }
1360
1361 // set the feature
1362 - tuple.Set(featureColumn, connection.PrimaryFeature);
1362 + symbol.Set(featureColumn, connection.PrimaryFeature);
1363 }
1364 }
1365 }
src/WixToolset.Core/Resolver.cs
+25 -25
@@ -7,7 +7,7 @@ namespace WixToolset.Core
7 using System.Linq;
8 using WixToolset.Core.Bind;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Data;
13 using WixToolset.Extensibility.Services;
@@ -132,72 +132,72 @@ namespace WixToolset.Core
132 {
133 foreach (var section in context.IntermediateRepresentation.Sections)
134 {
135 - foreach (var tuple in section.Tuples.OfType<DialogTuple>())
135 + foreach (var symbol in section.Symbols.OfType<DialogSymbol>())
136 {
137 - if (this.VariableResolver.TryGetLocalizedControl(tuple.Id.Id, null, out var localizedControl))
137 + if (this.VariableResolver.TryGetLocalizedControl(symbol.Id.Id, null, out var localizedControl))
138 {
139 if (CompilerConstants.IntegerNotSet != localizedControl.X)
140 {
141 - tuple.HCentering = localizedControl.X;
141 + symbol.HCentering = localizedControl.X;
142 }
143
144 if (CompilerConstants.IntegerNotSet != localizedControl.Y)
145 {
146 - tuple.VCentering = localizedControl.Y;
146 + symbol.VCentering = localizedControl.Y;
147 }
148
149 if (CompilerConstants.IntegerNotSet != localizedControl.Width)
150 {
151 - tuple.Width = localizedControl.Width;
151 + symbol.Width = localizedControl.Width;
152 }
153
154 if (CompilerConstants.IntegerNotSet != localizedControl.Height)
155 {
156 - tuple.Height = localizedControl.Height;
156 + symbol.Height = localizedControl.Height;
157 }
158
159 - tuple.RightAligned |= localizedControl.RightAligned;
160 - tuple.RightToLeft |= localizedControl.RightToLeft;
161 - tuple.LeftScroll |= localizedControl.LeftScroll;
159 + symbol.RightAligned |= localizedControl.RightAligned;
160 + symbol.RightToLeft |= localizedControl.RightToLeft;
161 + symbol.LeftScroll |= localizedControl.LeftScroll;
162
163 if (!String.IsNullOrEmpty(localizedControl.Text))
164 {
165 - tuple.Title = localizedControl.Text;
165 + symbol.Title = localizedControl.Text;
166 }
167 }
168 }
169
170 - foreach (var tuple in section.Tuples.OfType<ControlTuple>())
170 + foreach (var symbol in section.Symbols.OfType<ControlSymbol>())
171 {
172 - if (this.VariableResolver.TryGetLocalizedControl(tuple.DialogRef, tuple.Control, out var localizedControl))
172 + if (this.VariableResolver.TryGetLocalizedControl(symbol.DialogRef, symbol.Control, out var localizedControl))
173 {
174 if (CompilerConstants.IntegerNotSet != localizedControl.X)
175 {
176 - tuple.X = localizedControl.X;
176 + symbol.X = localizedControl.X;
177 }
178
179 if (CompilerConstants.IntegerNotSet != localizedControl.Y)
180 {
181 - tuple.Y = localizedControl.Y;
181 + symbol.Y = localizedControl.Y;
182 }
183
184 if (CompilerConstants.IntegerNotSet != localizedControl.Width)
185 {
186 - tuple.Width = localizedControl.Width;
186 + symbol.Width = localizedControl.Width;
187 }
188
189 if (CompilerConstants.IntegerNotSet != localizedControl.Height)
190 {
191 - tuple.Height = localizedControl.Height;
191 + symbol.Height = localizedControl.Height;
192 }
193
194 - tuple.RightAligned |= localizedControl.RightAligned;
195 - tuple.RightToLeft |= localizedControl.RightToLeft;
196 - tuple.LeftScroll |= localizedControl.LeftScroll;
194 + symbol.RightAligned |= localizedControl.RightAligned;
195 + symbol.RightToLeft |= localizedControl.RightToLeft;
196 + symbol.LeftScroll |= localizedControl.LeftScroll;
197
198 if (!String.IsNullOrEmpty(localizedControl.Text))
199 {
200 - tuple.Text = localizedControl.Text;
200 + symbol.Text = localizedControl.Text;
201 }
202 }
203 }
@@ -215,10 +215,10 @@ namespace WixToolset.Core
215 }
216
217 // Gather all the wix variables.
218 - var wixVariableTuples = context.IntermediateRepresentation.Sections.SelectMany(s => s.Tuples).OfType<WixVariableTuple>();
219 - foreach (var tuple in wixVariableTuples)
218 + var wixVariableSymbols = context.IntermediateRepresentation.Sections.SelectMany(s => s.Symbols).OfType<WixVariableSymbol>();
219 + foreach (var symbol in wixVariableSymbols)
220 {
221 - this.VariableResolver.AddVariable(tuple.SourceLineNumbers, tuple.Id.Id, tuple.Value, tuple.Overridable);
221 + this.VariableResolver.AddVariable(symbol.SourceLineNumbers, symbol.Id.Id, symbol.Value, symbol.Overridable);
222 }
223
224 return codepage;
@@ -234,7 +234,7 @@ namespace WixToolset.Core
234 AddFilteredLocalizations(result, filter, localizations);
235
236 // Filter localizations provided by extensions with data.
237 - var creator = context.ServiceProvider.GetService<ITupleDefinitionCreator>();
237 + var creator = context.ServiceProvider.GetService<ISymbolDefinitionCreator>();
238
239 foreach (var data in context.ExtensionData)
240 {
src/WixToolset.Core/WixToolsetServiceProvider.cs
+1 -1
@@ -20,7 +20,7 @@ namespace WixToolset.Core
20 // Singletons.
21 this.AddService((provider, singletons) => AddSingleton<IExtensionManager>(singletons, new ExtensionManager(provider)));
22 this.AddService((provider, singletons) => AddSingleton<IMessaging>(singletons, new Messaging()));
23 - this.AddService((provider, singletons) => AddSingleton<ITupleDefinitionCreator>(singletons, new TupleDefinitionCreator(provider)));
23 + this.AddService((provider, singletons) => AddSingleton<ISymbolDefinitionCreator>(singletons, new SymbolDefinitionCreator(provider)));
24 this.AddService((provider, singletons) => AddSingleton<IParseHelper>(singletons, new ParseHelper(provider)));
25 this.AddService((provider, singletons) => AddSingleton<IPreprocessHelper>(singletons, new PreprocessHelper(provider)));
26 this.AddService((provider, singletons) => AddSingleton<IBackendHelper>(singletons, new BackendHelper(provider)));
src/test/Example.Extension/ExampleCompilerExtension.cs
+5 -5
@@ -92,8 +92,8 @@ namespace Example.Extension
92
93 if (!this.Messaging.EncounteredError)
94 {
95 - var tuple = this.ParseHelper.CreateTuple(section, sourceLineNumbers, "Example", id);
96 - tuple.Set(0, value);
95 + var symbol = this.ParseHelper.CreateSymbol(section, sourceLineNumbers, "Example", id);
96 + symbol.Set(0, value);
97 }
98 }
99
@@ -152,12 +152,12 @@ namespace Example.Extension
152
153 if (!this.Messaging.EncounteredError)
154 {
155 - this.ParseHelper.CreateWixSearchTuple(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, this.BundleExtensionId);
155 + this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, this.BundleExtensionId);
156 }
157
158 if (!this.Messaging.EncounteredError)
159 {
160 - var tuple = section.AddTuple(new ExampleSearchTuple(sourceLineNumbers, id)
160 + var symbol = section.AddSymbol(new ExampleSearchSymbol(sourceLineNumbers, id)
161 {
162 SearchFor = searchFor,
163 });
@@ -176,7 +176,7 @@ namespace Example.Extension
176 {
177 case "Id":
178 var refId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
179 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ExampleTupleDefinitions.ExampleSearch, refId);
179 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ExampleSymbolDefinitions.ExampleSearch, refId);
180 break;
181 default:
182 this.ParseHelper.UnexpectedAttribute(element, attrib);
src/test/Example.Extension/ExampleExtensionData.cs
+5 -5
@@ -9,15 +9,15 @@ namespace Example.Extension
9 {
10 public string DefaultCulture => null;
11
12 - public Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
12 + public Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions)
13 {
14 - return Intermediate.Load(typeof(ExampleExtensionData).Assembly, "Example.Extension.Example.wixlib", tupleDefinitions);
14 + return Intermediate.Load(typeof(ExampleExtensionData).Assembly, "Example.Extension.Example.wixlib", symbolDefinitions);
15 }
16
17 - public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
17 + public bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition)
18 {
19 - tupleDefinition = ExampleTupleDefinitions.ByName(name);
20 - return tupleDefinition != null;
19 + symbolDefinition = ExampleSymbolDefinitions.ByName(name);
20 + return symbolDefinition != null;
21 }
22 }
23 }
\ No newline at end of file
src/test/Example.Extension/ExampleSearchTuple.cs
+7 -7
@@ -4,27 +4,27 @@ namespace Example.Extension
4 {
5 using WixToolset.Data;
6
7 - public enum ExampleSearchTupleFields
7 + public enum ExampleSearchSymbolFields
8 {
9 SearchFor,
10 }
11
12 - public class ExampleSearchTuple : IntermediateTuple
12 + public class ExampleSearchSymbol : IntermediateSymbol
13 {
14 - public ExampleSearchTuple() : base(ExampleTupleDefinitions.ExampleSearch, null, null)
14 + public ExampleSearchSymbol() : base(ExampleSymbolDefinitions.ExampleSearch, null, null)
15 {
16 }
17
18 - public ExampleSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ExampleTupleDefinitions.ExampleSearch, sourceLineNumber, id)
18 + public ExampleSearchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ExampleSymbolDefinitions.ExampleSearch, sourceLineNumber, id)
19 {
20 }
21
22 - public IntermediateField this[ExampleTupleFields index] => this.Fields[(int)index];
22 + public IntermediateField this[ExampleSymbolFields index] => this.Fields[(int)index];
23
24 public string SearchFor
25 {
26 - get => this.Fields[(int)ExampleSearchTupleFields.SearchFor]?.AsString();
27 - set => this.Set((int)ExampleSearchTupleFields.SearchFor, value);
26 + get => this.Fields[(int)ExampleSearchSymbolFields.SearchFor]?.AsString();
27 + set => this.Set((int)ExampleSearchSymbolFields.SearchFor, value);
28 }
29 }
30 }
src/test/Example.Extension/ExampleTableDefinitions.cs
+3 -3
@@ -8,14 +8,14 @@ namespace Example.Extension
8 {
9 public static readonly TableDefinition ExampleTable = new TableDefinition(
10 "Wix4Example",
11 - ExampleTupleDefinitions.Example,
11 + ExampleSymbolDefinitions.Example,
12 new[]
13 {
14 new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier),
15 new ColumnDefinition("Value", ColumnType.String, 0, false, false, ColumnCategory.Formatted),
16 },
17 strongRowType: typeof(ExampleRow),
18 - tupleIdIsPrimaryKey: true
18 + symbolIdIsPrimaryKey: true
19 );
20
21 public static readonly TableDefinition NotInAll = new TableDefinition(
@@ -26,7 +26,7 @@ namespace Example.Extension
26 new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier),
27 new ColumnDefinition("Value", ColumnType.String, 0, false, false, ColumnCategory.Formatted),
28 },
29 - tupleIdIsPrimaryKey: true
29 + symbolIdIsPrimaryKey: true
30 );
31
32 public static readonly TableDefinition[] All = new[] { ExampleTable };
src/test/Example.Extension/ExampleTuple.cs
+7 -7
@@ -4,27 +4,27 @@ namespace Example.Extension
4 {
5 using WixToolset.Data;
6
7 - public enum ExampleTupleFields
7 + public enum ExampleSymbolFields
8 {
9 Value,
10 }
11
12 - public class ExampleTuple : IntermediateTuple
12 + public class ExampleSymbol : IntermediateSymbol
13 {
14 - public ExampleTuple() : base(ExampleTupleDefinitions.Example, null, null)
14 + public ExampleSymbol() : base(ExampleSymbolDefinitions.Example, null, null)
15 {
16 }
17
18 - public ExampleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ExampleTupleDefinitions.Example, sourceLineNumber, id)
18 + public ExampleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ExampleSymbolDefinitions.Example, sourceLineNumber, id)
19 {
20 }
21
22 - public IntermediateField this[ExampleTupleFields index] => this.Fields[(int)index];
22 + public IntermediateField this[ExampleSymbolFields index] => this.Fields[(int)index];
23
24 public string Value
25 {
26 - get => this.Fields[(int)ExampleTupleFields.Value]?.AsString();
27 - set => this.Set((int)ExampleTupleFields.Value, value);
26 + get => this.Fields[(int)ExampleSymbolFields.Value]?.AsString();
27 + set => this.Set((int)ExampleSymbolFields.Value, value);
28 }
29 }
30 }
src/test/Example.Extension/ExampleTupleDefinitions.cs
+20 -20
@@ -6,58 +6,58 @@ namespace Example.Extension
6 using WixToolset.Data;
7 using WixToolset.Data.Burn;
8
9 - public enum ExampleTupleDefinitionType
9 + public enum ExampleSymbolDefinitionType
10 {
11 Example,
12 ExampleSearch,
13 }
14
15 - public static class ExampleTupleDefinitions
15 + public static class ExampleSymbolDefinitions
16 {
17 - public static readonly IntermediateTupleDefinition Example = new IntermediateTupleDefinition(
18 - ExampleTupleDefinitionType.Example.ToString(),
17 + public static readonly IntermediateSymbolDefinition Example = new IntermediateSymbolDefinition(
18 + ExampleSymbolDefinitionType.Example.ToString(),
19 new[]
20 {
21 - new IntermediateFieldDefinition(nameof(ExampleTupleFields.Value), IntermediateFieldType.String),
21 + new IntermediateFieldDefinition(nameof(ExampleSymbolFields.Value), IntermediateFieldType.String),
22 },
23 - typeof(ExampleTuple));
23 + typeof(ExampleSymbol));
24
25 - public static readonly IntermediateTupleDefinition ExampleSearch = new IntermediateTupleDefinition(
26 - ExampleTupleDefinitionType.ExampleSearch.ToString(),
25 + public static readonly IntermediateSymbolDefinition ExampleSearch = new IntermediateSymbolDefinition(
26 + ExampleSymbolDefinitionType.ExampleSearch.ToString(),
27 new[]
28 {
29 - new IntermediateFieldDefinition(nameof(ExampleSearchTupleFields.SearchFor), IntermediateFieldType.String),
29 + new IntermediateFieldDefinition(nameof(ExampleSearchSymbolFields.SearchFor), IntermediateFieldType.String),
30 },
31 - typeof(ExampleSearchTuple));
31 + typeof(ExampleSearchSymbol));
32
33 - static ExampleTupleDefinitions()
33 + static ExampleSymbolDefinitions()
34 {
35 - ExampleSearch.AddTag(BurnConstants.BundleExtensionSearchTupleDefinitionTag);
35 + ExampleSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag);
36 }
37
38 - public static bool TryGetTupleType(string name, out ExampleTupleDefinitionType type)
38 + public static bool TryGetSymbolType(string name, out ExampleSymbolDefinitionType type)
39 {
40 return Enum.TryParse(name, out type);
41 }
42
43 - public static IntermediateTupleDefinition ByName(string name)
43 + public static IntermediateSymbolDefinition ByName(string name)
44 {
45 - if (!TryGetTupleType(name, out var type))
45 + if (!TryGetSymbolType(name, out var type))
46 {
47 return null;
48 }
49 return ByType(type);
50 }
51
52 - public static IntermediateTupleDefinition ByType(ExampleTupleDefinitionType type)
52 + public static IntermediateSymbolDefinition ByType(ExampleSymbolDefinitionType type)
53 {
54 switch (type)
55 {
56 - case ExampleTupleDefinitionType.Example:
57 - return ExampleTupleDefinitions.Example;
56 + case ExampleSymbolDefinitionType.Example:
57 + return ExampleSymbolDefinitions.Example;
58
59 - case ExampleTupleDefinitionType.ExampleSearch:
60 - return ExampleTupleDefinitions.ExampleSearch;
59 + case ExampleSymbolDefinitionType.ExampleSearch:
60 + return ExampleSymbolDefinitions.ExampleSearch;
61
62 default:
63 throw new ArgumentOutOfRangeException(nameof(type));
src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs
+8 -8
@@ -11,23 +11,23 @@ namespace Example.Extension
11 {
12 public override IEnumerable<TableDefinition> TableDefinitions => ExampleTableDefinitions.All;
13
14 - public override bool TryAddTupleToOutput(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinitionCollection tableDefinitions)
14 + public override bool TryAddSymbolToOutput(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinitionCollection tableDefinitions)
15 {
16 - if (ExampleTupleDefinitions.TryGetTupleType(tuple.Definition.Name, out var tupleType))
16 + if (ExampleSymbolDefinitions.TryGetSymbolType(symbol.Definition.Name, out var symbolType))
17 {
18 - switch (tupleType)
18 + switch (symbolType)
19 {
20 - case ExampleTupleDefinitionType.Example:
20 + case ExampleSymbolDefinitionType.Example:
21 {
22 - var row = (ExampleRow)this.BackendHelper.CreateRow(section, tuple, output, ExampleTableDefinitions.ExampleTable);
23 - row.Example = tuple.Id.Id;
24 - row.Value = tuple[0].AsString();
22 + var row = (ExampleRow)this.BackendHelper.CreateRow(section, symbol, output, ExampleTableDefinitions.ExampleTable);
23 + row.Example = symbol.Id.Id;
24 + row.Value = symbol[0].AsString();
25 }
26 return true;
27 }
28 }
29
30 - return base.TryAddTupleToOutput(section, tuple, output, tableDefinitions);
30 + return base.TryAddSymbolToOutput(section, symbol, output, tableDefinitions);
31 }
32 }
33 }
src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+7 -7
@@ -12,7 +12,7 @@ namespace WixToolsetTest.CoreIntegration
12 using WixToolset.Core.TestPackage;
13 using WixToolset.Data;
14 using WixToolset.Data.Burn;
15 - using WixToolset.Data.Tuples;
15 + using WixToolset.Data.Symbols;
16 using Xunit;
17
18 public class BundleFixture
@@ -81,14 +81,14 @@ namespace WixToolsetTest.CoreIntegration
81 var intermediate = Intermediate.Load(wixOutput);
82 var section = intermediate.Sections.Single();
83
84 - var bundleTuple = section.Tuples.OfType<WixBundleTuple>().Single();
85 - Assert.Equal("1.0.0.0", bundleTuple.Version);
84 + var bundleSymbol = section.Symbols.OfType<WixBundleSymbol>().Single();
85 + Assert.Equal("1.0.0.0", bundleSymbol.Version);
86
87 - var previousVersion = bundleTuple.Fields[(int)WixBundleTupleFields.Version].PreviousValue;
87 + var previousVersion = bundleSymbol.Fields[(int)WixBundleSymbolFields.Version].PreviousValue;
88 Assert.Equal("!(bind.packageVersion.test.msi)", previousVersion.AsString());
89
90 - var msiTuple = section.Tuples.OfType<WixBundlePackageTuple>().Single();
91 - Assert.Equal("test.msi", msiTuple.Id.Id);
90 + var msiSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single();
91 + Assert.Equal("test.msi", msiSymbol.Id.Id);
92
93 var extractResult = BundleExtractor.ExtractBAContainer(null, exePath, baFolderPath, extractFolderPath);
94 extractResult.AssertSuccess();
@@ -111,7 +111,7 @@ namespace WixToolsetTest.CoreIntegration
111
112 var registrationElements = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Registration");
113 var registrationElement = (XmlNode)Assert.Single(registrationElements);
114 - Assert.Equal($"<Registration Id='{bundleTuple.BundleId}' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='{bundleTuple.BundleId}'>" +
114 + Assert.Equal($"<Registration Id='{bundleSymbol.BundleId}' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='{bundleSymbol.BundleId}'>" +
115 "<Arp Register='yes' DisplayName='~TestBundle' DisplayVersion='1.0.0.0' Publisher='Example Corporation' />" +
116 "</Registration>", registrationElement.GetTestXml());
117 }
src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs
+7 -7
@@ -9,7 +9,7 @@ namespace WixToolsetTest.CoreIntegration
9 using WixBuildTools.TestSupport;
10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using Xunit;
14
15 public class ExtensionFixture
@@ -58,11 +58,11 @@ namespace WixToolsetTest.CoreIntegration
58 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\extest.wixpdb"));
59 var section = intermediate.Sections.Single();
60
61 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
62 - Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
63 - Assert.Equal(@"example.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
61 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
62 + Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
63 + Assert.Equal(@"example.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
64
65 - var example = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).Single();
65 + var example = section.Symbols.Where(t => t.Definition.Type == SymbolDefinitionType.MustBeFromAnExtension).Single();
66 Assert.Equal("Foo", example.Id?.Id);
67 Assert.Equal("Bar", example[0].AsString());
68 }
@@ -96,7 +96,7 @@ namespace WixToolsetTest.CoreIntegration
96 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\extest.wixpdb"));
97 var section = intermediate.Sections.Single();
98
99 - var property = section.Tuples.OfType<PropertyTuple>().Where(p => p.Id.Id == "ExampleProperty").Single();
99 + var property = section.Symbols.OfType<PropertySymbol>().Where(p => p.Id.Id == "ExampleProperty").Single();
100 Assert.Equal("ExampleProperty", property.Id.Id);
101 Assert.Equal("test", property.Value);
102 }
@@ -111,7 +111,7 @@ namespace WixToolsetTest.CoreIntegration
111 {
112 var intermediateFolder = fs.GetFolder();
113
114 - var exception = Assert.Throws<WixException>(() =>
114 + var exception = Assert.Throws<WixException>(() =>
115 WixRunner.Execute(new[]
116 {
117 "build",
src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
+6 -6
@@ -9,7 +9,7 @@ namespace WixToolsetTest.CoreIntegration
9 using WixToolset.Core;
10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using WixToolset.Extensibility.Data;
14 using WixToolset.Extensibility.Services;
15 using Xunit;
@@ -27,12 +27,12 @@ namespace WixToolsetTest.CoreIntegration
27 var messaging = serviceProvider.GetService<IMessaging>();
28 messaging.SetListener(listener);
29
30 - var creator = serviceProvider.GetService<ITupleDefinitionCreator>();
30 + var creator = serviceProvider.GetService<ISymbolDefinitionCreator>();
31 var context = serviceProvider.GetService<ILinkContext>();
32 context.Extensions = Enumerable.Empty<WixToolset.Extensibility.ILinkerExtension>();
33 context.ExtensionData = Enumerable.Empty<WixToolset.Extensibility.IExtensionData>();
34 context.Intermediates = new[] { intermediate1, intermediate2 };
35 - context.TupleDefinitionCreator = creator;
35 + context.SymbolDefinitionCreator = creator;
36
37 var linker = serviceProvider.GetService<ILinker>();
38 linker.Link(context);
@@ -72,10 +72,10 @@ namespace WixToolsetTest.CoreIntegration
72 var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb"));
73 var section = intermediate.Sections.Single();
74
75 - var actions = section.Tuples.OfType<WixActionTuple>().Where(wat => wat.Action.StartsWith("Set")).ToList();
75 + var actions = section.Symbols.OfType<WixActionSymbol>().Where(wat => wat.Action.StartsWith("Set")).ToList();
76 Assert.Equal(2, actions.Count);
77 - //Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path);
78 - //Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path);
77 + //Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileSymbolFields.Source].AsPath().Path);
78 + //Assert.Equal(@"test.txt", wixFile[WixFileSymbolFields.Source].PreviousValue.AsPath().Path);
79 }
80 }
81 }
src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs
+38 -38
@@ -9,7 +9,7 @@ namespace WixToolsetTest.CoreIntegration
9 using WixBuildTools.TestSupport;
10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using WixToolset.Data.WindowsInstaller;
14 using Xunit;
15
@@ -51,9 +51,9 @@ namespace WixToolsetTest.CoreIntegration
51
52 var section = intermediate.Sections.Single();
53
54 - var fileTuple = section.Tuples.OfType<FileTuple>().First();
55 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
56 - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
54 + var fileSymbol = section.Symbols.OfType<FileSymbol>().First();
55 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
56 + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
57 }
58 }
59
@@ -86,9 +86,9 @@ namespace WixToolsetTest.CoreIntegration
86 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
87 var section = intermediate.Sections.Single();
88
89 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
90 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
91 - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
89 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
90 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
91 + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
92 }
93 }
94
@@ -244,14 +244,14 @@ namespace WixToolsetTest.CoreIntegration
244 var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb"));
245 var section = intermediate.Sections.Single();
246
247 - var errors = section.Tuples.OfType<ErrorTuple>().ToDictionary(t => t.Id.Id);
247 + var errors = section.Symbols.OfType<ErrorSymbol>().ToDictionary(t => t.Id.Id);
248 Assert.Equal("Category 55 Emergency Doomsday Crisis", errors["1234"].Message.Trim());
249 Assert.Equal(" ", errors["5678"].Message);
250
251 - var customAction1 = section.Tuples.OfType<CustomActionTuple>().Where(t => t.Id.Id == "CanWeReferenceAnError_YesWeCan").Single();
251 + var customAction1 = section.Symbols.OfType<CustomActionSymbol>().Where(t => t.Id.Id == "CanWeReferenceAnError_YesWeCan").Single();
252 Assert.Equal("1234", customAction1.Target);
253
254 - var customAction2 = section.Tuples.OfType<CustomActionTuple>().Where(t => t.Id.Id == "TextErrorsWorkOKToo").Single();
254 + var customAction2 = section.Symbols.OfType<CustomActionSymbol>().Where(t => t.Id.Id == "TextErrorsWorkOKToo").Single();
255 Assert.Equal("If you see this, something went wrong.", customAction2.Target);
256 }
257 }
@@ -353,10 +353,10 @@ namespace WixToolsetTest.CoreIntegration
353 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
354 var section = intermediate.Sections.Single();
355
356 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
357 - Assert.Equal("filyIq8rqcxxf903Hsn5K9L0SWV73g", fileTuple.Id.Id);
358 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
359 - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
356 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
357 + Assert.Equal("filyIq8rqcxxf903Hsn5K9L0SWV73g", fileSymbol.Id.Id);
358 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
359 + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
360
361 var data = WindowsInstallerData.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
362 var fileRows = data.Tables["File"].Rows;
@@ -405,15 +405,15 @@ namespace WixToolsetTest.CoreIntegration
405 var intermediate = Intermediate.Load(pdbPath);
406 var section = intermediate.Sections.Single();
407
408 - var upgradeTuple = section.Tuples.OfType<UpgradeTuple>().Single();
409 - Assert.False(upgradeTuple.ExcludeLanguages);
410 - Assert.True(upgradeTuple.IgnoreRemoveFailures);
411 - Assert.False(upgradeTuple.VersionMaxInclusive);
412 - Assert.True(upgradeTuple.VersionMinInclusive);
413 - Assert.Equal("13.0.0", upgradeTuple.VersionMax);
414 - Assert.Equal("12.0.0", upgradeTuple.VersionMin);
415 - Assert.False(upgradeTuple.OnlyDetect);
416 - Assert.Equal("BLAHBLAHBLAH", upgradeTuple.ActionProperty);
408 + var upgradeSymbol = section.Symbols.OfType<UpgradeSymbol>().Single();
409 + Assert.False(upgradeSymbol.ExcludeLanguages);
410 + Assert.True(upgradeSymbol.IgnoreRemoveFailures);
411 + Assert.False(upgradeSymbol.VersionMaxInclusive);
412 + Assert.True(upgradeSymbol.VersionMinInclusive);
413 + Assert.Equal("13.0.0", upgradeSymbol.VersionMax);
414 + Assert.Equal("12.0.0", upgradeSymbol.VersionMin);
415 + Assert.False(upgradeSymbol.OnlyDetect);
416 + Assert.Equal("BLAHBLAHBLAH", upgradeSymbol.ActionProperty);
417
418 var pdb = WindowsInstallerData.Load(pdbPath, suppressVersionCheck: false);
419 var secureProperties = pdb.Tables["Property"].Rows.Where(row => row.GetKey() == "SecureCustomProperties").Single();
@@ -581,9 +581,9 @@ namespace WixToolsetTest.CoreIntegration
581 var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb"));
582 var section = intermediate.Sections.Single();
583
584 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
585 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
586 - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
584 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
585 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
586 + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
587 }
588 }
589
@@ -617,11 +617,11 @@ namespace WixToolsetTest.CoreIntegration
617 var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb"));
618 var section = intermediate.Sections.Single();
619
620 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
621 - Assert.Equal(Path.Combine(folder, @"data\candle.exe"), fileTuple[FileTupleFields.Source].AsPath().Path);
622 - Assert.Equal(@"candle.exe", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
620 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
621 + Assert.Equal(Path.Combine(folder, @"data\candle.exe"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
622 + Assert.Equal(@"candle.exe", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
623
624 - var msiAssemblyNameTuples = section.Tuples.OfType<MsiAssemblyNameTuple>();
624 + var msiAssemblyNameSymbols = section.Symbols.OfType<MsiAssemblyNameSymbol>();
625 Assert.Equal(new[]
626 {
627 "culture",
@@ -630,7 +630,7 @@ namespace WixToolsetTest.CoreIntegration
630 "processorArchitecture",
631 "publicKeyToken",
632 "version"
633 - }, msiAssemblyNameTuples.OrderBy(a => a.Name).Select(a => a.Name).ToArray());
633 + }, msiAssemblyNameSymbols.OrderBy(a => a.Name).Select(a => a.Name).ToArray());
634
635 Assert.Equal(new[]
636 {
@@ -640,7 +640,7 @@ namespace WixToolsetTest.CoreIntegration
640 "x86",
641 "256B3414DFA97718",
642 "3.0.0.0"
643 - }, msiAssemblyNameTuples.OrderBy(a => a.Name).Select(a => a.Value).ToArray());
643 + }, msiAssemblyNameSymbols.OrderBy(a => a.Name).Select(a => a.Value).ToArray());
644 }
645 }
646
@@ -671,7 +671,7 @@ namespace WixToolsetTest.CoreIntegration
671 var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb"));
672 var section = intermediate.Sections.Single();
673
674 - var platformSummary = section.Tuples.OfType<SummaryInformationTuple>().Single(s => s.PropertyId == SummaryInformationType.PlatformAndLanguage);
674 + var platformSummary = section.Symbols.OfType<SummaryInformationSymbol>().Single(s => s.PropertyId == SummaryInformationType.PlatformAndLanguage);
675 Assert.Equal("x64;1033", platformSummary.Value);
676 }
677 }
@@ -704,12 +704,12 @@ namespace WixToolsetTest.CoreIntegration
704 var section = intermediate.Sections.Single();
705
706 // Only one component is shared.
707 - var sharedComponentTuples = section.Tuples.OfType<ComponentTuple>();
708 - Assert.Equal(1, sharedComponentTuples.Sum(t => t.Shared ? 1 : 0));
707 + var sharedComponentSymbols = section.Symbols.OfType<ComponentSymbol>();
708 + Assert.Equal(1, sharedComponentSymbols.Sum(t => t.Shared ? 1 : 0));
709
710 // And it is this one.
711 - var sharedComponentTuple = sharedComponentTuples.Single(t => t.Id.Id == "Shared.dll");
712 - Assert.True(sharedComponentTuple.Shared);
711 + var sharedComponentSymbol = sharedComponentSymbols.Single(t => t.Id.Id == "Shared.dll");
712 + Assert.True(sharedComponentSymbol.Shared);
713 }
714 }
715
@@ -775,7 +775,7 @@ namespace WixToolsetTest.CoreIntegration
775 var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb"));
776 var section = intermediate.Sections.Single();
777
778 - var progids = section.Tuples.OfType<ProgIdTuple>().OrderBy(tuple => tuple.ProgId).ToList();
778 + var progids = section.Symbols.OfType<ProgIdSymbol>().OrderBy(symbol => symbol.ProgId).ToList();
779 Assert.Equal(new[]
780 {
781 "Foo.File.hol",
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+2 -2
@@ -9,7 +9,7 @@ namespace WixToolsetTest.CoreIntegration
9 using WixBuildTools.TestSupport;
10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using WixToolset.Data.WindowsInstaller;
14 using Xunit;
15
@@ -1074,7 +1074,7 @@ namespace WixToolsetTest.CoreIntegration
1074
1075 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
1076 var section = intermediate.Sections.Single();
1077 - Assert.Empty(section.Tuples.OfType<FileTuple>());
1077 + Assert.Empty(section.Symbols.OfType<FileSymbol>());
1078
1079 var data = WindowsInstallerData.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
1080 Assert.Null(data.Tables["File"]);
src/test/WixToolsetTest.CoreIntegration/ParseFixture.cs
+2 -2
@@ -5,7 +5,7 @@ namespace WixToolsetTest.CoreIntegration
5 using System.Linq;
6 using WixToolset.Core;
7 using WixToolset.Data;
8 - using WixToolset.Data.Tuples;
8 + using WixToolset.Data.Symbols;
9 using WixToolset.Extensibility.Data;
10 using WixToolset.Extensibility.Services;
11 using Xunit;
@@ -25,7 +25,7 @@ namespace WixToolsetTest.CoreIntegration
25 parseHelper.CreateCustomActionReference(null, section, "CustomAction", Platform.X64, CustomActionPlatforms.X86 | CustomActionPlatforms.ARM);
26 parseHelper.CreateCustomActionReference(null, section, "CustomAction", Platform.X64, CustomActionPlatforms.X86 | CustomActionPlatforms.X64);
27
28 - var simpleReferences = section.Tuples.OfType<WixSimpleReferenceTuple>();
28 + var simpleReferences = section.Symbols.OfType<WixSimpleReferenceSymbol>();
29 Assert.NotNull(simpleReferences.Where(t => t.SymbolicName == "CustomAction:Wix4CustomAction32_X86").FirstOrDefault());
30 Assert.NotNull(simpleReferences.Where(t => t.SymbolicName == "CustomAction:Wix4CustomArmAction_X86").FirstOrDefault());
31 Assert.NotNull(simpleReferences.Where(t => t.SymbolicName == "CustomAction:Wix4CustomArmAction_A64").FirstOrDefault());
src/test/WixToolsetTest.CoreIntegration/WixiplFixture.cs
+14 -14
@@ -8,7 +8,7 @@ namespace WixToolsetTest.CoreIntegration
8 using WixBuildTools.TestSupport;
9 using WixToolset.Core.TestPackage;
10 using WixToolset.Data;
11 - using WixToolset.Data.Tuples;
11 + using WixToolset.Data.Symbols;
12 using Example.Extension;
13 using Xunit;
14
@@ -62,9 +62,9 @@ namespace WixToolsetTest.CoreIntegration
62
63 var section = intermediate.Sections.Single();
64
65 - var fileTuple = section.Tuples.OfType<FileTuple>().First();
66 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
67 - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
65 + var fileSymbol = section.Symbols.OfType<FileSymbol>().First();
66 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
67 + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
68 }
69 }
70
@@ -132,14 +132,14 @@ namespace WixToolsetTest.CoreIntegration
132 var section = intermediate.Sections.Single();
133
134 {
135 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
136 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
137 - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
135 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
136 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
137 + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
138 }
139
140 {
141 - var binary = section.Tuples.OfType<BinaryTuple>().Single();
142 - var path = binary[BinaryTupleFields.Data].AsPath().Path;
141 + var binary = section.Symbols.OfType<BinarySymbol>().Single();
142 + var path = binary[BinarySymbolFields.Data].AsPath().Path;
143 Assert.StartsWith(Path.Combine(baseFolder, @"obj\Example.Extension"), path);
144 Assert.EndsWith(@"wix-ir\example.txt", path);
145 Assert.Equal(@"BinFromWir", binary.Id.Id);
@@ -187,14 +187,14 @@ namespace WixToolsetTest.CoreIntegration
187 var section = intermediate.Sections.Single();
188
189 {
190 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
191 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
192 - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
190 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
191 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
192 + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
193 }
194
195 {
196 - var binary = section.Tuples.OfType<BinaryTuple>().Single();
197 - var path = binary[BinaryTupleFields.Data].AsPath().Path;
196 + var binary = section.Symbols.OfType<BinarySymbol>().Single();
197 + var path = binary[BinarySymbolFields.Data].AsPath().Path;
198 Assert.StartsWith(Path.Combine(baseFolder, @"obj\test"), path);
199 Assert.EndsWith(@"wix-ir\example.txt", path);
200 Assert.Equal(@"BinFromWir", binary.Id.Id);
src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
+19 -19
@@ -9,7 +9,7 @@ namespace WixToolsetTest.CoreIntegration
9 using WixBuildTools.TestSupport;
10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data;
12 - using WixToolset.Data.Tuples;
12 + using WixToolset.Data.Symbols;
13 using Xunit;
14
15 public class WixlibFixture
@@ -80,11 +80,11 @@ namespace WixToolsetTest.CoreIntegration
80 result.AssertSuccess();
81
82 var wixlib = Intermediate.Load(wixlibPath);
83 - var binaryTuples = wixlib.Sections.SelectMany(s => s.Tuples).OfType<BinaryTuple>().ToList();
84 - Assert.Equal(3, binaryTuples.Count);
85 - Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll"));
86 - Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll-1"));
87 - Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll-2"));
83 + var binarySymbols = wixlib.Sections.SelectMany(s => s.Symbols).OfType<BinarySymbol>().ToList();
84 + Assert.Equal(3, binarySymbols.Count);
85 + Assert.Single(binarySymbols.Where(t => t.Data.Path == "wix-ir/foo.dll"));
86 + Assert.Single(binarySymbols.Where(t => t.Data.Path == "wix-ir/foo.dll-1"));
87 + Assert.Single(binarySymbols.Where(t => t.Data.Path == "wix-ir/foo.dll-2"));
88 }
89 }
90
@@ -138,9 +138,9 @@ namespace WixToolsetTest.CoreIntegration
138
139 var section = intermediate.Sections.Single();
140
141 - var wixFile = section.Tuples.OfType<FileTuple>().First();
142 - Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[FileTupleFields.Source].AsPath().Path);
143 - Assert.Equal(@"test.txt", wixFile[FileTupleFields.Source].PreviousValue.AsPath().Path);
141 + var wixFile = section.Symbols.OfType<FileSymbol>().First();
142 + Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[FileSymbolFields.Source].AsPath().Path);
143 + Assert.Equal(@"test.txt", wixFile[FileSymbolFields.Source].PreviousValue.AsPath().Path);
144 }
145 }
146
@@ -183,11 +183,11 @@ namespace WixToolsetTest.CoreIntegration
183 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
184 var section = intermediate.Sections.Single();
185
186 - var fileTuple = section.Tuples.OfType<FileTuple>().Single();
187 - Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileTuple[FileTupleFields.Source].AsPath().Path);
188 - Assert.Equal(@"example.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
186 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
187 + Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
188 + Assert.Equal(@"example.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
189
190 - var example = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).Single();
190 + var example = section.Symbols.Where(t => t.Definition.Type == SymbolDefinitionType.MustBeFromAnExtension).Single();
191 Assert.Equal("Foo", example.Id?.Id);
192 Assert.Equal("Bar", example[0].AsString());
193 }
@@ -244,13 +244,13 @@ namespace WixToolsetTest.CoreIntegration
244 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
245 var section = intermediate.Sections.Single();
246
247 - var fileTuples = section.Tuples.OfType<FileTuple>().OrderBy(t => Path.GetFileName(t.Source.Path)).ToArray();
248 - Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileTuples[0][FileTupleFields.Source].AsPath().Path);
249 - Assert.Equal(@"example.txt", fileTuples[0][FileTupleFields.Source].PreviousValue.AsPath().Path);
250 - Assert.Equal(Path.Combine(folder, @"data\other.txt"), fileTuples[1][FileTupleFields.Source].AsPath().Path);
251 - Assert.Equal(@"other.txt", fileTuples[1][FileTupleFields.Source].PreviousValue.AsPath().Path);
247 + var fileSymbols = section.Symbols.OfType<FileSymbol>().OrderBy(t => Path.GetFileName(t.Source.Path)).ToArray();
248 + Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileSymbols[0][FileSymbolFields.Source].AsPath().Path);
249 + Assert.Equal(@"example.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath().Path);
250 + Assert.Equal(Path.Combine(folder, @"data\other.txt"), fileSymbols[1][FileSymbolFields.Source].AsPath().Path);
251 + Assert.Equal(@"other.txt", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath().Path);
252
253 - var examples = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).ToArray();
253 + var examples = section.Symbols.Where(t => t.Definition.Type == SymbolDefinitionType.MustBeFromAnExtension).ToArray();
254 Assert.Equal(new string[] { "Foo", "Other" }, examples.Select(t => t.Id?.Id).ToArray());
255 Assert.Equal(new[] { "Bar", "Value" }, examples.Select(t => t[0].AsString()).ToArray());
256 }
src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs
+8 -8
@@ -7,7 +7,7 @@ namespace WixToolsetTest.CoreIntegration
7 using WixBuildTools.TestSupport;
8 using WixToolset.Core.TestPackage;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using Xunit;
12
13 public class WixlibQueryFixture
@@ -34,9 +34,9 @@ namespace WixToolsetTest.CoreIntegration
34 result.AssertSuccess();
35
36 var intermediate = Intermediate.Load(wixlibPath);
37 - var allTuples = intermediate.Sections.SelectMany(s => s.Tuples);
38 - var wixSimpleRefTuples = allTuples.OfType<WixSimpleReferenceTuple>();
39 - var repRef = wixSimpleRefTuples.Where(t => t.Table == "WixAction" &&
37 + var allSymbols = intermediate.Sections.SelectMany(s => s.Symbols);
38 + var wixSimpleRefSymbols = allSymbols.OfType<WixSimpleReferenceSymbol>();
39 + var repRef = wixSimpleRefSymbols.Where(t => t.Table == "WixAction" &&
40 t.PrimaryKeys == "InstallExecuteSequence/RemoveExistingProducts")
41 .SingleOrDefault();
42 Assert.NotNull(repRef);
@@ -65,12 +65,12 @@ namespace WixToolsetTest.CoreIntegration
65 result.AssertSuccess();
66
67 var intermediate = Intermediate.Load(wixlibPath);
68 - var allTuples = intermediate.Sections.SelectMany(s => s.Tuples);
69 - var typeLibTuple = allTuples.OfType<TypeLibTuple>()
68 + var allSymbols = intermediate.Sections.SelectMany(s => s.Symbols);
69 + var typeLibSymbol = allSymbols.OfType<TypeLibSymbol>()
70 .SingleOrDefault();
71 - Assert.NotNull(typeLibTuple);
71 + Assert.NotNull(typeLibSymbol);
72
73 - var fields = typeLibTuple.Fields.Select(field => field?.Type == IntermediateFieldType.Bool
73 + var fields = typeLibSymbol.Fields.Select(field => field?.Type == IntermediateFieldType.Bool
74 ? field.AsNullableNumber()?.ToString()
75 : field?.AsString())
76 .ToList();