From 38afa9e7bc7eacc021f8805f607368a05751e3c3 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 25 Jun 2020 14:43:50 -0700 Subject: The Great Tuple to Symbol Rename (tm) --- src/WixToolset.Core/Bind/DelayedField.cs | 12 +- src/WixToolset.Core/Bind/FileFacade.cs | 58 ++-- src/WixToolset.Core/Bind/FileResolver.cs | 16 +- .../Bind/ResolveDelayedFieldsCommand.cs | 10 +- src/WixToolset.Core/Bind/ResolveFieldsCommand.cs | 38 +-- src/WixToolset.Core/Binder.cs | 10 +- src/WixToolset.Core/CommandLine/BuildCommand.cs | 10 +- src/WixToolset.Core/Compiler.cs | 328 ++++++++++----------- src/WixToolset.Core/CompilerCore.cs | 48 +-- src/WixToolset.Core/Compiler_2.cs | 206 ++++++------- src/WixToolset.Core/Compiler_Bundle.cs | 142 ++++----- src/WixToolset.Core/Compiler_EmbeddedUI.cs | 12 +- src/WixToolset.Core/Compiler_Module.cs | 32 +- src/WixToolset.Core/Compiler_Patch.cs | 16 +- src/WixToolset.Core/Compiler_PatchCreation.cs | 38 +-- src/WixToolset.Core/Compiler_UI.cs | 170 +++++------ .../ExtensibilityServices/ParseHelper.cs | 126 ++++---- .../TupleDefinitionCreator.cs | 24 +- src/WixToolset.Core/Librarian.cs | 10 +- .../Link/FindEntrySectionAndLoadSymbolsCommand.cs | 34 +-- .../Link/IntermediateTupleExtensions.cs | 8 +- .../Link/ReportConflictingTuplesCommand.cs | 18 +- .../Link/ResolveReferencesCommand.cs | 104 +++---- .../Link/WixComplexReferenceTupleExtensions.cs | 32 +- src/WixToolset.Core/Link/WixGroupingOrdering.cs | 16 +- src/WixToolset.Core/LinkContext.cs | 2 +- src/WixToolset.Core/Linker.cs | 178 +++++------ src/WixToolset.Core/Resolver.cs | 50 ++-- src/WixToolset.Core/WixToolsetServiceProvider.cs | 2 +- 29 files changed, 875 insertions(+), 875 deletions(-) (limited to 'src/WixToolset.Core') diff --git a/src/WixToolset.Core/Bind/DelayedField.cs b/src/WixToolset.Core/Bind/DelayedField.cs index 7d0045e6..25641516 100644 --- a/src/WixToolset.Core/Bind/DelayedField.cs +++ b/src/WixToolset.Core/Bind/DelayedField.cs @@ -6,26 +6,26 @@ namespace WixToolset.Core.Bind using WixToolset.Extensibility.Data; /// - /// Structure used to hold a row and field that contain binder variables, which need to be resolved + /// Holds a symbol and field that contain binder variables, which need to be resolved /// later, once the files have been resolved. /// internal class DelayedField : IDelayedField { /// - /// Basic constructor for struct + /// Creates a delayed field. /// - /// Row for the field. + /// Symbol for the field. /// Field needing further resolution. - public DelayedField(IntermediateTuple row, IntermediateField field) + public DelayedField(IntermediateSymbol symbol, IntermediateField field) { - this.Row = row; + this.Symbol = symbol; this.Field = field; } /// /// The row containing the field. /// - public IntermediateTuple Row { get; } + public IntermediateSymbol Symbol { get; } /// /// The field needing further resolving. diff --git a/src/WixToolset.Core/Bind/FileFacade.cs b/src/WixToolset.Core/Bind/FileFacade.cs index 511f4aab..075d3d34 100644 --- a/src/WixToolset.Core/Bind/FileFacade.cs +++ b/src/WixToolset.Core/Bind/FileFacade.cs @@ -5,25 +5,25 @@ namespace WixToolset.Core.Bind using System; using System.Collections.Generic; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Data.WindowsInstaller.Rows; public class FileFacade { - public FileFacade(FileTuple file, AssemblyTuple assembly) + public FileFacade(FileSymbol file, AssemblySymbol assembly) { - this.FileTuple = file; - this.AssemblyTuple = assembly; + this.FileSymbol = file; + this.AssemblySymbol = assembly; this.Identifier = file.Id; this.ComponentRef = file.ComponentRef; } - public FileFacade(bool fromModule, FileTuple file) + public FileFacade(bool fromModule, FileSymbol file) { this.FromModule = fromModule; - this.FileTuple = file; + this.FileSymbol = file; this.Identifier = file.Id; this.ComponentRef = file.ComponentRef; @@ -44,9 +44,9 @@ namespace WixToolset.Core.Bind private FileRow FileRow { get; } - private FileTuple FileTuple { get; } + private FileSymbol FileSymbol { get; } - private AssemblyTuple AssemblyTuple { get; } + private AssemblySymbol AssemblySymbol { get; } public string Id => this.Identifier.Id; @@ -56,12 +56,12 @@ namespace WixToolset.Core.Bind public int DiskId { - get => this.FileRow == null ? this.FileTuple.DiskId ?? 1 : this.FileRow.DiskId; + get => this.FileRow == null ? this.FileSymbol.DiskId ?? 1 : this.FileRow.DiskId; set { if (this.FileRow == null) { - this.FileTuple.DiskId = value; + this.FileSymbol.DiskId = value; } else { @@ -70,16 +70,16 @@ namespace WixToolset.Core.Bind } } - public string FileName => this.FileRow == null ? this.FileTuple.Name : this.FileRow.FileName; + public string FileName => this.FileRow == null ? this.FileSymbol.Name : this.FileRow.FileName; public int FileSize { - get => this.FileRow == null ? this.FileTuple.FileSize : this.FileRow.FileSize; + get => this.FileRow == null ? this.FileSymbol.FileSize : this.FileRow.FileSize; set { if (this.FileRow == null) { - this.FileTuple.FileSize = value; + this.FileSymbol.FileSize = value; } else { @@ -90,12 +90,12 @@ namespace WixToolset.Core.Bind public string Language { - get => this.FileRow == null ? this.FileTuple.Language : this.FileRow.Language; + get => this.FileRow == null ? this.FileSymbol.Language : this.FileRow.Language; set { if (this.FileRow == null) { - this.FileTuple.Language = value; + this.FileSymbol.Language = value; } else { @@ -104,16 +104,16 @@ namespace WixToolset.Core.Bind } } - public int? PatchGroup => this.FileRow == null ? this.FileTuple.PatchGroup : null; + public int? PatchGroup => this.FileRow == null ? this.FileSymbol.PatchGroup : null; public int Sequence { - get => this.FileRow == null ? this.FileTuple.Sequence : this.FileRow.Sequence; + get => this.FileRow == null ? this.FileSymbol.Sequence : this.FileRow.Sequence; set { if (this.FileRow == null) { - this.FileTuple.Sequence = value; + this.FileSymbol.Sequence = value; } else { @@ -122,22 +122,22 @@ namespace WixToolset.Core.Bind } } - public SourceLineNumber SourceLineNumber => this.FileRow == null ? this.FileTuple.SourceLineNumbers : this.FileRow.SourceLineNumbers; + public SourceLineNumber SourceLineNumber => this.FileRow == null ? this.FileSymbol.SourceLineNumbers : this.FileRow.SourceLineNumbers; - public string SourcePath => this.FileRow == null ? this.FileTuple.Source.Path : this.FileRow.Source; + public string SourcePath => this.FileRow == null ? this.FileSymbol.Source.Path : this.FileRow.Source; - public bool Compressed => this.FileRow == null ? (this.FileTuple.Attributes & FileTupleAttributes.Compressed) == FileTupleAttributes.Compressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesCompressed) == WindowsInstallerConstants.MsidbFileAttributesCompressed; + public bool Compressed => this.FileRow == null ? (this.FileSymbol.Attributes & FileSymbolAttributes.Compressed) == FileSymbolAttributes.Compressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesCompressed) == WindowsInstallerConstants.MsidbFileAttributesCompressed; - public bool Uncompressed => this.FileRow == null ? (this.FileTuple.Attributes & FileTupleAttributes.Uncompressed) == FileTupleAttributes.Uncompressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesNoncompressed) == WindowsInstallerConstants.MsidbFileAttributesNoncompressed; + public bool Uncompressed => this.FileRow == null ? (this.FileSymbol.Attributes & FileSymbolAttributes.Uncompressed) == FileSymbolAttributes.Uncompressed : (this.FileRow.Attributes & WindowsInstallerConstants.MsidbFileAttributesNoncompressed) == WindowsInstallerConstants.MsidbFileAttributesNoncompressed; public string Version { - get => this.FileRow == null ? this.FileTuple.Version : this.FileRow.Version; + get => this.FileRow == null ? this.FileSymbol.Version : this.FileRow.Version; set { if (this.FileRow == null) { - this.FileTuple.Version = value; + this.FileSymbol.Version = value; } else { @@ -146,22 +146,22 @@ namespace WixToolset.Core.Bind } } - public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblyTuple?.Type : null; + public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblySymbol?.Type : null; - public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblyTuple?.ApplicationFileRef : throw new NotImplementedException(); + public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblySymbol?.ApplicationFileRef : throw new NotImplementedException(); - public string AssemblyManifestFileRef => this.FileRow == null ? this.AssemblyTuple?.ManifestFileRef : throw new NotImplementedException(); + public string AssemblyManifestFileRef => this.FileRow == null ? this.AssemblySymbol?.ManifestFileRef : throw new NotImplementedException(); /// /// Gets the set of MsiAssemblyName rows created for this file. /// /// RowCollection of MsiAssemblyName table. - public List AssemblyNames { get; set; } + public List AssemblyNames { get; set; } /// /// Gets or sets the MsiFileHash row for this file. /// - public MsiFileHashTuple Hash { get; set; } + public MsiFileHashSymbol Hash { get; set; } /// /// Allows direct access to the underlying FileRow as requried for patching. diff --git a/src/WixToolset.Core/Bind/FileResolver.cs b/src/WixToolset.Core/Bind/FileResolver.cs index 6bc5a676..d11fcadc 100644 --- a/src/WixToolset.Core/Bind/FileResolver.cs +++ b/src/WixToolset.Core/Bind/FileResolver.cs @@ -41,13 +41,13 @@ namespace WixToolset.Core.Bind private IEnumerable LibrarianExtensions { get; } - public string Resolve(SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, string source) + public string Resolve(SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, string source) { var checkedPaths = new List(); foreach (var extension in this.LibrarianExtensions) { - var resolved = extension.ResolveFile(sourceLineNumbers, tupleDefinition, source); + var resolved = extension.ResolveFile(sourceLineNumbers, symbolDefinition, source); if (resolved?.CheckedPaths != null) { @@ -60,7 +60,7 @@ namespace WixToolset.Core.Bind } } - return this.MustResolveUsingBindPaths(source, tupleDefinition, sourceLineNumbers, BindStage.Normal, checkedPaths); + return this.MustResolveUsingBindPaths(source, symbolDefinition, sourceLineNumbers, BindStage.Normal, checkedPaths); } /// @@ -72,7 +72,7 @@ namespace WixToolset.Core.Bind /// The binding stage used to determine what collection of bind paths will be used /// Optional collection of paths already checked. /// Should return a valid path for the stream to be imported. - public string ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, IEnumerable alreadyCheckedPaths = null) + public string ResolveFile(string source, IntermediateSymbolDefinition symbolDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, IEnumerable alreadyCheckedPaths = null) { var checkedPaths = new List(); @@ -83,7 +83,7 @@ namespace WixToolset.Core.Bind foreach (var extension in this.ResolverExtensions) { - var resolved = extension.ResolveFile(source, tupleDefinition, sourceLineNumbers, bindStage); + var resolved = extension.ResolveFile(source, symbolDefinition, sourceLineNumbers, bindStage); if (resolved?.CheckedPaths != null) { @@ -96,10 +96,10 @@ namespace WixToolset.Core.Bind } } - return this.MustResolveUsingBindPaths(source, tupleDefinition, sourceLineNumbers, bindStage, checkedPaths); + return this.MustResolveUsingBindPaths(source, symbolDefinition, sourceLineNumbers, bindStage, checkedPaths); } - private string MustResolveUsingBindPaths(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, List checkedPaths) + private string MustResolveUsingBindPaths(string source, IntermediateSymbolDefinition symbolDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, List checkedPaths) { string resolved = null; @@ -180,7 +180,7 @@ namespace WixToolset.Core.Bind if (null == resolved) { - throw new WixException(ErrorMessages.FileNotFound(sourceLineNumbers, source, tupleDefinition.Name, checkedPaths)); + throw new WixException(ErrorMessages.FileNotFound(sourceLineNumbers, source, symbolDefinition.Name, checkedPaths)); } return resolved; diff --git a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs index be0e4578..a10b98dc 100644 --- a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs +++ b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs @@ -42,15 +42,15 @@ namespace WixToolset.Core.Bind { try { - var propertyRow = delayedField.Row; + var propertySymbol = delayedField.Symbol; // process properties first in case they refer to other binder variables - if (delayedField.Row.Definition.Type == TupleDefinitionType.Property) + if (delayedField.Symbol.Definition.Type == SymbolDefinitionType.Property) { - var value = ResolveDelayedVariables(propertyRow.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache); + var value = ResolveDelayedVariables(propertySymbol.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache); // update the variable cache with the new value - var key = String.Concat("property.", propertyRow.AsString(0)); + var key = String.Concat("property.", propertySymbol.Id.Id); this.VariableCache[key] = value; // update the field data @@ -103,7 +103,7 @@ namespace WixToolset.Core.Bind { try { - var value = ResolveDelayedVariables(delayedField.Row.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache); + var value = ResolveDelayedVariables(delayedField.Symbol.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache); delayedField.Field.Set(value); } catch (WixException we) diff --git a/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs b/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs index af7e262a..629e5f28 100644 --- a/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs +++ b/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs @@ -6,7 +6,7 @@ namespace WixToolset.Core.Bind using System.Collections.Generic; using System.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; @@ -45,13 +45,13 @@ namespace WixToolset.Core.Bind var fileResolver = new FileResolver(this.BindPaths, this.Extensions); // Build the column lookup only when needed. - Dictionary customColumnsById = null; + Dictionary customColumnsById = null; foreach (var sections in this.Intermediate.Sections) { - foreach (var tuple in sections.Tuples) + foreach (var symbol in sections.Symbols) { - foreach (var field in tuple.Fields) + foreach (var field in symbol.Fields) { if (field.IsNull()) { @@ -63,20 +63,20 @@ namespace WixToolset.Core.Bind // Custom table cells require an extra look up to the column definition as the // cell's data type is always a string (because strings can store anything) but // the column definition may be more specific. - if (tuple.Definition.Type == TupleDefinitionType.WixCustomTableCell) + if (symbol.Definition.Type == SymbolDefinitionType.WixCustomTableCell) { // We only care about the Data in a CustomTable cell. - if (field.Name != nameof(WixCustomTableCellTupleFields.Data)) + if (field.Name != nameof(WixCustomTableCellSymbolFields.Data)) { continue; } if (customColumnsById == null) { - customColumnsById = this.Intermediate.Sections.SelectMany(s => s.Tuples.OfType()).ToDictionary(t => t.Id.Id); + customColumnsById = this.Intermediate.Sections.SelectMany(s => s.Symbols.OfType()).ToDictionary(t => t.Id.Id); } - if (customColumnsById.TryGetValue(tuple.Fields[(int)WixCustomTableCellTupleFields.TableRef].AsString() + "/" + tuple.Fields[(int)WixCustomTableCellTupleFields.ColumnRef].AsString(), out var customColumn)) + if (customColumnsById.TryGetValue(symbol.Fields[(int)WixCustomTableCellSymbolFields.TableRef].AsString() + "/" + symbol.Fields[(int)WixCustomTableCellSymbolFields.ColumnRef].AsString(), out var customColumn)) { fieldType = customColumn.Type; } @@ -93,7 +93,7 @@ namespace WixToolset.Core.Bind var original = field.AsString(); if (!String.IsNullOrEmpty(original)) { - var resolution = this.VariableResolver.ResolveVariables(tuple.SourceLineNumbers, original, !this.AllowUnresolvedVariables); + var resolution = this.VariableResolver.ResolveVariables(symbol.SourceLineNumbers, original, !this.AllowUnresolvedVariables); if (resolution.UpdatedValue) { field.Set(resolution.Value); @@ -101,7 +101,7 @@ namespace WixToolset.Core.Bind if (resolution.DelayedResolve) { - delayedFields.Add(new DelayedField(tuple, field)); + delayedFields.Add(new DelayedField(symbol, field)); } isDefault = resolution.IsDefault; @@ -109,7 +109,7 @@ namespace WixToolset.Core.Bind } } - // Move to next tuple if we've hit an error resolving variables. + // Move to next symbol if we've hit an error resolving variables. if (this.Messaging.EncounteredError) // TODO: make this error handling more specific to just the failure to resolve variables in this field. { continue; @@ -122,7 +122,7 @@ namespace WixToolset.Core.Bind #if TODO_PATCHING // Skip file resolution if the file is to be deleted. - if (RowOperation.Delete == tuple.Operation) + if (RowOperation.Delete == symbol.Operation) { continue; } @@ -151,13 +151,13 @@ namespace WixToolset.Core.Bind #endif // resolve the path to the file - var value = fileResolver.ResolveFile(objectField.Path, tuple.Definition, tuple.SourceLineNumbers, BindStage.Normal); + var value = fileResolver.ResolveFile(objectField.Path, symbol.Definition, symbol.SourceLineNumbers, BindStage.Normal); field.Set(value); } else if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated) // Normal binding for Patch Scenario (normal patch, no re-basing logic) { // resolve the path to the file - var value = fileResolver.ResolveFile(objectField.Path, tuple.Definition, tuple.SourceLineNumbers, BindStage.Normal); + var value = fileResolver.ResolveFile(objectField.Path, symbol.Definition, symbol.SourceLineNumbers, BindStage.Normal); field.Set(value); } #if TODO_PATCHING @@ -179,7 +179,7 @@ namespace WixToolset.Core.Bind } } - objectField.Data = fileResolver.ResolveFile(filePathToResolve, tuple.Definition.Name, tuple.SourceLineNumbers, BindStage.Updated); + objectField.Data = fileResolver.ResolveFile(filePathToResolve, symbol.Definition.Name, symbol.SourceLineNumbers, BindStage.Updated); } #endif } @@ -192,7 +192,7 @@ namespace WixToolset.Core.Bind #if TODO_PATCHING if (null != objectField.PreviousData) { - objectField.PreviousData = this.BindVariableResolver.ResolveVariables(tuple.SourceLineNumbers, objectField.PreviousData, false, out isDefault); + objectField.PreviousData = this.BindVariableResolver.ResolveVariables(symbol.SourceLineNumbers, objectField.PreviousData, false, out isDefault); if (!Messaging.Instance.EncounteredError) // TODO: make this error handling more specific to just the failure to resolve variables in this field. { @@ -217,7 +217,7 @@ namespace WixToolset.Core.Bind if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated) { // resolve the path to the file - objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, tuple.Definition.Name, tuple.SourceLineNumbers, BindStage.Normal); + objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, symbol.Definition.Name, symbol.SourceLineNumbers, BindStage.Normal); } else { @@ -235,14 +235,14 @@ namespace WixToolset.Core.Bind } // resolve the path to the file - objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, tuple.Definition.Name, tuple.SourceLineNumbers, BindStage.Target); + objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, symbol.Definition.Name, symbol.SourceLineNumbers, BindStage.Target); } } catch (WixFileNotFoundException) { // display the error with source line information - Messaging.Instance.Write(WixErrors.FileNotFound(tuple.SourceLineNumbers, (string)objectField.PreviousData)); + Messaging.Instance.Write(WixErrors.FileNotFound(symbol.SourceLineNumbers, (string)objectField.PreviousData)); } } } diff --git a/src/WixToolset.Core/Binder.cs b/src/WixToolset.Core/Binder.cs index a670714a..faaa3ec0 100644 --- a/src/WixToolset.Core/Binder.cs +++ b/src/WixToolset.Core/Binder.cs @@ -7,7 +7,7 @@ namespace WixToolset.Core using System.Linq; using System.Reflection; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; @@ -35,7 +35,7 @@ namespace WixToolset.Core // Bind. // - this.WriteBuildInfoTuple(context.IntermediateRepresentation, context.OutputPath, context.PdbPath); + this.WriteBuildInfoSymbol(context.IntermediateRepresentation, context.OutputPath, context.PdbPath); var bindResult = this.BackendBind(context); @@ -74,14 +74,14 @@ namespace WixToolset.Core return null; } - private void WriteBuildInfoTuple(Intermediate output, string outputFile, string outputPdbPath) + private void WriteBuildInfoSymbol(Intermediate output, string outputFile, string outputPdbPath) { var entrySection = output.Sections.First(s => s.Type != SectionType.Fragment); var executingAssembly = Assembly.GetExecutingAssembly(); var fileVersion = FileVersionInfo.GetVersionInfo(executingAssembly.Location); - var buildInfoTuple = entrySection.AddTuple(new WixBuildInfoTuple() + var buildInfoSymbol = entrySection.AddSymbol(new WixBuildInfoSymbol() { WixVersion = fileVersion.FileVersion, WixOutputFile = outputFile, @@ -89,7 +89,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(outputPdbPath)) { - buildInfoTuple.WixPdbFile = outputPdbPath; + buildInfoSymbol.WixPdbFile = outputPdbPath; } } } diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index 8602c514..04a55264 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs @@ -88,7 +88,7 @@ namespace WixToolset.Core.CommandLine var filterCultures = this.commandLine.CalculateFilterCultures(); - var creator = this.ServiceProvider.GetService(); + var creator = this.ServiceProvider.GetService(); this.EvaluateSourceFiles(sourceFiles, creator, out var codeFiles, out var wixipl); @@ -174,7 +174,7 @@ namespace WixToolset.Core.CommandLine return this.commandLine.TryParseArgument(argument, parser); } - private void EvaluateSourceFiles(IEnumerable sourceFiles, ITupleDefinitionCreator creator, out List codeFiles, out Intermediate wixipl) + private void EvaluateSourceFiles(IEnumerable sourceFiles, ISymbolDefinitionCreator creator, out List codeFiles, out Intermediate wixipl) { codeFiles = new List(); @@ -278,7 +278,7 @@ namespace WixToolset.Core.CommandLine return library; } - private Intermediate LinkPhase(IEnumerable intermediates, IEnumerable libraryFiles, ITupleDefinitionCreator creator, CancellationToken cancellationToken) + private Intermediate LinkPhase(IEnumerable intermediates, IEnumerable libraryFiles, ISymbolDefinitionCreator creator, CancellationToken cancellationToken) { var libraries = this.LoadLibraries(libraryFiles, creator); @@ -292,7 +292,7 @@ namespace WixToolset.Core.CommandLine context.ExtensionData = this.ExtensionManager.GetServices(); context.ExpectedOutputType = this.OutputType; context.Intermediates = intermediates.Concat(libraries).ToList(); - context.TupleDefinitionCreator = creator; + context.SymbolDefinitionCreator = creator; context.CancellationToken = cancellationToken; var linker = this.ServiceProvider.GetService(); @@ -382,7 +382,7 @@ namespace WixToolset.Core.CommandLine } } - private IEnumerable LoadLibraries(IEnumerable libraryFiles, ITupleDefinitionCreator creator) + private IEnumerable LoadLibraries(IEnumerable libraryFiles, ISymbolDefinitionCreator creator) { try { diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index 56f6322a..e598f540 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs @@ -12,7 +12,7 @@ namespace WixToolset.Core using System.Text.RegularExpressions; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; @@ -252,16 +252,16 @@ namespace WixToolset.Core { foreach (var section in target.Sections) { - foreach (var tuple in section.Tuples) + foreach (var symbol in section.Symbols) { - foreach (var field in tuple.Fields) + foreach (var field in symbol.Fields) { if (field?.Type == IntermediateFieldType.String) { var data = field.AsString(); if (!String.IsNullOrEmpty(data)) { - var resolved = this.componentIdPlaceholdersResolver.ResolveVariables(tuple.SourceLineNumbers, data, errorOnUnknown: false); + var resolved = this.componentIdPlaceholdersResolver.ResolveVariables(symbol.SourceLineNumbers, data, errorOnUnknown: false); if (resolved.UpdatedValue) { field.Set(resolved.Value); @@ -332,7 +332,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", propertyId.Id)); } - this.Core.AddTuple(new AppSearchTuple(sourceLineNumbers, new Identifier(propertyId.Access, propertyId.Id, signature)) + this.Core.AddSymbol(new AppSearchSymbol(sourceLineNumbers, new Identifier(propertyId.Access, propertyId.Id, signature)) { PropertyRef = propertyId.Id, SignatureRef = signature @@ -377,7 +377,7 @@ namespace WixToolset.Core { var section = this.Core.ActiveSection; - // Add the tuple to a separate section if requested. + // Add the symbol to a separate section if requested. if (fragment) { var id = String.Concat(this.Core.ActiveSection.Id, ".", propertyId.Id); @@ -385,24 +385,24 @@ namespace WixToolset.Core section = this.Core.CreateSection(id, SectionType.Fragment, this.Core.ActiveSection.Codepage, this.Context.CompilationId); // Reference the property in the active section. - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, propertyId.Id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, propertyId.Id); } - // Allow tuple to exist with no value so that PropertyRefs can be made for *Search elements - // the linker will remove these tuples before the final output is created. - section.AddTuple(new PropertyTuple(sourceLineNumbers, propertyId) + // Allow symbol to exist with no value so that PropertyRefs can be made for *Search elements + // the linker will remove these symbols before the final output is created. + section.AddSymbol(new PropertySymbol(sourceLineNumbers, propertyId) { Value = value, }); if (admin || hidden || secure) { - this.AddWixPropertyTuple(sourceLineNumbers, propertyId, admin, secure, hidden, section); + this.AddWixPropertySymbol(sourceLineNumbers, propertyId, admin, secure, hidden, section); } } } - private void AddWixPropertyTuple(SourceLineNumber sourceLineNumbers, Identifier property, bool admin, bool secure, bool hidden, IntermediateSection section = null) + private void AddWixPropertySymbol(SourceLineNumber sourceLineNumbers, Identifier property, bool admin, bool secure, bool hidden, IntermediateSection section = null) { if (secure && property.Id != property.Id.ToUpperInvariant()) { @@ -416,7 +416,7 @@ namespace WixToolset.Core this.Core.EnsureTable(sourceLineNumbers, WindowsInstallerTableDefinitions.Property); // Property table is always required when using WixProperty table. } - section.AddTuple(new WixPropertyTuple(sourceLineNumbers) + section.AddSymbol(new WixPropertySymbol(sourceLineNumbers) { PropertyRef = property.Id, Admin = admin, @@ -552,7 +552,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new AppIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, appId)) + this.Core.AddSymbol(new AppIdSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, appId)) { AppId = appId, RemoteServerName = remoteServerName, @@ -650,7 +650,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiAssemblyNameTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, componentId, id)) + this.Core.AddSymbol(new MsiAssemblyNameSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, componentId, id)) { ComponentRef = componentId, Name = id, @@ -737,14 +737,14 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new BinaryTuple(sourceLineNumbers, id) + var symbol = this.Core.AddSymbol(new BinarySymbol(sourceLineNumbers, id) { Data = new IntermediateFieldPathValue { Path = sourceFile } }); if (YesNoType.Yes == suppressModularization) { - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, id)); } } @@ -814,7 +814,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new IconTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new IconSymbol(sourceLineNumbers, id) { Data = new IntermediateFieldPathValue { Path = sourceFile }, }); @@ -840,7 +840,7 @@ namespace WixToolset.Core { case "Property": property = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, property); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, property); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -936,7 +936,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixInstanceTransformsTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixInstanceTransformsSymbol(sourceLineNumbers, id) { PropertyId = propertyId, ProductCode = productCode, @@ -973,7 +973,7 @@ namespace WixToolset.Core break; case "Feature": feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Feature, feature); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Feature, feature); break; case "Qualifier": qualifier = this.Core.GetAttributeValue(sourceLineNumbers, attrib); @@ -1003,7 +1003,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new PublishComponentTuple(sourceLineNumbers) + this.Core.AddSymbol(new PublishComponentSymbol(sourceLineNumbers) { ComponentId = id, Qualifier = qualifier, @@ -1187,7 +1187,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(localFileServer)) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, localFileServer); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, localFileServer); } // Local variables used strictly for child node processing. @@ -1260,7 +1260,7 @@ namespace WixToolset.Core { foreach (var context in contexts) { - var tuple = this.Core.AddTuple(new ClassTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new ClassSymbol(sourceLineNumbers) { CLSID = classId, Context = context, @@ -1276,19 +1276,19 @@ namespace WixToolset.Core if (null != appId) { - tuple.AppIdRef = appId; - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.AppId, appId); + symbol.AppIdRef = appId; + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.AppId, appId); } if (null != icon) { - tuple.IconRef = icon; - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Icon, icon); + symbol.IconRef = icon; + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Icon, icon); } if (CompilerConstants.IntegerNotSet != iconIndex) { - tuple.IconIndex = iconIndex; + symbol.IconIndex = iconIndex; } } } @@ -1369,7 +1369,7 @@ namespace WixToolset.Core if (null != icon) // ClassId default icon { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, icon); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, icon); icon = String.Format(CultureInfo.InvariantCulture, "\"[#{0}]\"", icon); @@ -1649,7 +1649,7 @@ namespace WixToolset.Core string maximum = null; string minimum = null; var excludeLanguages = false; - var maxInclusive = false; + var maxInclusive = false; var minInclusive = true; foreach (var attrib in node.Attributes()) @@ -1699,7 +1699,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers) + this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers) { UpgradeCode = upgradeCode, VersionMin = minimum, @@ -1850,7 +1850,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); } oneChild = true; - var newId = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); // FileSearch signatures override parent signatures + var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures id = new Identifier(AccessModifier.Private, newId); signature = null; break; @@ -1867,7 +1867,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new RegLocatorTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new RegLocatorSymbol(sourceLineNumbers, id) { Root = root.Value, Key = key, @@ -1898,7 +1898,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.RegLocator, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.RegLocator, id); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -2085,7 +2085,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new CCPSearchTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, signature))); + this.Core.AddSymbol(new CCPSearchSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, signature))); } } @@ -2351,10 +2351,10 @@ namespace WixToolset.Core encounteredODBCDataSource = true; break; case "ODBCDriver": - this.ParseODBCDriverOrTranslator(child, id.Id, null, TupleDefinitionType.ODBCDriver); + this.ParseODBCDriverOrTranslator(child, id.Id, null, SymbolDefinitionType.ODBCDriver); break; case "ODBCTranslator": - this.ParseODBCDriverOrTranslator(child, id.Id, null, TupleDefinitionType.ODBCTranslator); + this.ParseODBCDriverOrTranslator(child, id.Id, null, SymbolDefinitionType.ODBCTranslator); break; case "ProgId": var foundExtension = false; @@ -2480,7 +2480,7 @@ namespace WixToolset.Core } // if there isn't an @Id attribute value, replace the placeholder with the id of the keypath. - // either an explicit KeyPath="yes" attribute must be specified or requirements for + // either an explicit KeyPath="yes" attribute must be specified or requirements for // generatable guid must be met. if (componentIdPlaceholderWixVariable == id.Id) { @@ -2505,7 +2505,7 @@ namespace WixToolset.Core // finally add the Component table row if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ComponentTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new ComponentSymbol(sourceLineNumbers, id) { ComponentId = guid, DirectoryRef = directoryId, @@ -2525,7 +2525,7 @@ namespace WixToolset.Core if (multiInstance) { - this.Core.AddTuple(new WixInstanceComponentTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixInstanceComponentSymbol(sourceLineNumbers, id) { ComponentRef = id.Id, }); @@ -2533,7 +2533,7 @@ namespace WixToolset.Core if (0 < symbols.Count) { - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Component, id.Id)) + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Component, id.Id)) { SymbolType = SymbolPathType.Component, SymbolId = id.Id, @@ -2544,7 +2544,7 @@ namespace WixToolset.Core // Complus if (CompilerConstants.IntegerNotSet != comPlusBits) { - this.Core.AddTuple(new ComplusTuple(sourceLineNumbers) + this.Core.AddSymbol(new ComplusSymbol(sourceLineNumbers) { ComponentRef = id.Id, ExpType = comPlusBits, @@ -2643,7 +2643,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixComponentGroupTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixComponentGroupSymbol(sourceLineNumbers, id)); // Add this componentGroup and its parent in WixGroup. this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.ComponentGroup, id.Id); @@ -2673,7 +2673,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixComponentGroup, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixComponentGroup, id); break; case "Primary": primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -2722,7 +2722,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Component, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Component, id); break; case "Primary": primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -2846,7 +2846,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); } oneChild = true; - var newId = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); // FileSearch signatures override parent signatures + var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures id = new Identifier(AccessModifier.Private, newId); signature = null; break; @@ -2863,7 +2863,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new CompLocatorTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new CompLocatorSymbol(sourceLineNumbers, id) { SignatureRef = id.Id, ComponentId = componentId, @@ -2934,7 +2934,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new CreateFolderTuple(sourceLineNumbers) + this.Core.AddSymbol(new CreateFolderSymbol(sourceLineNumbers) { DirectoryRef = directoryId, ComponentRef = componentId, @@ -2994,7 +2994,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, fileId); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, fileId); break; case "SourceDirectory": sourceDirectory = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null); @@ -3059,7 +3059,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MoveFileTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MoveFileSymbol(sourceLineNumbers, id) { ComponentRef = componentId, SourceName = sourceName, @@ -3104,7 +3104,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new DuplicateFileTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new DuplicateFileSymbol(sourceLineNumbers, id) { ComponentRef = componentId, FileRef = fileId, @@ -3158,7 +3158,7 @@ namespace WixToolset.Core } source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); sourceType = CustomActionSourceType.Binary; - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, source); // add a reference to the appropriate Binary + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, source); // add a reference to the appropriate Binary break; case "Directory": if (null != source) @@ -3185,12 +3185,12 @@ namespace WixToolset.Core sourceType = CustomActionSourceType.File; targetType = CustomActionTargetType.TextData; - // The target can be either a formatted error string or a literal + // The target can be either a formatted error string or a literal // error number. Try to convert to error number to determine whether // to add a reference. No need to look at the value. if (Int32.TryParse(target, out var ignored)) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Error, target); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Error, target); } break; case "ExeCommand": @@ -3238,7 +3238,7 @@ namespace WixToolset.Core } source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); sourceType = CustomActionSourceType.File; - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, source); // add a reference to the appropriate File + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, source); // add a reference to the appropriate File break; case "HideTarget": hidden = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -3459,7 +3459,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new CustomActionTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, id) { ExecutionType = executionType, Source = source, @@ -3478,7 +3478,7 @@ namespace WixToolset.Core if (YesNoType.Yes == suppressModularization) { - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, id)); } } } @@ -3487,9 +3487,9 @@ namespace WixToolset.Core /// Parses a simple reference element. /// /// Element to parse. - /// Tuple which contains the target of the simple reference. + /// Symbol which contains the target of the simple reference. /// Id of the referenced element. - private string ParseSimpleRefElement(XElement node, IntermediateTupleDefinition tupleDefinition) + private string ParseSimpleRefElement(XElement node, IntermediateSymbolDefinition symbolDefinition) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); string id = null; @@ -3502,7 +3502,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, tupleDefinition.Name, id); + this.Core.CreateSimpleReference(sourceLineNumbers, symbolDefinition.Name, id); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -3565,7 +3565,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); } - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.MsiPatchSequence, primaryKeys); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.MsiPatchSequence, primaryKeys); this.Core.ParseForExtensionElements(node); @@ -3628,7 +3628,7 @@ namespace WixToolset.Core var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); string tableId = null; var unreal = false; - var columns = new List(); + var columns = new List(); foreach (var attrib in node.Attributes()) { @@ -3699,9 +3699,9 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var columnNames = String.Join(new string(WixCustomTableTuple.ColumnNamesSeparator, 1), columns.Select(c => c.Name)); + var columnNames = String.Join(new string(WixCustomTableSymbol.ColumnNamesSeparator, 1), columns.Select(c => c.Name)); - this.Core.AddTuple(new WixCustomTableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, tableId)) + this.Core.AddSymbol(new WixCustomTableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, tableId)) { ColumnNames = columnNames, Unreal = unreal, @@ -3716,7 +3716,7 @@ namespace WixToolset.Core /// Element to parse. /// Element's SourceLineNumbers. /// Table Id. - private WixCustomTableColumnTuple ParseColumnElement(XElement child, SourceLineNumber childSourceLineNumbers, string tableId) + private WixCustomTableColumnSymbol ParseColumnElement(XElement child, SourceLineNumber childSourceLineNumbers, string tableId) { string columnName = null; IntermediateFieldType? columnType = null; @@ -3968,12 +3968,12 @@ namespace WixToolset.Core return null; } - var attributes = primaryKey ? WixCustomTableColumnTupleAttributes.PrimaryKey : WixCustomTableColumnTupleAttributes.None; - attributes |= localizable ? WixCustomTableColumnTupleAttributes.Localizable : WixCustomTableColumnTupleAttributes.None; - attributes |= nullable ? WixCustomTableColumnTupleAttributes.Nullable : WixCustomTableColumnTupleAttributes.None; - attributes |= columnUnreal ? WixCustomTableColumnTupleAttributes.Unreal : WixCustomTableColumnTupleAttributes.None; + var attributes = primaryKey ? WixCustomTableColumnSymbolAttributes.PrimaryKey : WixCustomTableColumnSymbolAttributes.None; + attributes |= localizable ? WixCustomTableColumnSymbolAttributes.Localizable : WixCustomTableColumnSymbolAttributes.None; + attributes |= nullable ? WixCustomTableColumnSymbolAttributes.Nullable : WixCustomTableColumnSymbolAttributes.None; + attributes |= columnUnreal ? WixCustomTableColumnSymbolAttributes.Unreal : WixCustomTableColumnSymbolAttributes.None; - var column = this.Core.AddTuple(new WixCustomTableColumnTuple(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, columnName)) + var column = this.Core.AddSymbol(new WixCustomTableColumnSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, columnName)) { TableRef = tableId, Name = columnName, @@ -4038,7 +4038,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixCustomTableCellTuple(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, rowId, columnName)) + this.Core.AddSymbol(new WixCustomTableCellSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Private, tableId, rowId, columnName)) { RowId = rowId, ColumnRef = columnName, @@ -4055,7 +4055,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixCustomTable, tableId); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixCustomTable, tableId); } } @@ -4153,7 +4153,7 @@ namespace WixToolset.Core if (inlineSyntax[0].EndsWith(":")) { parentId = inlineSyntax[0].TrimEnd(':'); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Directory, parentId); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Directory, parentId); pathStartsAt = 1; } @@ -4298,7 +4298,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new DirectoryTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new DirectorySymbol(sourceLineNumbers, id) { ParentDirectoryRef = parentId, Name = name, @@ -4310,7 +4310,7 @@ namespace WixToolset.Core if (null != symbols) { - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers, id) { SymbolType = SymbolPathType.Directory, SymbolId = id.Id, @@ -4340,7 +4340,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Directory, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Directory, id); break; case "DiskId": diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue); @@ -4487,7 +4487,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); } oneChild = true; - signature = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); + signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); break; default: this.Core.UnexpectedElement(node, child); @@ -4532,7 +4532,7 @@ namespace WixToolset.Core signature = id.Id; } - var tuple = this.Core.AddTuple(new DrLocatorTuple(sourceLineNumbers, new Identifier(access, rowId, parentSignature, path)) + var symbol = this.Core.AddSymbol(new DrLocatorSymbol(sourceLineNumbers, new Identifier(access, rowId, parentSignature, path)) { SignatureRef = rowId, Parent = parentSignature, @@ -4541,7 +4541,7 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != depth) { - tuple.Depth = depth; + symbol.Depth = depth; } } @@ -4645,7 +4645,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); } oneChild = true; - signature = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); + signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); break; default: this.Core.UnexpectedElement(node, child); @@ -4659,7 +4659,7 @@ namespace WixToolset.Core } - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.DrLocator, id.Id, parentSignature, path); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.DrLocator, id.Id, parentSignature, path); return signature; } @@ -4670,7 +4670,7 @@ namespace WixToolset.Core /// Element to parse. /// The type of parent. /// Optional identifer for parent feature. - /// Display value for last feature used to get the features to display in the same order as specified + /// Display value for last feature used to get the features to display in the same order as specified /// in the source code. [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] private void ParseFeatureElement(XElement node, ComplexReferenceParentType parentType, string parentId, ref int lastDisplay) @@ -4899,7 +4899,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new FeatureTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new FeatureSymbol(sourceLineNumbers, id) { ParentFeatureRef = null, // this field is set in the linker Title = title, @@ -4941,7 +4941,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Feature, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Feature, id); break; case "IgnoreParent": ignoreParent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -5091,7 +5091,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixFeatureGroupTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixFeatureGroupSymbol(sourceLineNumbers, id)); //Add this FeatureGroup and its parent in WixGroup. this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.FeatureGroup, id.Id); @@ -5121,7 +5121,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixFeatureGroup, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixFeatureGroup, id); break; case "IgnoreParent": ignoreParent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -5290,7 +5290,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new EnvironmentTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new EnvironmentSymbol(sourceLineNumbers, id) { Name = name, Value = value, @@ -5347,7 +5347,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ErrorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id)) + this.Core.AddSymbol(new ErrorSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, id)) { Message = message }); @@ -5436,7 +5436,7 @@ namespace WixToolset.Core { if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ExtensionTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, extension, componentId)) + this.Core.AddSymbol(new ExtensionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, extension, componentId)) { Extension = extension, ComponentRef = componentId, @@ -5542,11 +5542,11 @@ namespace WixToolset.Core break; case "AssemblyApplication": assemblyApplication = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, assemblyApplication); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, assemblyApplication); break; case "AssemblyManifest": assemblyManifest = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, assemblyManifest); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, assemblyManifest); break; case "BindPath": bindPath = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); @@ -5560,7 +5560,7 @@ namespace WixToolset.Core break; case "CompanionFile": companionFile = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, companionFile); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, companionFile); break; case "Compressed": var compressedValue = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); @@ -5781,10 +5781,10 @@ namespace WixToolset.Core this.ParseRangeElement(child, ref ignoreOffsets, ref ignoreLengths); break; case "ODBCDriver": - this.ParseODBCDriverOrTranslator(child, componentId, id.Id, TupleDefinitionType.ODBCDriver); + this.ParseODBCDriverOrTranslator(child, componentId, id.Id, SymbolDefinitionType.ODBCDriver); break; case "ODBCTranslator": - this.ParseODBCDriverOrTranslator(child, componentId, id.Id, TupleDefinitionType.ODBCTranslator); + this.ParseODBCDriverOrTranslator(child, componentId, id.Id, SymbolDefinitionType.ODBCTranslator); break; case "Permission": this.ParsePermissionElement(child, id.Id, "File"); @@ -5848,17 +5848,17 @@ namespace WixToolset.Core source = null == name ? Path.Combine(source, shortName) : Path.Combine(source, name); } - var attributes = FileTupleAttributes.None; - attributes |= readOnly ? FileTupleAttributes.ReadOnly : 0; - attributes |= hidden ? FileTupleAttributes.Hidden : 0; - attributes |= system ? FileTupleAttributes.System : 0; - attributes |= vital ? FileTupleAttributes.Vital : 0; - attributes |= checksum ? FileTupleAttributes.Checksum : 0; - attributes |= compressed.HasValue && compressed == true ? FileTupleAttributes.Compressed : 0; - attributes |= compressed.HasValue && compressed == false ? FileTupleAttributes.Uncompressed : 0; - attributes |= generatedShortFileName ? FileTupleAttributes.GeneratedShortFileName : 0; + var attributes = FileSymbolAttributes.None; + attributes |= readOnly ? FileSymbolAttributes.ReadOnly : 0; + attributes |= hidden ? FileSymbolAttributes.Hidden : 0; + attributes |= system ? FileSymbolAttributes.System : 0; + attributes |= vital ? FileSymbolAttributes.Vital : 0; + attributes |= checksum ? FileSymbolAttributes.Checksum : 0; + attributes |= compressed.HasValue && compressed == true ? FileSymbolAttributes.Compressed : 0; + attributes |= compressed.HasValue && compressed == false ? FileSymbolAttributes.Uncompressed : 0; + attributes |= generatedShortFileName ? FileSymbolAttributes.GeneratedShortFileName : 0; - this.Core.AddTuple(new FileTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new FileSymbol(sourceLineNumbers, id) { ComponentRef = componentId, Name = name, @@ -5897,7 +5897,7 @@ namespace WixToolset.Core if (AssemblyType.NotAnAssembly != assemblyType) { - this.Core.AddTuple(new AssemblyTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new AssemblySymbol(sourceLineNumbers, id) { ComponentRef = componentId, FeatureRef = Guid.Empty.ToString("B"), @@ -5911,7 +5911,7 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != diskId) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat)); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat)); } // If this component does not have a companion file this file is a possible keypath. @@ -6052,7 +6052,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new SignatureTuple(sourceLineNumbers, id) + var symbol = this.Core.AddSymbol(new SignatureSymbol(sourceLineNumbers, id) { FileName = name ?? shortName, MinVersion = minVersion, @@ -6062,22 +6062,22 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != minSize) { - tuple.MinSize = minSize; + symbol.MinSize = minSize; } if (CompilerConstants.IntegerNotSet != maxSize) { - tuple.MaxSize = maxSize; + symbol.MaxSize = maxSize; } if (CompilerConstants.IntegerNotSet != minDate) { - tuple.MinDate = minDate; + symbol.MinDate = minDate; } if (CompilerConstants.IntegerNotSet != maxDate) { - tuple.MaxDate = maxDate; + symbol.MaxDate = maxDate; } // Create a DrLocator row to associate the file with a directory @@ -6088,7 +6088,7 @@ namespace WixToolset.Core { // Creates the DrLocator row for the directory search while // the parent DirectorySearch creates the file locator row. - this.Core.AddTuple(new DrLocatorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, parentSignature, id.Id, String.Empty)) + this.Core.AddSymbol(new DrLocatorSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, parentSignature, id.Id, String.Empty)) { SignatureRef = parentSignature, Parent = id.Id @@ -6096,7 +6096,7 @@ namespace WixToolset.Core } else { - this.Core.AddTuple(new DrLocatorTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id.Id, parentSignature, String.Empty)) + this.Core.AddSymbol(new DrLocatorSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, id.Id, parentSignature, String.Empty)) { SignatureRef = id.Id, Parent = parentSignature @@ -6191,7 +6191,7 @@ namespace WixToolset.Core this.ParseBundleExtensionElement(child); break; case "BundleExtensionRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixBundleExtension); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleExtension); break; case "ComplianceCheck": this.ParseComplianceCheckElement(child); @@ -6209,7 +6209,7 @@ namespace WixToolset.Core this.ParseCustomActionElement(child); break; case "CustomActionRef": - this.ParseSimpleRefElement(child, TupleDefinitions.CustomAction); + this.ParseSimpleRefElement(child, SymbolDefinitions.CustomAction); break; case "CustomTable": this.ParseCustomTableElement(child); @@ -6224,7 +6224,7 @@ namespace WixToolset.Core this.ParseEmbeddedChainerElement(child); break; case "EmbeddedChainerRef": - this.ParseSimpleRefElement(child, TupleDefinitions.MsiEmbeddedChainer); + this.ParseSimpleRefElement(child, SymbolDefinitions.MsiEmbeddedChainer); break; case "EnsureTable": this.ParseEnsureTableElement(child); @@ -6276,7 +6276,7 @@ namespace WixToolset.Core this.ParsePropertyElement(child); break; case "PropertyRef": - this.ParseSimpleRefElement(child, TupleDefinitions.Property); + this.ParseSimpleRefElement(child, SymbolDefinitions.Property); break; case "RelatedBundle": this.ParseRelatedBundleElement(child); @@ -6291,7 +6291,7 @@ namespace WixToolset.Core this.ParseSetVariableElement(child); break; case "SetVariableRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixSetVariable); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixSetVariable); break; case "SFPCatalog": string parentName = null; @@ -6301,7 +6301,7 @@ namespace WixToolset.Core this.ParseUIElement(child); break; case "UIRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI); break; case "Upgrade": this.ParseUpgradeElement(child); @@ -6325,7 +6325,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError && null != id) { - this.Core.AddTuple(new WixFragmentTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixFragmentSymbol(sourceLineNumbers, id)); } } @@ -6377,7 +6377,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new LaunchConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new LaunchConditionSymbol(sourceLineNumbers) { Condition = condition, Description = message @@ -6521,7 +6521,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new IniFileTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new IniFileSymbol(sourceLineNumbers, id) { FileName = this.GetMsiFilenameValue(shortName, name), DirProperty = directory, @@ -6688,7 +6688,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); } oneChild = true; - var newId = this.ParseSimpleRefElement(child, TupleDefinitions.Signature); // FileSearch signatures override parent signatures + var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures id = new Identifier(AccessModifier.Private, newId); signature = null; break; @@ -6705,7 +6705,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new IniLocatorTuple(sourceLineNumbers, id) + var symbol = this.Core.AddSymbol(new IniLocatorSymbol(sourceLineNumbers, id) { SignatureRef = id.Id, FileName = this.GetMsiFilenameValue(shortName, name), @@ -6716,7 +6716,7 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != field) { - tuple.Field = field; + symbol.Field = field; } } @@ -6741,7 +6741,7 @@ namespace WixToolset.Core { case "Shared": shared = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Component, shared); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Component, shared); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -6763,7 +6763,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new IsolatedComponentTuple(sourceLineNumbers) + this.Core.AddSymbol(new IsolatedComponentSymbol(sourceLineNumbers) { SharedComponentRef = shared, ApplicationComponentRef = componentId @@ -6805,7 +6805,7 @@ namespace WixToolset.Core { if ("PatchCertificates" == node.Name.LocalName) { - this.Core.AddTuple(new MsiPatchCertificateTuple(sourceLineNumbers) + this.Core.AddSymbol(new MsiPatchCertificateSymbol(sourceLineNumbers) { PatchCertificate = name, DigitalCertificateRef = name, @@ -6813,7 +6813,7 @@ namespace WixToolset.Core } else { - this.Core.AddTuple(new MsiPackageCertificateTuple(sourceLineNumbers) + this.Core.AddSymbol(new MsiPackageCertificateSymbol(sourceLineNumbers) { PackageCertificate = name, DigitalCertificateRef = name, @@ -6889,7 +6889,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiDigitalCertificateTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MsiDigitalCertificateSymbol(sourceLineNumbers, id) { CertData = sourceFile }); @@ -6962,7 +6962,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiDigitalSignatureTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "Media", diskId)) + this.Core.AddSymbol(new MsiDigitalSignatureSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "Media", diskId)) { Table = "Media", SignObject = diskId, @@ -7084,7 +7084,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { // create the row that performs the upgrade (or downgrade) - var tuple = this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers) { UpgradeCode = upgradeCode, Remove = removeFeatures, @@ -7095,21 +7095,21 @@ namespace WixToolset.Core if (allowDowngrades) { - tuple.VersionMin = "0"; - tuple.Language = productLanguage; - tuple.VersionMinInclusive = true; + symbol.VersionMin = "0"; + symbol.Language = productLanguage; + symbol.VersionMinInclusive = true; } else { - tuple.VersionMax = productVersion; - tuple.Language = productLanguage; - tuple.VersionMaxInclusive = allowSameVersionUpgrades; + symbol.VersionMax = productVersion; + symbol.Language = productLanguage; + symbol.VersionMaxInclusive = allowSameVersionUpgrades; } // Add launch condition that blocks upgrades if (blockUpgrades) { - this.Core.AddTuple(new LaunchConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new LaunchConditionSymbol(sourceLineNumbers) { Condition = Common.UpgradePreventedCondition, Description = downgradeErrorMessage @@ -7119,7 +7119,7 @@ namespace WixToolset.Core // now create the Upgrade row and launch conditions to prevent downgrades (unless explicitly permitted) if (!allowDowngrades) { - this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers) + this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers) { UpgradeCode = upgradeCode, VersionMin = productVersion, @@ -7129,7 +7129,7 @@ namespace WixToolset.Core ActionProperty = Common.DowngradeDetectedProperty }); - this.Core.AddTuple(new LaunchConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new LaunchConditionSymbol(sourceLineNumbers) { Condition = Common.DowngradePreventedCondition, Description = downgradeErrorMessage @@ -7158,7 +7158,7 @@ namespace WixToolset.Core break; } - this.Core.ScheduleActionTuple(sourceLineNumbers, AccessModifier.Public, SequenceTable.InstallExecuteSequence, "RemoveExistingProducts", afterAction: after); + this.Core.ScheduleActionSymbol(sourceLineNumbers, AccessModifier.Public, SequenceTable.InstallExecuteSequence, "RemoveExistingProducts", afterAction: after); } } @@ -7199,7 +7199,7 @@ namespace WixToolset.Core break; case "DiskPrompt": diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined break; case "EmbedCab": embedCab = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -7331,7 +7331,7 @@ namespace WixToolset.Core // add the row to the section if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MediaTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, id)) + this.Core.AddSymbol(new MediaSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, id)) { DiskId = id, DiskPrompt = diskPrompt, @@ -7344,7 +7344,7 @@ namespace WixToolset.Core if (null != symbols) { - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Media, id)) + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, SymbolPathType.Media, id)) { SymbolType = SymbolPathType.Media, SymbolId = id.ToString(CultureInfo.InvariantCulture), @@ -7406,7 +7406,7 @@ namespace WixToolset.Core break; case "DiskPrompt": diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined this.Core.Write(WarningMessages.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); break; case "EmbedCab": @@ -7440,12 +7440,12 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MediaTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, 1)) + this.Core.AddSymbol(new MediaSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, 1)) { DiskId = 1 }); - this.Core.AddTuple(new WixMediaTemplateTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixMediaTemplateSymbol(sourceLineNumbers) { CabinetTemplate = cabinetTemplate, VolumeLabel = volumeLabel, @@ -7478,7 +7478,7 @@ namespace WixToolset.Core var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); Identifier id = null; var configData = String.Empty; - FileTupleAttributes attributes = 0; + FileSymbolAttributes attributes = 0; string language = null; string sourceFile = null; @@ -7493,12 +7493,12 @@ namespace WixToolset.Core break; case "DiskId": diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat)); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat)); break; case "FileCompression": var compress = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); - attributes |= compress == YesNoType.Yes ? FileTupleAttributes.Compressed : 0; - attributes |= compress == YesNoType.No ? FileTupleAttributes.Uncompressed : 0; + attributes |= compress == YesNoType.Yes ? FileSymbolAttributes.Compressed : 0; + attributes |= compress == YesNoType.No ? FileSymbolAttributes.Uncompressed : 0; break; case "Language": language = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue); @@ -7561,7 +7561,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new WixMergeTuple(sourceLineNumbers, id) + var symbol = this.Core.AddSymbol(new WixMergeSymbol(sourceLineNumbers, id) { DirectoryRef = directoryId, SourceFile = sourceFile, @@ -7571,7 +7571,7 @@ namespace WixToolset.Core FeatureRef = Guid.Empty.ToString("B") }); - tuple.Set((int)WixMergeTupleFields.Language, language); + symbol.Set((int)WixMergeSymbolFields.Language, language); } } @@ -7692,7 +7692,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new ConditionSymbol(sourceLineNumbers) { FeatureRef = featureId, Level = level.Value, @@ -7722,7 +7722,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixMerge, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixMerge, id); break; case "Primary": primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -7815,7 +7815,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MIMETuple(sourceLineNumbers, new Identifier(AccessModifier.Private, contentType)) + this.Core.AddSymbol(new MIMESymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, contentType)) { ContentType = contentType, ExtensionRef = extension, @@ -7894,7 +7894,7 @@ namespace WixToolset.Core if (patch) { // /Patch/PatchProperty goes directly into MsiPatchMetadata table - this.Core.AddTuple(new MsiPatchMetadataTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, company, name)) + this.Core.AddSymbol(new MsiPatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, company, name)) { Company = company, Property = name, @@ -7921,7 +7921,7 @@ namespace WixToolset.Core { if (!this.Core.EncounteredError) { - this.Core.AddTuple(new PropertyTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, name)) + this.Core.AddSymbol(new PropertySymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, name)) { Value = value }); @@ -7971,7 +7971,7 @@ namespace WixToolset.Core return id; } - + /// /// Parses a ReplacePatch element. /// @@ -8080,7 +8080,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixPatchRefTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers) { Table = "*", PrimaryKeys = "*", @@ -8127,7 +8127,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixPatchRefTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers) { Table = tableName, PrimaryKeys = id @@ -8245,7 +8245,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixPatchBaselineTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixPatchBaselineSymbol(sourceLineNumbers, id) { DiskId = diskId ?? 1, ValidationFlags = validationFlags, diff --git a/src/WixToolset.Core/CompilerCore.cs b/src/WixToolset.Core/CompilerCore.cs index 5d0edaf1..7ec83a7d 100644 --- a/src/WixToolset.Core/CompilerCore.cs +++ b/src/WixToolset.Core/CompilerCore.cs @@ -13,7 +13,7 @@ namespace WixToolset.Core using System.Text.RegularExpressions; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; @@ -164,13 +164,13 @@ namespace WixToolset.Core public bool ShowPedanticMessages { get; set; } /// - /// Add a tuple to the active section. + /// Add a symbol to the active section. /// - /// Tuple to add. - public T AddTuple(T tuple) - where T : IntermediateTuple + /// Symbol to add. + public T AddSymbol(T symbol) + where T : IntermediateSymbol { - return this.ActiveSection.AddTuple(tuple); + return this.ActiveSection.AddSymbol(symbol); } /// @@ -355,39 +355,39 @@ namespace WixToolset.Core /// The component which will control installation/uninstallation of the registry entry. public Identifier CreateRegistryRow(SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId) { - return this.parseHelper.CreateRegistryTuple(this.ActiveSection, sourceLineNumbers, root, key, name, value, componentId, true); + return this.parseHelper.CreateRegistrySymbol(this.ActiveSection, sourceLineNumbers, root, key, name, value, componentId, true); } /// - /// Create a WixSimpleReferenceTuple in the active section. + /// Create a WixSimpleReferenceSymbol in the active section. /// /// Source line information for the row. - /// The tuple name of the simple reference. + /// The symbol name of the simple reference. /// The primary keys of the simple reference. - public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, string tupleName, params string[] primaryKeys) + public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys) { if (!this.EncounteredError) { var joinedKeys = String.Join("/", primaryKeys); - var id = String.Concat(tupleName, ":", joinedKeys); + var id = String.Concat(symbolName, ":", joinedKeys); // If this simple reference hasn't been added to the active section already, add it. if (this.activeSectionSimpleReferences.Add(id)) { - this.parseHelper.CreateSimpleReference(this.ActiveSection, sourceLineNumbers, tupleName, primaryKeys); + this.parseHelper.CreateSimpleReference(this.ActiveSection, sourceLineNumbers, symbolName, primaryKeys); } } } /// - /// Create a WixSimpleReferenceTuple in the active section. + /// Create a WixSimpleReferenceSymbol in the active section. /// /// Source line information for the row. - /// The tuple definition of the simple reference. + /// The symbol definition of the simple reference. /// The primary keys of the simple reference. - public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, params string[] primaryKeys) + public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys) { - this.CreateSimpleReference(sourceLineNumbers, tupleDefinition.Name, primaryKeys); + this.CreateSimpleReference(sourceLineNumbers, symbolDefinition.Name, primaryKeys); } /// @@ -402,12 +402,12 @@ namespace WixToolset.Core { if (!this.EncounteredError) { - this.parseHelper.CreateWixGroupTuple(this.ActiveSection, sourceLineNumbers, parentType, parentId, childType, childId); + this.parseHelper.CreateWixGroupSymbol(this.ActiveSection, sourceLineNumbers, parentType, parentId, childType, childId); } } /// - /// Add the appropriate tuples to make sure that the given table shows up + /// Add the appropriate symbols to make sure that the given table shows up /// in the resulting output. /// /// Source line numbers. @@ -421,7 +421,7 @@ namespace WixToolset.Core } /// - /// Add the appropriate tuples to make sure that the given table shows up + /// Add the appropriate symbols to make sure that the given table shows up /// in the resulting output. /// /// Source line numbers. @@ -1013,12 +1013,12 @@ namespace WixToolset.Core /// Identifier for the newly created row. internal Identifier CreateDirectoryRow(SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, string shortName = null, string sourceName = null, string shortSourceName = null) { - return this.parseHelper.CreateDirectoryTuple(this.ActiveSection, sourceLineNumbers, id, parentId, name, this.activeSectionInlinedDirectoryIds, shortName, sourceName, shortSourceName); + return this.parseHelper.CreateDirectorySymbol(this.ActiveSection, sourceLineNumbers, id, parentId, name, this.activeSectionInlinedDirectoryIds, shortName, sourceName, shortSourceName); } - public void CreateWixSearchTuple(SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after) + public void CreateWixSearchSymbol(SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after) { - this.parseHelper.CreateWixSearchTuple(this.ActiveSection, sourceLineNumbers, elementName, id, variable, condition, after, null); + this.parseHelper.CreateWixSearchSymbol(this.ActiveSection, sourceLineNumbers, elementName, id, variable, condition, after, null); } /// @@ -1033,9 +1033,9 @@ namespace WixToolset.Core return this.parseHelper.GetAttributeInlineDirectorySyntax(sourceLineNumbers, attribute, resultUsedToCreateReference); } - internal WixActionTuple ScheduleActionTuple(SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition = null, string beforeAction = null, string afterAction = null, bool overridable = false) + internal WixActionSymbol ScheduleActionSymbol(SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition = null, string beforeAction = null, string afterAction = null, bool overridable = false) { - return this.parseHelper.ScheduleActionTuple(this.ActiveSection, sourceLineNumbers, access, sequence, actionName, condition, beforeAction, afterAction, overridable); + return this.parseHelper.ScheduleActionSymbol(this.ActiveSection, sourceLineNumbers, access, sequence, actionName, condition, beforeAction, afterAction, overridable); } /// diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs index 18a0366e..72550ed9 100644 --- a/src/WixToolset.Core/Compiler_2.cs +++ b/src/WixToolset.Core/Compiler_2.cs @@ -10,7 +10,7 @@ namespace WixToolset.Core using System.IO; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; @@ -190,7 +190,7 @@ namespace WixToolset.Core this.ParseCustomActionElement(child); break; case "CustomActionRef": - this.ParseSimpleRefElement(child, TupleDefinitions.CustomAction); + this.ParseSimpleRefElement(child, SymbolDefinitions.CustomAction); break; case "CustomTable": this.ParseCustomTableElement(child); @@ -205,7 +205,7 @@ namespace WixToolset.Core this.ParseEmbeddedChainerElement(child); break; case "EmbeddedChainerRef": - this.ParseSimpleRefElement(child, TupleDefinitions.MsiEmbeddedChainer); + this.ParseSimpleRefElement(child, SymbolDefinitions.MsiEmbeddedChainer); break; case "EnsureTable": this.ParseEnsureTableElement(child); @@ -248,7 +248,7 @@ namespace WixToolset.Core this.ParsePropertyElement(child); break; case "PropertyRef": - this.ParseSimpleRefElement(child, TupleDefinitions.Property); + this.ParseSimpleRefElement(child, SymbolDefinitions.Property); break; case "SetDirectory": this.ParseSetDirectoryElement(child); @@ -274,7 +274,7 @@ namespace WixToolset.Core this.ParseUIElement(child); break; case "UIRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI); break; case "Upgrade": this.ParseUpgradeElement(child); @@ -297,7 +297,7 @@ namespace WixToolset.Core { if (null != symbols) { - this.Core.AddTuple(new WixDeltaPatchSymbolPathsTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixDeltaPatchSymbolPathsSymbol(sourceLineNumbers) { SymbolId = productCode, SymbolType = SymbolPathType.Product, @@ -318,8 +318,8 @@ namespace WixToolset.Core /// Element to parse. /// Identifier of parent component. /// Default identifer for driver/translator file. - /// Tuple type we're processing for. - private void ParseODBCDriverOrTranslator(XElement node, string componentId, string fileId, TupleDefinitionType tupleDefinitionType) + /// Symbol type we're processing for. + private void ParseODBCDriverOrTranslator(XElement node, string componentId, string fileId, SymbolDefinitionType symbolDefinitionType) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); Identifier id = null; @@ -338,14 +338,14 @@ namespace WixToolset.Core break; case "File": driver = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, driver); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, driver); break; case "Name": name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); break; case "SetupFile": setup = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, setup); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, setup); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -369,7 +369,7 @@ namespace WixToolset.Core } // drivers have a few possible children - if (TupleDefinitionType.ODBCDriver == tupleDefinitionType) + if (SymbolDefinitionType.ODBCDriver == symbolDefinitionType) { // process any data sources for the driver foreach (var child in node.Elements()) @@ -383,7 +383,7 @@ namespace WixToolset.Core this.ParseODBCDataSource(child, componentId, name, out ignoredKeyPath); break; case "Property": - this.ParseODBCProperty(child, id.Id, TupleDefinitionType.ODBCAttribute); + this.ParseODBCProperty(child, id.Id, SymbolDefinitionType.ODBCAttribute); break; default: this.Core.UnexpectedElement(node, child); @@ -403,10 +403,10 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - switch (tupleDefinitionType) + switch (symbolDefinitionType) { - case TupleDefinitionType.ODBCDriver: - this.Core.AddTuple(new ODBCDriverTuple(sourceLineNumbers, id) + case SymbolDefinitionType.ODBCDriver: + this.Core.AddSymbol(new ODBCDriverSymbol(sourceLineNumbers, id) { ComponentRef = componentId, Description = name, @@ -414,8 +414,8 @@ namespace WixToolset.Core SetupFileRef = setup, }); break; - case TupleDefinitionType.ODBCTranslator: - this.Core.AddTuple(new ODBCTranslatorTuple(sourceLineNumbers, id) + case SymbolDefinitionType.ODBCTranslator: + this.Core.AddSymbol(new ODBCTranslatorSymbol(sourceLineNumbers, id) { ComponentRef = componentId, Description = name, @@ -424,7 +424,7 @@ namespace WixToolset.Core }); break; default: - throw new ArgumentOutOfRangeException(nameof(tupleDefinitionType)); + throw new ArgumentOutOfRangeException(nameof(symbolDefinitionType)); } } } @@ -434,8 +434,8 @@ namespace WixToolset.Core /// /// Element to parse. /// Identifier of parent driver or translator. - /// Name of the table to create property in. - private void ParseODBCProperty(XElement node, string parentId, TupleDefinitionType tupleDefinitionType) + /// Name of the table to create property in. + private void ParseODBCProperty(XElement node, string parentId, SymbolDefinitionType symbolDefinitionType) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); string id = null; @@ -474,18 +474,18 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { var identifier = new Identifier(AccessModifier.Private, parentId, id); - switch (tupleDefinitionType) + switch (symbolDefinitionType) { - case TupleDefinitionType.ODBCAttribute: - this.Core.AddTuple(new ODBCAttributeTuple(sourceLineNumbers, identifier) + case SymbolDefinitionType.ODBCAttribute: + this.Core.AddSymbol(new ODBCAttributeSymbol(sourceLineNumbers, identifier) { DriverRef = parentId, Attribute = id, Value = propertyValue, }); break; - case TupleDefinitionType.ODBCSourceAttribute: - this.Core.AddTuple(new ODBCSourceAttributeTuple(sourceLineNumbers, identifier) + case SymbolDefinitionType.ODBCSourceAttribute: + this.Core.AddSymbol(new ODBCSourceAttributeSymbol(sourceLineNumbers, identifier) { DataSourceRef = parentId, Attribute = id, @@ -493,7 +493,7 @@ namespace WixToolset.Core }); break; default: - throw new ArgumentOutOfRangeException(nameof(tupleDefinitionType)); + throw new ArgumentOutOfRangeException(nameof(symbolDefinitionType)); } } } @@ -578,7 +578,7 @@ namespace WixToolset.Core switch (child.Name.LocalName) { case "Property": - this.ParseODBCProperty(child, id.Id, TupleDefinitionType.ODBCSourceAttribute); + this.ParseODBCProperty(child, id.Id, SymbolDefinitionType.ODBCSourceAttribute); break; default: this.Core.UnexpectedElement(node, child); @@ -593,7 +593,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ODBCDataSourceTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new ODBCDataSourceSymbol(sourceLineNumbers, id) { ComponentRef = componentId, Description = name, @@ -712,7 +712,7 @@ namespace WixToolset.Core switch (installScope) { case "perMachine": - this.Core.AddTuple(new PropertyTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "ALLUSERS")) + this.Core.AddSymbol(new PropertySymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "ALLUSERS")) { Value = "1" }); @@ -870,67 +870,67 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Codepage, Value = codepage }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Title, Value = "Installation Database" }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Subject, Value = packageName }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Author, Value = packageAuthor }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Keywords, Value = keywords }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Comments, Value = comments }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.PlatformAndLanguage, Value = String.Format(CultureInfo.InvariantCulture, "{0};{1}", platform, packageLanguages) }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.PackageCode, Value = packageCode }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.WindowsInstallerVersion, Value = msiVersion.ToString(CultureInfo.InvariantCulture) }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.WordCount, Value = sourceBits.ToString(CultureInfo.InvariantCulture) }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Security, Value = YesNoDefaultType.No == security ? "0" : YesNoDefaultType.Yes == security ? "4" : "2" @@ -1007,13 +1007,13 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Codepage, Value = codepage }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Title, Value = "Patch" @@ -1021,7 +1021,7 @@ namespace WixToolset.Core if (null != packageName) { - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Subject, Value = packageName @@ -1030,7 +1030,7 @@ namespace WixToolset.Core if (null != packageAuthor) { - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Author, Value = packageAuthor @@ -1039,7 +1039,7 @@ namespace WixToolset.Core if (null != keywords) { - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Keywords, Value = keywords @@ -1048,26 +1048,26 @@ namespace WixToolset.Core if (null != comments) { - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Comments, Value = comments }); } - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.WindowsInstallerVersion, Value = msiVersion.ToString(CultureInfo.InvariantCulture) }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.WordCount, Value = "0" }); - this.Core.AddTuple(new SummaryInformationTuple(sourceLineNumbers) + this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) { PropertyId = SummaryInformationType.Security, Value = YesNoDefaultType.No == security ? "0" : YesNoDefaultType.Yes == security ? "4" : "2" @@ -1163,7 +1163,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new LockPermissionsTuple(sourceLineNumbers) + this.Core.AddSymbol(new LockPermissionsSymbol(sourceLineNumbers) { LockObject = objectId, Table = tableName, @@ -1239,7 +1239,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiLockPermissionsExTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MsiLockPermissionsExSymbol(sourceLineNumbers, id) { LockObject = objectId, Table = tableName, @@ -1371,7 +1371,7 @@ namespace WixToolset.Core { if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new ProgIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, progId)) + var symbol = this.Core.AddSymbol(new ProgIdSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, progId)) { ProgId = progId, ParentProgIdRef = parent, @@ -1381,13 +1381,13 @@ namespace WixToolset.Core if (null != icon) { - tuple.IconRef = icon; - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Icon, icon); + symbol.IconRef = icon; + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Icon, icon); } if (CompilerConstants.IntegerNotSet != iconIndex) { - tuple.IconIndex = iconIndex; + symbol.IconIndex = iconIndex; } this.Core.EnsureTable(sourceLineNumbers, WindowsInstallerTableDefinitions.Class); @@ -1419,7 +1419,7 @@ namespace WixToolset.Core if (null != icon) // ProgId's Default Icon { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, icon); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, icon); icon = String.Format(CultureInfo.InvariantCulture, "\"[#{0}]\"", icon); @@ -1515,7 +1515,7 @@ namespace WixToolset.Core if ("ErrorDialog" == id.Id) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, value); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, value); } foreach (var child in node.Elements()) @@ -1550,7 +1550,7 @@ namespace WixToolset.Core { if (complianceCheck && !this.Core.EncounteredError) { - this.Core.AddTuple(new CCPSearchTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, sig))); + this.Core.AddSymbol(new CCPSearchSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, sig))); } this.AddAppSearch(sourceLineNumbers, id, sig); @@ -1579,7 +1579,7 @@ namespace WixToolset.Core { this.Core.Write(WarningMessages.PropertyModularizationSuppressed(sourceLineNumbers)); - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, id)); } } @@ -1766,7 +1766,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError && null != name) { - this.Core.AddTuple(new RegistryTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new RegistrySymbol(sourceLineNumbers, id) { Root = root.Value, Key = key, @@ -2008,7 +2008,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new RegistryTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new RegistrySymbol(sourceLineNumbers, id) { Root = root.Value, Key = key, @@ -2154,7 +2154,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new RemoveRegistryTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new RemoveRegistrySymbol(sourceLineNumbers, id) { Root = root.Value, Key = key, @@ -2230,7 +2230,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new RemoveRegistryTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new RemoveRegistrySymbol(sourceLineNumbers, id) { Root = root.Value, Key = key, @@ -2349,7 +2349,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new RemoveFileTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id) { ComponentRef = componentId, FileName = this.GetMsiFilenameValue(shortName, name), @@ -2437,7 +2437,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new RemoveFileTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id) { ComponentRef = componentId, DirProperty = directory ?? property ?? parentDirectory, @@ -2508,7 +2508,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ReserveCostTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new ReserveCostSymbol(sourceLineNumbers, id) { ComponentRef = componentId, ReserveFolder = directoryId, @@ -2552,7 +2552,7 @@ namespace WixToolset.Core if (customAction) { actionName = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib); - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.CustomAction, actionName); + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.CustomAction, actionName); } else { @@ -2563,7 +2563,7 @@ namespace WixToolset.Core if (customAction || showDialog || specialAction || specialStandardAction) { afterAction = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib); - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.WixAction, sequenceTable.ToString(), afterAction); + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.WixAction, sequenceTable.ToString(), afterAction); } else { @@ -2574,7 +2574,7 @@ namespace WixToolset.Core if (customAction || showDialog || specialAction || specialStandardAction) { beforeAction = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib); - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.WixAction, sequenceTable.ToString(), beforeAction); + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.WixAction, sequenceTable.ToString(), beforeAction); } else { @@ -2588,7 +2588,7 @@ namespace WixToolset.Core if (showDialog) { actionName = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, attrib); - this.Core.CreateSimpleReference(childSourceLineNumbers, TupleDefinitions.Dialog, actionName); + this.Core.CreateSimpleReference(childSourceLineNumbers, SymbolDefinitions.Dialog, actionName); } else { @@ -2703,7 +2703,7 @@ namespace WixToolset.Core { if (suppress) { - this.Core.AddTuple(new WixSuppressActionTuple(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName)) + this.Core.AddSymbol(new WixSuppressActionSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName)) { SequenceTable = sequenceTable, Action = actionName @@ -2711,7 +2711,7 @@ namespace WixToolset.Core } else { - var tuple = this.Core.AddTuple(new WixActionTuple(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName)) + var symbol = this.Core.AddSymbol(new WixActionSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Public, sequenceTable, actionName)) { SequenceTable = sequenceTable, Action = actionName, @@ -2723,7 +2723,7 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != sequence) { - tuple.Sequence = sequence; + symbol.Sequence = sequence; } } } @@ -2897,7 +2897,7 @@ namespace WixToolset.Core { if (!String.IsNullOrEmpty(delayedAutoStart)) { - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".DS"))) + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".DS"))) { Name = name, OnInstall = install, @@ -2911,7 +2911,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(failureActionsWhen)) { - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".FA"))) + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".FA"))) { Name = name, OnInstall = install, @@ -2925,7 +2925,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(sid)) { - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".SS"))) + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".SS"))) { Name = name, OnInstall = install, @@ -2939,7 +2939,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(requiredPrivileges)) { - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".RP"))) + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".RP"))) { Name = name, OnInstall = install, @@ -2953,7 +2953,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(preShutdownDelay)) { - this.Core.AddTuple(new MsiServiceConfigTuple(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".PD"))) + this.Core.AddSymbol(new MsiServiceConfigSymbol(sourceLineNumbers, new Identifier(id.Access, String.Concat(id.Id, ".PD"))) { Name = name, OnInstall = install, @@ -3279,12 +3279,12 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiServiceConfigFailureActionsTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MsiServiceConfigFailureActionsSymbol(sourceLineNumbers, id) { Name = name, - OnInstall = install, - OnReinstall = reinstall, - OnUninstall = uninstall, + OnInstall = install, + OnReinstall = reinstall, + OnUninstall = uninstall, ResetPeriod = resetPeriod, RebootMessage = rebootMessage, Command = command, @@ -3427,7 +3427,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ServiceControlTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new ServiceControlSymbol(sourceLineNumbers, id) { Name = name, InstallRemove = installRemove, @@ -3715,7 +3715,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ServiceInstallTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new ServiceInstallSymbol(sourceLineNumbers, id) { Name = name, DisplayName = displayName, @@ -3763,7 +3763,7 @@ namespace WixToolset.Core break; case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Directory, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Directory, id); break; case "Sequence": var sequenceValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); @@ -3819,7 +3819,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new CustomActionTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName)) + this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName)) { ExecutionType = executionType, SourceType = CustomActionSourceType.Directory, @@ -3830,7 +3830,7 @@ namespace WixToolset.Core foreach (var sequence in sequences) { - this.Core.ScheduleActionTuple(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, afterAction: "CostInitialize"); + this.Core.ScheduleActionSymbol(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, afterAction: "CostInitialize"); } } } @@ -3946,7 +3946,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction)); } - this.Core.AddTuple(new CustomActionTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName)) + this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, actionName)) { ExecutionType = executionType, SourceType = CustomActionSourceType.Property, @@ -3957,7 +3957,7 @@ namespace WixToolset.Core foreach (var sequence in sequences) { - this.Core.ScheduleActionTuple(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, beforeAction, afterAction); + this.Core.ScheduleActionSymbol(sourceLineNumbers, AccessModifier.Public, sequence, actionName, condition, beforeAction, afterAction); } } } @@ -4001,7 +4001,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new FileSFPCatalogTuple(sourceLineNumbers) + this.Core.AddSymbol(new FileSFPCatalogSymbol(sourceLineNumbers) { FileRef = id, SFPCatalogRef = parentSFPCatalog @@ -4094,7 +4094,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new SFPCatalogTuple(sourceLineNumbers) + this.Core.AddSymbol(new SFPCatalogSymbol(sourceLineNumbers) { SFPCatalog = name, Catalog = sourceFile, @@ -4170,7 +4170,7 @@ namespace WixToolset.Core break; case "Icon": icon = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Icon, icon); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Icon, icon); break; case "IconIndex": iconIndex = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int16.MinValue + 1, Int16.MaxValue); @@ -4368,7 +4368,7 @@ namespace WixToolset.Core target = String.Format(CultureInfo.InvariantCulture, "[#{0}]", defaultTarget); } - this.Core.AddTuple(new ShortcutTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new ShortcutSymbol(sourceLineNumbers, id) { DirectoryRef = directory, Name = name, @@ -4445,7 +4445,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiShortcutPropertyTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MsiShortcutPropertySymbol(sourceLineNumbers, id) { ShortcutRef = shortcutId, PropertyKey = key, @@ -4642,7 +4642,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new TypeLibTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new TypeLibSymbol(sourceLineNumbers) { LibId = id, Language = language, @@ -4654,12 +4654,12 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != majorVersion || CompilerConstants.IntegerNotSet != minorVersion) { - tuple.Version = (CompilerConstants.IntegerNotSet != majorVersion ? majorVersion * 256 : 0) + (CompilerConstants.IntegerNotSet != minorVersion ? minorVersion : 0); + symbol.Version = (CompilerConstants.IntegerNotSet != majorVersion ? majorVersion * 256 : 0) + (CompilerConstants.IntegerNotSet != minorVersion ? minorVersion : 0); } if (CompilerConstants.IntegerNotSet != cost) { - tuple.Cost = cost; + symbol.Cost = cost; } } } @@ -4855,7 +4855,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new UpgradeTuple(sourceLineNumbers) + this.Core.AddSymbol(new UpgradeSymbol(sourceLineNumbers) { UpgradeCode = upgradeId, VersionMin = minimum, @@ -4875,7 +4875,7 @@ namespace WixToolset.Core // if at least one row in Upgrade table lacks the OnlyDetect attribute. if (!onlyDetect) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixAction, "InstallExecuteSequence", "RemoveExistingProducts"); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixAction, "InstallExecuteSequence", "RemoveExistingProducts"); } } } @@ -4923,7 +4923,7 @@ namespace WixToolset.Core break; case "TargetFile": targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, targetFile); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, targetFile); break; case "TargetProperty": targetProperty = this.Core.GetAttributeValue(sourceLineNumbers, attrib); @@ -4980,7 +4980,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new VerbTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new VerbSymbol(sourceLineNumbers) { ExtensionRef = extension, Verb = id, @@ -4990,7 +4990,7 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != sequence) { - tuple.Sequence = sequence; + symbol.Sequence = sequence; } } } @@ -5086,7 +5086,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixVariableTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixVariableSymbol(sourceLineNumbers, id) { Value = value, Overridable = overridable diff --git a/src/WixToolset.Core/Compiler_Bundle.cs b/src/WixToolset.Core/Compiler_Bundle.cs index d88cb7f5..578c7dcd 100644 --- a/src/WixToolset.Core/Compiler_Bundle.cs +++ b/src/WixToolset.Core/Compiler_Bundle.cs @@ -11,7 +11,7 @@ namespace WixToolset.Core using System.Xml.Linq; using WixToolset.Data; using WixToolset.Data.Burn; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; /// @@ -85,7 +85,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixApprovedExeForElevationTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixApprovedExeForElevationSymbol(sourceLineNumbers, id) { Key = key, ValueName = valueName, @@ -287,7 +287,7 @@ namespace WixToolset.Core this.ParseBundleExtensionElement(child); break; case "BundleExtensionRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixBundleExtension); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleExtension); break; case "OptionalUpdateRegistration": this.ParseOptionalUpdateRegistrationElement(child, manufacturer, parentName, name); @@ -308,7 +308,7 @@ namespace WixToolset.Core this.ParseContainerElement(child); break; case "ContainerRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixBundleContainer); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleContainer); break; case "Log": if (logSeen) @@ -332,7 +332,7 @@ namespace WixToolset.Core this.ParseSetVariableElement(child); break; case "SetVariableRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixSetVariable); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixSetVariable); break; case "Update": this.ParseUpdateElement(child); @@ -361,7 +361,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new WixBundleTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new WixBundleSymbol(sourceLineNumbers) { UpgradeCode = upgradeCode, Version = version, @@ -385,46 +385,46 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(logVariablePrefixAndExtension)) { var split = logVariablePrefixAndExtension.Split(':'); - tuple.LogPathVariable = split[0]; - tuple.LogPrefix = split[1]; - tuple.LogExtension = split[2]; + symbol.LogPathVariable = split[0]; + symbol.LogPrefix = split[1]; + symbol.LogExtension = split[2]; } if (null != upgradeCode) { - this.Core.AddTuple(new WixRelatedBundleTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixRelatedBundleSymbol(sourceLineNumbers) { BundleId = upgradeCode, Action = RelatedBundleActionType.Upgrade, }); } - this.Core.AddTuple(new WixBundleContainerTuple(sourceLineNumbers, Compiler.BurnDefaultAttachedContainerId) + this.Core.AddSymbol(new WixBundleContainerSymbol(sourceLineNumbers, Compiler.BurnDefaultAttachedContainerId) { Name = "bundle-attached.cab", Type = ContainerType.Attached, }); // Ensure that the bundle stores the well-known persisted values. - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_NAME)) + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_NAME)) { Hidden = false, Persisted = true, }); - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE)) + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE)) { Hidden = false, Persisted = true, }); - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE_FOLDER)) + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_ORIGINAL_SOURCE_FOLDER)) { Hidden = false, Persisted = true, }); - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_LAST_USED_SOURCE)) + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, BurnConstants.BURN_BUNDLE_LAST_USED_SOURCE)) { Hidden = false, Persisted = true, @@ -529,7 +529,7 @@ namespace WixToolset.Core { this.CreatePayloadRow(sourceLineNumbers, id, Path.GetFileName(sourceFile), sourceFile, null, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId, ComplexReferenceChildType.Unknown, null, YesNoDefaultType.Yes, YesNoType.Yes, null, null, null); - this.Core.AddTuple(new WixBundleCatalogTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixBundleCatalogSymbol(sourceLineNumbers, id) { PayloadRef = id.Id, }); @@ -631,7 +631,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundleContainerTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixBundleContainerSymbol(sourceLineNumbers, id) { Name = name, Type = type, @@ -694,7 +694,7 @@ namespace WixToolset.Core // Add the application as an attached container and if an Id was provided add that too. if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundleContainerTuple(sourceLineNumbers, Compiler.BurnUXContainerId) + this.Core.AddSymbol(new WixBundleContainerSymbol(sourceLineNumbers, Compiler.BurnUXContainerId) { Name = "bundle-ux.cab", Type = ContainerType.Attached @@ -702,7 +702,7 @@ namespace WixToolset.Core if (null != id) { - this.Core.AddTuple(new WixBootstrapperApplicationTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixBootstrapperApplicationSymbol(sourceLineNumbers, id)); } } } @@ -770,7 +770,7 @@ namespace WixToolset.Core } else { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBootstrapperApplication, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBootstrapperApplication, id); } } @@ -786,7 +786,7 @@ namespace WixToolset.Core string customDataId = null; WixBundleCustomDataType? customDataType = null; string extensionId = null; - var attributeDefinitions = new List(); + var attributeDefinitions = new List(); var foundAttributeDefinitions = false; foreach (var attrib in node.Attributes()) @@ -816,7 +816,7 @@ namespace WixToolset.Core break; case "ExtensionId": extensionId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundleExtension, extensionId); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundleExtension, extensionId); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -890,9 +890,9 @@ namespace WixToolset.Core { if (!this.Core.EncounteredError) { - var attributeNames = String.Join(new string(WixBundleCustomDataTuple.AttributeNamesSeparator, 1), attributeDefinitions.Select(c => c.Name)); + var attributeNames = String.Join(new string(WixBundleCustomDataSymbol.AttributeNamesSeparator, 1), attributeDefinitions.Select(c => c.Name)); - this.Core.AddTuple(new WixBundleCustomDataTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, customDataId)) + this.Core.AddSymbol(new WixBundleCustomDataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, customDataId)) { AttributeNames = attributeNames, Type = customDataType.Value, @@ -975,7 +975,7 @@ namespace WixToolset.Core /// Element to parse. /// Element's SourceLineNumbers. /// BundleCustomData Id. - private WixBundleCustomDataAttributeTuple ParseBundleAttributeDefinitionElement(XElement node, SourceLineNumber sourceLineNumbers, string customDataId) + private WixBundleCustomDataAttributeSymbol ParseBundleAttributeDefinitionElement(XElement node, SourceLineNumber sourceLineNumbers, string customDataId) { string attributeName = null; @@ -1004,7 +1004,7 @@ namespace WixToolset.Core return null; } - var customDataAttribute = this.Core.AddTuple(new WixBundleCustomDataAttributeTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, attributeName)) + var customDataAttribute = this.Core.AddSymbol(new WixBundleCustomDataAttributeSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, attributeName)) { CustomDataRef = customDataId, Name = attributeName, @@ -1058,7 +1058,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundleCustomDataCellTuple(childSourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, elementId, attributeName)) + this.Core.AddSymbol(new WixBundleCustomDataCellSymbol(childSourceLineNumbers, new Identifier(AccessModifier.Private, customDataId, elementId, attributeName)) { ElementId = elementId, AttributeRef = attributeName, @@ -1075,7 +1075,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundleCustomData, customDataId); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundleCustomData, customDataId); } } @@ -1138,7 +1138,7 @@ namespace WixToolset.Core // Add the BundleExtension. if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundleExtensionTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixBundleExtensionSymbol(sourceLineNumbers, id) { PayloadRef = id.Id, }); @@ -1236,7 +1236,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixUpdateRegistrationTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixUpdateRegistrationSymbol(sourceLineNumbers) { Manufacturer = manufacturer, Department = department, @@ -1493,15 +1493,15 @@ namespace WixToolset.Core /// Element to parse /// ComplexReferenceParentType of parent element /// Identifier of parent element. - private WixBundlePayloadTuple CreatePayloadRow(SourceLineNumber sourceLineNumbers, Identifier id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType, + private WixBundlePayloadSymbol CreatePayloadRow(SourceLineNumber sourceLineNumbers, Identifier id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, YesNoDefaultType compressed, YesNoType enableSignatureVerification, string displayName, string description, RemotePayload remotePayload) { - WixBundlePayloadTuple tuple = null; + WixBundlePayloadSymbol symbol = null; if (!this.Core.EncounteredError) { - tuple = this.Core.AddTuple(new WixBundlePayloadTuple(sourceLineNumbers, id) + symbol = this.Core.AddSymbol(new WixBundlePayloadSymbol(sourceLineNumbers, id) { Name = String.IsNullOrEmpty(name) ? Path.GetFileName(sourceFile) : name, SourceFile = new IntermediateFieldPathValue { Path = sourceFile }, @@ -1515,19 +1515,19 @@ namespace WixToolset.Core if (null != remotePayload) { - tuple.Description = remotePayload.Description; - tuple.DisplayName = remotePayload.ProductName; - tuple.Hash = remotePayload.Hash; - tuple.PublicKey = remotePayload.CertificatePublicKey; - tuple.Thumbprint = remotePayload.CertificateThumbprint; - tuple.FileSize = remotePayload.Size; - tuple.Version = remotePayload.Version; + symbol.Description = remotePayload.Description; + symbol.DisplayName = remotePayload.ProductName; + symbol.Hash = remotePayload.Hash; + symbol.PublicKey = remotePayload.CertificatePublicKey; + symbol.Thumbprint = remotePayload.CertificateThumbprint; + symbol.FileSize = remotePayload.Size; + symbol.Version = remotePayload.Version; } this.CreateGroupAndOrderingRows(sourceLineNumbers, parentType, parentId.Id, ComplexReferenceChildType.Payload, id.Id, previousType, previousId?.Id); } - return tuple; + return symbol; } /// @@ -1599,7 +1599,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundlePayloadGroupTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixBundlePayloadGroupSymbol(sourceLineNumbers, id)); this.CreateGroupAndOrderingRows(sourceLineNumbers, parentType, parentId?.Id, ComplexReferenceChildType.PayloadGroup, id.Id, ComplexReferenceChildType.Unknown, null); } @@ -1627,7 +1627,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundlePayloadGroup, id.Id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, id.Id); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -1682,7 +1682,7 @@ namespace WixToolset.Core // TODO: Should we define our own enum for this, just to ensure there's no "cross-contamination"? // TODO: Also, we could potentially include an 'Attributes' field to track things like // 'before' vs. 'after', and explicit vs. inferred dependencies. - this.Core.AddTuple(new WixOrderingTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixOrderingSymbol(sourceLineNumbers) { ItemType = type, ItemIdRef = id, @@ -1739,7 +1739,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundlePackageExitCodeTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixBundlePackageExitCodeSymbol(sourceLineNumbers) { ChainPackageId = packageId, Code = value, @@ -1847,7 +1847,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixChainTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixChainSymbol(sourceLineNumbers) { Attributes = attributes }); @@ -2393,13 +2393,13 @@ namespace WixToolset.Core this.CreatePayloadRow(sourceLineNumbers, id, name, sourceFile, downloadUrl, ComplexReferenceParentType.Package, id, ComplexReferenceChildType.Unknown, null, compressed, enableSignatureVerification, displayName, description, remotePayload); - this.Core.AddTuple(new WixChainItemTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixChainItemSymbol(sourceLineNumbers, id)); WixBundlePackageAttributes attributes = 0; attributes |= (YesNoType.Yes == permanent) ? WixBundlePackageAttributes.Permanent : 0; attributes |= (YesNoType.Yes == visible) ? WixBundlePackageAttributes.Visible : 0; - var chainPackageTuple = this.Core.AddTuple(new WixBundlePackageTuple(sourceLineNumbers, id) + var chainPackageSymbol = this.Core.AddSymbol(new WixBundlePackageSymbol(sourceLineNumbers, id) { Type = packageType, PayloadRef = id.Id, @@ -2412,28 +2412,28 @@ namespace WixToolset.Core if (YesNoAlwaysType.NotSet != cache) { - chainPackageTuple.Cache = cache; + chainPackageSymbol.Cache = cache; } if (YesNoType.NotSet != vital) { - chainPackageTuple.Vital = (vital == YesNoType.Yes); + chainPackageSymbol.Vital = (vital == YesNoType.Yes); } if (YesNoDefaultType.NotSet != perMachine) { - chainPackageTuple.PerMachine = perMachine; + chainPackageSymbol.PerMachine = perMachine; } if (CompilerConstants.IntegerNotSet != installSize) { - chainPackageTuple.InstallSize = installSize; + chainPackageSymbol.InstallSize = installSize; } switch (packageType) { case WixBundlePackageType.Exe: - this.Core.AddTuple(new WixBundleExePackageTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixBundleExePackageSymbol(sourceLineNumbers, id) { Attributes = WixBundleExePackageAttributes.None, DetectCondition = detectCondition, @@ -2449,7 +2449,7 @@ namespace WixToolset.Core msiAttributes |= (YesNoType.Yes == enableFeatureSelection) ? WixBundleMsiPackageAttributes.EnableFeatureSelection : 0; msiAttributes |= (YesNoType.Yes == forcePerMachine) ? WixBundleMsiPackageAttributes.ForcePerMachine : 0; - this.Core.AddTuple(new WixBundleMsiPackageTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixBundleMsiPackageSymbol(sourceLineNumbers, id) { Attributes = msiAttributes }); @@ -2459,14 +2459,14 @@ namespace WixToolset.Core WixBundleMspPackageAttributes mspAttributes = 0; mspAttributes |= (YesNoType.Yes == slipstream) ? WixBundleMspPackageAttributes.Slipstream : 0; - this.Core.AddTuple(new WixBundleMspPackageTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixBundleMspPackageSymbol(sourceLineNumbers, id) { Attributes = mspAttributes }); break; case WixBundlePackageType.Msu: - this.Core.AddTuple(new WixBundleMsuPackageTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixBundleMsuPackageSymbol(sourceLineNumbers, id) { DetectCondition = detectCondition, MsuKB = msuKB @@ -2530,7 +2530,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundlePackageCommandLineTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixBundlePackageCommandLineSymbol(sourceLineNumbers) { WixBundlePackageRef = packageId, InstallArgument = installArgument, @@ -2622,7 +2622,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundlePackageGroupTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixBundlePackageGroupSymbol(sourceLineNumbers, id)); } } @@ -2664,7 +2664,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundlePackageGroup, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundlePackageGroup, id); break; case "After": after = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); @@ -2717,9 +2717,9 @@ namespace WixToolset.Core /// Identifier of previous item, if any. private void CreateRollbackBoundary(SourceLineNumber sourceLineNumbers, Identifier id, YesNoType vital, YesNoType transaction, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId) { - this.Core.AddTuple(new WixChainItemTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixChainItemSymbol(sourceLineNumbers, id)); - var rollbackBoundary = this.Core.AddTuple(new WixBundleRollbackBoundaryTuple(sourceLineNumbers, id)); + var rollbackBoundary = this.Core.AddSymbol(new WixBundleRollbackBoundarySymbol(sourceLineNumbers, id)); if (YesNoType.NotSet != vital) { @@ -2812,7 +2812,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new WixBundleMsiPropertyTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, name)) + var symbol = this.Core.AddSymbol(new WixBundleMsiPropertySymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, name)) { PackageRef = packageId, Name = name, @@ -2821,7 +2821,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(condition)) { - tuple.Condition = condition; + symbol.Condition = condition; } } } @@ -2844,7 +2844,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixBundlePackage, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundlePackage, id); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -2866,7 +2866,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundleSlipstreamMspTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, id)) + this.Core.AddSymbol(new WixBundleSlipstreamMspSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, packageId, id)) { TargetPackageRef = packageId, MspPackageRef = id @@ -2940,7 +2940,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixRelatedBundleTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixRelatedBundleSymbol(sourceLineNumbers) { BundleId = id, Action = actionType, @@ -2986,7 +2986,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundleUpdateTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixBundleUpdateSymbol(sourceLineNumbers) { Location = location }); @@ -3052,11 +3052,11 @@ namespace WixToolset.Core id = this.Core.CreateIdentifier("sbv", variable, condition, after, value, type); } - this.Core.CreateWixSearchTuple(sourceLineNumbers, node.Name.LocalName, id, variable, condition, after); + this.Core.CreateWixSearchSymbol(sourceLineNumbers, node.Name.LocalName, id, variable, condition, after); if (!this.Messaging.EncounteredError) { - this.Core.AddTuple(new WixSetVariableTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new WixSetVariableSymbol(sourceLineNumbers, id) { Value = value, Type = type, @@ -3130,7 +3130,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixBundleVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, name)) + this.Core.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, name)) { Value = value, Type = type, @@ -3145,7 +3145,7 @@ namespace WixToolset.Core var newType = type; if (newType == null && value != null) { - // Infer the type from the current value... + // Infer the type from the current value... if (value.StartsWith("v", StringComparison.OrdinalIgnoreCase)) { // Version constructor does not support simple "v#" syntax so check to see if the value is diff --git a/src/WixToolset.Core/Compiler_EmbeddedUI.cs b/src/WixToolset.Core/Compiler_EmbeddedUI.cs index 847ee2a8..4353e3cd 100644 --- a/src/WixToolset.Core/Compiler_EmbeddedUI.cs +++ b/src/WixToolset.Core/Compiler_EmbeddedUI.cs @@ -6,7 +6,7 @@ namespace WixToolset.Core using System.IO; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; /// @@ -43,7 +43,7 @@ namespace WixToolset.Core } source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); type = 0x2; - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, source); // add a reference to the appropriate Binary + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, source); // add a reference to the appropriate Binary break; case "CommandLine": commandLine = this.Core.GetAttributeValue(sourceLineNumbers, attrib); @@ -58,7 +58,7 @@ namespace WixToolset.Core } source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); type = 0x12; - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, source); // add a reference to the appropriate File + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, source); // add a reference to the appropriate File break; case "PropertySource": if (null != source) @@ -92,7 +92,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiEmbeddedChainerTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MsiEmbeddedChainerSymbol(sourceLineNumbers, id) { Condition = condition, CommandLine = commandLine, @@ -318,7 +318,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiEmbeddedUITuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MsiEmbeddedUISymbol(sourceLineNumbers, id) { FileName = name, EntryPoint = true, @@ -405,7 +405,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiEmbeddedUITuple(sourceLineNumbers, id) + this.Core.AddSymbol(new MsiEmbeddedUISymbol(sourceLineNumbers, id) { FileName = name, Source = sourceFile diff --git a/src/WixToolset.Core/Compiler_Module.cs b/src/WixToolset.Core/Compiler_Module.cs index 6166ae72..a7d94701 100644 --- a/src/WixToolset.Core/Compiler_Module.cs +++ b/src/WixToolset.Core/Compiler_Module.cs @@ -6,7 +6,7 @@ namespace WixToolset.Core using System.Globalization; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; /// @@ -136,7 +136,7 @@ namespace WixToolset.Core this.ParseCustomActionElement(child); break; case "CustomActionRef": - this.ParseSimpleRefElement(child, TupleDefinitions.CustomAction); + this.ParseSimpleRefElement(child, SymbolDefinitions.CustomAction); break; case "CustomTable": this.ParseCustomTableElement(child); @@ -154,7 +154,7 @@ namespace WixToolset.Core this.ParseEmbeddedChainerElement(child); break; case "EmbeddedChainerRef": - this.ParseSimpleRefElement(child, TupleDefinitions.MsiEmbeddedChainer); + this.ParseSimpleRefElement(child, SymbolDefinitions.MsiEmbeddedChainer); break; case "EnsureTable": this.ParseEnsureTableElement(child); @@ -178,7 +178,7 @@ namespace WixToolset.Core this.ParsePropertyElement(child); break; case "PropertyRef": - this.ParseSimpleRefElement(child, TupleDefinitions.Property); + this.ParseSimpleRefElement(child, SymbolDefinitions.Property); break; case "SetDirectory": this.ParseSetDirectoryElement(child); @@ -197,7 +197,7 @@ namespace WixToolset.Core this.ParseUIElement(child); break; case "UIRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI); break; case "WixVariable": this.ParseWixVariableElement(child); @@ -216,13 +216,13 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new ModuleSignatureTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, this.activeName, this.activeLanguage)) + var symbol = this.Core.AddSymbol(new ModuleSignatureSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, this.activeName, this.activeLanguage)) { ModuleID = this.activeName, Version = version }); - tuple.Set((int)ModuleSignatureTupleFields.Language, this.activeLanguage); + symbol.Set((int)ModuleSignatureSymbolFields.Language, this.activeLanguage); } } finally @@ -284,7 +284,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new ModuleDependencyTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new ModuleDependencySymbol(sourceLineNumbers) { ModuleID = this.activeName, RequiredID = requiredId, @@ -292,7 +292,7 @@ namespace WixToolset.Core RequiredVersion = requiredVersion }); - tuple.Set((int)ModuleDependencyTupleFields.ModuleLanguage, this.activeLanguage); + symbol.Set((int)ModuleDependencySymbolFields.ModuleLanguage, this.activeLanguage); } } @@ -365,7 +365,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new ModuleExclusionTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new ModuleExclusionSymbol(sourceLineNumbers) { ModuleID = this.activeName, ExcludedID = excludedId, @@ -373,8 +373,8 @@ namespace WixToolset.Core ExcludedMaxVersion = excludedMaxVersion }); - tuple.Set((int)ModuleExclusionTupleFields.ModuleLanguage, this.activeLanguage); - tuple.Set((int)ModuleExclusionTupleFields.ExcludedLanguage, excludedLanguageField); + symbol.Set((int)ModuleExclusionSymbolFields.ModuleLanguage, this.activeLanguage); + symbol.Set((int)ModuleExclusionSymbolFields.ExcludedLanguage, excludedLanguageField); } } @@ -485,7 +485,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ModuleConfigurationTuple(sourceLineNumbers, name) + this.Core.AddSymbol(new ModuleConfigurationSymbol(sourceLineNumbers, name) { Format = format, Type = type, @@ -563,7 +563,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ModuleSubstitutionTuple(sourceLineNumbers) + this.Core.AddSymbol(new ModuleSubstitutionSymbol(sourceLineNumbers) { Table = table, Row = rowKeys, @@ -616,7 +616,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixSuppressModularizationTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, name))); + this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, name))); } } @@ -658,7 +658,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ModuleIgnoreTableTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, id))); + this.Core.AddSymbol(new ModuleIgnoreTableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, id))); } } } diff --git a/src/WixToolset.Core/Compiler_Patch.cs b/src/WixToolset.Core/Compiler_Patch.cs index f7481143..73e7f521 100644 --- a/src/WixToolset.Core/Compiler_Patch.cs +++ b/src/WixToolset.Core/Compiler_Patch.cs @@ -8,7 +8,7 @@ namespace WixToolset.Core using System.Globalization; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; /// @@ -197,7 +197,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixPatchIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, patchId)) + this.Core.AddSymbol(new WixPatchIdSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, patchId)) { ClientPatchId = clientPatchId, OptimizePatchSizeForLargeFiles = optimizePatchSizeForLargeFiles, @@ -425,7 +425,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new MsiPatchSequenceTuple(sourceLineNumbers) + this.Core.AddSymbol(new MsiPatchSequenceSymbol(sourceLineNumbers) { PatchFamily = id.Id, ProductCode = productCode, @@ -504,7 +504,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new WixPatchFamilyGroupTuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixPatchFamilyGroupSymbol(sourceLineNumbers, id)); //Add this PatchFamilyGroup and its parent in WixGroup. this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.PatchFamilyGroup, id.Id); @@ -532,7 +532,7 @@ namespace WixToolset.Core { case "Id": id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixPatchFamilyGroup, id); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixPatchFamilyGroup, id); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -621,7 +621,7 @@ namespace WixToolset.Core // By default, target ProductCodes should be added. if (!replace) { - this.Core.AddTuple(new WixPatchTargetTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixPatchTargetSymbol(sourceLineNumbers) { ProductCode = "*" }); @@ -629,7 +629,7 @@ namespace WixToolset.Core foreach (var targetProductCode in targetProductCodes) { - this.Core.AddTuple(new WixPatchTargetTuple(sourceLineNumbers) + this.Core.AddSymbol(new WixPatchTargetSymbol(sourceLineNumbers) { ProductCode = targetProductCode }); @@ -639,7 +639,7 @@ namespace WixToolset.Core private void AddMsiPatchMetadata(SourceLineNumber sourceLineNumbers, string company, string property, string value) { - this.Core.AddTuple(new MsiPatchMetadataTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property)) + this.Core.AddSymbol(new MsiPatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property)) { Company = company, Property = property, diff --git a/src/WixToolset.Core/Compiler_PatchCreation.cs b/src/WixToolset.Core/Compiler_PatchCreation.cs index 3371d84e..ddd07654 100644 --- a/src/WixToolset.Core/Compiler_PatchCreation.cs +++ b/src/WixToolset.Core/Compiler_PatchCreation.cs @@ -7,7 +7,7 @@ namespace WixToolset.Core using System.Globalization; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; /// @@ -258,7 +258,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new ImageFamiliesTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new ImageFamiliesSymbol(sourceLineNumbers) { Family = name, MediaSrcPropName = mediaSrcProp, @@ -268,12 +268,12 @@ namespace WixToolset.Core if (CompilerConstants.IntegerNotSet != diskId) { - tuple.MediaDiskId = diskId; + symbol.MediaDiskId = diskId; } if (CompilerConstants.IntegerNotSet != sequenceStart) { - tuple.FileSequenceStart = sequenceStart; + symbol.FileSequenceStart = sequenceStart; } } } @@ -379,7 +379,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new UpgradedImagesTuple(sourceLineNumbers) + this.Core.AddSymbol(new UpgradedImagesSymbol(sourceLineNumbers) { Upgraded = upgrade, MsiPath = sourceFile, @@ -462,7 +462,7 @@ namespace WixToolset.Core { if (ignore) { - this.Core.AddTuple(new UpgradedFilesToIgnoreTuple(sourceLineNumbers) + this.Core.AddSymbol(new UpgradedFilesToIgnoreSymbol(sourceLineNumbers) { Upgraded = upgrade, FTK = file @@ -470,7 +470,7 @@ namespace WixToolset.Core } else { - this.Core.AddTuple(new UpgradedFilesOptionalDataTuple(sourceLineNumbers) + this.Core.AddSymbol(new UpgradedFilesOptionalDataSymbol(sourceLineNumbers) { Upgraded = upgrade, FTK = file, @@ -591,7 +591,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new TargetImagesTuple(sourceLineNumbers) + this.Core.AddSymbol(new TargetImagesSymbol(sourceLineNumbers) { Target = target, MsiPath = sourceFile, @@ -673,7 +673,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new TargetFilesOptionalDataTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new TargetFilesOptionalDataSymbol(sourceLineNumbers) { Target = target, FTK = file, @@ -684,9 +684,9 @@ namespace WixToolset.Core if (null != protectOffsets) { - tuple.RetainOffsets = protectOffsets; + symbol.RetainOffsets = protectOffsets; - this.Core.AddTuple(new FamilyFileRangesTuple(sourceLineNumbers) + this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers) { Family = family, FTK = file, @@ -793,7 +793,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new ExternalFilesTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new ExternalFilesSymbol(sourceLineNumbers) { Family = family, FTK = file, @@ -805,17 +805,17 @@ namespace WixToolset.Core if (null != protectOffsets) { - tuple.RetainOffsets = protectOffsets; + symbol.RetainOffsets = protectOffsets; } if (CompilerConstants.IntegerNotSet != order) { - tuple.Order = order; + symbol.Order = order; } if (null != protectOffsets) { - this.Core.AddTuple(new FamilyFileRangesTuple(sourceLineNumbers) + this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers) { Family = family, FTK = file, @@ -890,7 +890,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new FamilyFileRangesTuple(sourceLineNumbers) + this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers) { Family = family, FTK = file, @@ -1251,7 +1251,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "ProductCode")); } target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.TargetImages, target); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.TargetImages, target); break; case "Sequence": sequence = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); @@ -1282,7 +1282,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new PatchSequenceTuple(sourceLineNumbers) + this.Core.AddSymbol(new PatchSequenceSymbol(sourceLineNumbers) { PatchFamily = family, Target = target, @@ -1294,7 +1294,7 @@ namespace WixToolset.Core private void AddPatchMetadata(SourceLineNumber sourceLineNumbers, string company, string property, string value) { - this.Core.AddTuple(new PatchMetadataTuple(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property)) + this.Core.AddSymbol(new PatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, company, property)) { Company = company, Property = property, diff --git a/src/WixToolset.Core/Compiler_UI.cs b/src/WixToolset.Core/Compiler_UI.cs index 9038f727..1ecf4f64 100644 --- a/src/WixToolset.Core/Compiler_UI.cs +++ b/src/WixToolset.Core/Compiler_UI.cs @@ -6,7 +6,7 @@ namespace WixToolset.Core using System.Collections; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; @@ -70,13 +70,13 @@ namespace WixToolset.Core this.ParseBillboardActionElement(child); break; case "ComboBox": - this.ParseControlGroupElement(child, TupleDefinitionType.ComboBox, "ListItem"); + this.ParseControlGroupElement(child, SymbolDefinitionType.ComboBox, "ListItem"); break; case "Dialog": this.ParseDialogElement(child); break; case "DialogRef": - this.ParseSimpleRefElement(child, TupleDefinitions.Dialog); + this.ParseSimpleRefElement(child, SymbolDefinitions.Dialog); break; case "EmbeddedUI": if (0 < embeddedUICount) // there can be only one embedded UI @@ -91,10 +91,10 @@ namespace WixToolset.Core this.ParseErrorElement(child); break; case "ListBox": - this.ParseControlGroupElement(child, TupleDefinitionType.ListBox, "ListItem"); + this.ParseControlGroupElement(child, SymbolDefinitionType.ListBox, "ListItem"); break; case "ListView": - this.ParseControlGroupElement(child, TupleDefinitionType.ListView, "ListItem"); + this.ParseControlGroupElement(child, SymbolDefinitionType.ListView, "ListItem"); break; case "ProgressText": this.ParseActionTextElement(child); @@ -132,10 +132,10 @@ namespace WixToolset.Core this.ParsePropertyElement(child); break; case "PropertyRef": - this.ParseSimpleRefElement(child, TupleDefinitions.Property); + this.ParseSimpleRefElement(child, SymbolDefinitions.Property); break; case "UIRef": - this.ParseSimpleRefElement(child, TupleDefinitions.WixUI); + this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI); break; default: @@ -151,7 +151,7 @@ namespace WixToolset.Core if (null != id && !this.Core.EncounteredError) { - this.Core.AddTuple(new WixUITuple(sourceLineNumbers, id)); + this.Core.AddSymbol(new WixUISymbol(sourceLineNumbers, id)); } } @@ -159,10 +159,10 @@ namespace WixToolset.Core /// Parses a list item element. /// /// Element to parse. - /// Type of tuple to create. + /// Type of symbol to create. /// Identifier of property referred to by list item. /// Relative order of list items. - private void ParseListItemElement(XElement node, TupleDefinitionType tupleType, string property, ref int order) + private void ParseListItemElement(XElement node, SymbolDefinitionType symbolType, string property, ref int order) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); string icon = null; @@ -176,10 +176,10 @@ namespace WixToolset.Core switch (attrib.Name.LocalName) { case "Icon": - if (TupleDefinitionType.ListView == tupleType) + if (SymbolDefinitionType.ListView == symbolType) { icon = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, icon); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, icon); } else { @@ -212,10 +212,10 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - switch (tupleType) + switch (symbolType) { - case TupleDefinitionType.ComboBox: - this.Core.AddTuple(new ComboBoxTuple(sourceLineNumbers) + case SymbolDefinitionType.ComboBox: + this.Core.AddSymbol(new ComboBoxSymbol(sourceLineNumbers) { Property = property, Order = ++order, @@ -223,8 +223,8 @@ namespace WixToolset.Core Text = text, }); break; - case TupleDefinitionType.ListBox: - this.Core.AddTuple(new ListBoxTuple(sourceLineNumbers) + case SymbolDefinitionType.ListBox: + this.Core.AddSymbol(new ListBoxSymbol(sourceLineNumbers) { Property = property, Order = ++order, @@ -232,8 +232,8 @@ namespace WixToolset.Core Text = text, }); break; - case TupleDefinitionType.ListView: - var tuple = this.Core.AddTuple(new ListViewTuple(sourceLineNumbers) + case SymbolDefinitionType.ListView: + var symbol = this.Core.AddSymbol(new ListViewSymbol(sourceLineNumbers) { Property = property, Order = ++order, @@ -243,11 +243,11 @@ namespace WixToolset.Core if (null != icon) { - tuple.BinaryRef = icon; + symbol.BinaryRef = icon; } break; default: - throw new ArgumentOutOfRangeException(nameof(tupleType)); + throw new ArgumentOutOfRangeException(nameof(symbolType)); } } } @@ -284,7 +284,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Icon", "Text")); } text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text); type = RadioButtonType.Bitmap; break; case "Height": @@ -299,7 +299,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Text")); } text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text); type = RadioButtonType.Icon; break; case "Text": @@ -365,7 +365,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new RadioButtonTuple(sourceLineNumbers) + var symbol = this.Core.AddSymbol(new RadioButtonSymbol(sourceLineNumbers) { Property = property, Order = ++order, @@ -374,10 +374,10 @@ namespace WixToolset.Core Help = (null != tooltip || null != help) ? String.Concat(tooltip, "|", help) : null }); - tuple.Set((int)RadioButtonTupleFields.X, x); - tuple.Set((int)RadioButtonTupleFields.Y, y); - tuple.Set((int)RadioButtonTupleFields.Width, width); - tuple.Set((int)RadioButtonTupleFields.Height, height); + symbol.Set((int)RadioButtonSymbolFields.X, x); + symbol.Set((int)RadioButtonSymbolFields.Y, y); + symbol.Set((int)RadioButtonSymbolFields.Width, width); + symbol.Set((int)RadioButtonSymbolFields.Height, height); } return type; @@ -401,7 +401,7 @@ namespace WixToolset.Core { case "Id": action = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixAction, "InstallExecuteSequence", action); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixAction, "InstallExecuteSequence", action); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -464,7 +464,7 @@ namespace WixToolset.Core break; case "Feature": feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Feature, feature); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Feature, feature); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -490,12 +490,12 @@ namespace WixToolset.Core { case "Control": // These are all thrown away. - ControlTuple lastTabTuple = null; + ControlSymbol lastTabSymbol = null; string firstControl = null; string defaultControl = null; string cancelControl = null; - this.ParseControlElement(child, id.Id, TupleDefinitionType.BBControl, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl); + this.ParseControlElement(child, id.Id, SymbolDefinitionType.BBControl, ref lastTabSymbol, ref firstControl, ref defaultControl, ref cancelControl); break; default: this.Core.UnexpectedElement(node, child); @@ -511,7 +511,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new BillboardTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new BillboardSymbol(sourceLineNumbers, id) { FeatureRef = feature, Action = action, @@ -524,9 +524,9 @@ namespace WixToolset.Core /// Parses a control group element. /// /// Element to parse. - /// Tuple type referred to by control group. + /// Symbol type referred to by control group. /// Expected child elements. - private void ParseControlGroupElement(XElement node, TupleDefinitionType tupleType, string childTag) + private void ParseControlGroupElement(XElement node, SymbolDefinitionType symbolType, string childTag) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); var order = 0; @@ -569,7 +569,7 @@ namespace WixToolset.Core switch (child.Name.LocalName) { case "ListItem": - this.ParseListItemElement(child, tupleType, property, ref order); + this.ParseListItemElement(child, symbolType, property, ref order); break; case "Property": this.ParsePropertyElement(child); @@ -607,7 +607,7 @@ namespace WixToolset.Core { case "Property": property = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, property); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, property); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -704,7 +704,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ActionTextTuple(sourceLineNumbers) + this.Core.AddSymbol(new ActionTextSymbol(sourceLineNumbers) { Action = action, Description = message, @@ -755,7 +755,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new UITextTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new UITextSymbol(sourceLineNumbers, id) { Text = text, }); @@ -860,7 +860,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - var tuple = this.Core.AddTuple(new TextStyleTuple(sourceLineNumbers, id) + var symbol = this.Core.AddSymbol(new TextStyleSymbol(sourceLineNumbers, id) { FaceName = faceName, Red = red, @@ -872,7 +872,7 @@ namespace WixToolset.Core Underline = underline, }); - tuple.Set((int)TextStyleTupleFields.Size, size); + symbol.Set((int)TextStyleSymbolFields.Size, size); } } @@ -976,7 +976,7 @@ namespace WixToolset.Core id = Identifier.Invalid; } - ControlTuple lastTabTuple = null; + ControlSymbol lastTabSymbol = null; string cancelControl = null; string defaultControl = null; string firstControl = null; @@ -988,7 +988,7 @@ namespace WixToolset.Core switch (child.Name.LocalName) { case "Control": - this.ParseControlElement(child, id.Id, TupleDefinitionType.Control, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl); + this.ParseControlElement(child, id.Id, SymbolDefinitionType.Control, ref lastTabSymbol, ref firstControl, ref defaultControl, ref cancelControl); break; default: this.Core.UnexpectedElement(node, child); @@ -1001,11 +1001,11 @@ namespace WixToolset.Core } } - if (null != lastTabTuple && null != lastTabTuple.Control) + if (null != lastTabSymbol && null != lastTabSymbol.Control) { - if (firstControl != lastTabTuple.Control) + if (firstControl != lastTabSymbol.Control) { - lastTabTuple.NextControlRef = firstControl; + lastTabSymbol.NextControlRef = firstControl; } } @@ -1016,7 +1016,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new DialogTuple(sourceLineNumbers, id) + this.Core.AddSymbol(new DialogSymbol(sourceLineNumbers, id) { HCentering = x, VCentering = y, @@ -1047,12 +1047,12 @@ namespace WixToolset.Core /// Element to parse. /// Identifier for parent dialog. /// Table control belongs in. - /// Last control in the tab order. + /// Last control in the tab order. /// Name of the first control in the tab order. /// Name of the default control. /// Name of the candle control. /// True if the containing dialog tracks disk space. - private void ParseControlElement(XElement node, string dialog, TupleDefinitionType tupleType, ref ControlTuple lastTabTuple, ref string firstControl, ref string defaultControl, ref string cancelControl) + private void ParseControlElement(XElement node, string dialog, SymbolDefinitionType symbolType, ref ControlSymbol lastTabSymbol, ref string firstControl, ref string defaultControl, ref string cancelControl) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); Identifier controlId = null; @@ -1379,13 +1379,13 @@ namespace WixToolset.Core this.ParseBinaryElement(child); break; case "ComboBox": - this.ParseControlGroupElement(child, TupleDefinitionType.ComboBox, "ListItem"); + this.ParseControlGroupElement(child, SymbolDefinitionType.ComboBox, "ListItem"); break; case "ListBox": - this.ParseControlGroupElement(child, TupleDefinitionType.ListBox, "ListItem"); + this.ParseControlGroupElement(child, SymbolDefinitionType.ListBox, "ListItem"); break; case "ListView": - this.ParseControlGroupElement(child, TupleDefinitionType.ListView, "ListItem"); + this.ParseControlGroupElement(child, SymbolDefinitionType.ListView, "ListItem"); break; case "Property": this.ParsePropertyElement(child); @@ -1454,7 +1454,7 @@ namespace WixToolset.Core } // the logic for creating control rows is a little tricky because of the way tabable controls are set - IntermediateTuple tuple = null; + IntermediateSymbol symbol = null; if (!this.Core.EncounteredError) { if ("CheckBox" == controlType) @@ -1469,7 +1469,7 @@ namespace WixToolset.Core } else if (!String.IsNullOrEmpty(property)) { - this.Core.AddTuple(new CheckBoxTuple(sourceLineNumbers) + this.Core.AddSymbol(new CheckBoxSymbol(sourceLineNumbers) { Property = property, Value = checkboxValue, @@ -1477,15 +1477,15 @@ namespace WixToolset.Core } else { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.CheckBox, checkBoxPropertyRef); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.CheckBox, checkBoxPropertyRef); } } var id = new Identifier(controlId.Access, dialog, controlId.Id); - if (TupleDefinitionType.BBControl == tupleType) + if (SymbolDefinitionType.BBControl == symbolType) { - var bbTuple = this.Core.AddTuple(new BBControlTuple(sourceLineNumbers, id) + var bbSymbol = this.Core.AddSymbol(new BBControlSymbol(sourceLineNumbers, id) { BillboardRef = dialog, BBControl = controlId.Id, @@ -1503,16 +1503,16 @@ namespace WixToolset.Core SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile } }); - bbTuple.Set((int)BBControlTupleFields.X, x); - bbTuple.Set((int)BBControlTupleFields.Y, y); - bbTuple.Set((int)BBControlTupleFields.Width, width); - bbTuple.Set((int)BBControlTupleFields.Height, height); + bbSymbol.Set((int)BBControlSymbolFields.X, x); + bbSymbol.Set((int)BBControlSymbolFields.Y, y); + bbSymbol.Set((int)BBControlSymbolFields.Width, width); + bbSymbol.Set((int)BBControlSymbolFields.Height, height); - tuple = bbTuple; + symbol = bbSymbol; } else { - var controlTuple = this.Core.AddTuple(new ControlTuple(sourceLineNumbers, id) + var controlSymbol = this.Core.AddSymbol(new ControlSymbol(sourceLineNumbers, id) { DialogRef = dialog, Control = controlId.Id, @@ -1532,17 +1532,17 @@ namespace WixToolset.Core SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile } }); - controlTuple.Set((int)BBControlTupleFields.X, x); - controlTuple.Set((int)BBControlTupleFields.Y, y); - controlTuple.Set((int)BBControlTupleFields.Width, width); - controlTuple.Set((int)BBControlTupleFields.Height, height); + controlSymbol.Set((int)BBControlSymbolFields.X, x); + controlSymbol.Set((int)BBControlSymbolFields.Y, y); + controlSymbol.Set((int)BBControlSymbolFields.Width, width); + controlSymbol.Set((int)BBControlSymbolFields.Height, height); - tuple = controlTuple; + symbol = controlSymbol; } if (!String.IsNullOrEmpty(defaultCondition)) { - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) { DialogRef = dialog, ControlRef = controlId.Id, @@ -1553,7 +1553,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(enableCondition)) { - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) { DialogRef = dialog, ControlRef = controlId.Id, @@ -1564,7 +1564,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(disableCondition)) { - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) { DialogRef = dialog, ControlRef = controlId.Id, @@ -1575,7 +1575,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(hideCondition)) { - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) { DialogRef = dialog, ControlRef = controlId.Id, @@ -1586,7 +1586,7 @@ namespace WixToolset.Core if (!String.IsNullOrEmpty(showCondition)) { - this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) + this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) { DialogRef = dialog, ControlRef = controlId.Id, @@ -1598,15 +1598,15 @@ namespace WixToolset.Core if (!notTabbable) { - if (tuple is ControlTuple controlTuple) + if (symbol is ControlSymbol controlSymbol) { - if (null != lastTabTuple) + if (null != lastTabSymbol) { - lastTabTuple.NextControlRef = controlTuple.Control; + lastTabSymbol.NextControlRef = controlSymbol.Control; } - lastTabTuple = controlTuple; + lastTabSymbol = controlSymbol; } - else if (tuple != null) + else if (symbol != null) { this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType)); } @@ -1621,7 +1621,7 @@ namespace WixToolset.Core // add a reference if the identifier of the binary entry is known during compilation if (("Bitmap" == controlType || "Icon" == controlType) && Common.IsIdentifier(text)) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text); } } @@ -1665,7 +1665,7 @@ namespace WixToolset.Core this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } dialog = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, dialog); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, dialog); break; case "Event": controlEvent = Compiler.UppercaseFirstChar(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); @@ -1726,7 +1726,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new ControlEventTuple(sourceLineNumbers) + this.Core.AddSymbol(new ControlEventSymbol(sourceLineNumbers) { DialogRef = dialog, ControlRef = control, @@ -1739,18 +1739,18 @@ namespace WixToolset.Core if ("DoAction" == controlEvent && null != argument) { - // if we're not looking at a standard action or a formatted string then create a reference + // if we're not looking at a standard action or a formatted string then create a reference // to the custom action. if (!WindowsInstallerStandard.IsStandardAction(argument) && !Common.ContainsProperty(argument)) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.CustomAction, argument); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.CustomAction, argument); } } // if we're referring to a dialog but not through a property, add it to the references if (("NewDialog" == controlEvent || "SpawnDialog" == controlEvent || "SpawnWaitDialog" == controlEvent || "SelectionBrowse" == controlEvent) && Common.IsIdentifier(argument)) { - this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, argument); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, argument); } } @@ -1793,7 +1793,7 @@ namespace WixToolset.Core if (!this.Core.EncounteredError) { - this.Core.AddTuple(new EventMappingTuple(sourceLineNumbers) + this.Core.AddSymbol(new EventMappingSymbol(sourceLineNumbers) { DialogRef = dialog, ControlRef = control, diff --git a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs index 3c092bd4..7160c32e 100644 --- a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs @@ -12,7 +12,7 @@ namespace WixToolset.Core.ExtensibilityServices using System.Text.RegularExpressions; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; @@ -44,7 +44,7 @@ namespace WixToolset.Core.ExtensibilityServices private IMessaging Messaging { get; } - private ITupleDefinitionCreator Creator { get; set; } + private ISymbolDefinitionCreator Creator { get; set; } public bool ContainsProperty(string possibleProperty) { @@ -54,7 +54,7 @@ namespace WixToolset.Core.ExtensibilityServices public void CreateComplexReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary) { - section.AddTuple(new WixComplexReferenceTuple(sourceLineNumbers) + section.AddSymbol(new WixComplexReferenceSymbol(sourceLineNumbers) { Parent = parentId, ParentType = parentType, @@ -64,16 +64,16 @@ namespace WixToolset.Core.ExtensibilityServices IsPrimary = isPrimary }); - this.CreateWixGroupTuple(section, sourceLineNumbers, parentType, parentId, childType, childId); + this.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId); } [Obsolete] public Identifier CreateDirectoryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null) { - return this.CreateDirectoryTuple(section, sourceLineNumbers, id, parentId, name, sectionInlinedDirectoryIds, shortName, sourceName, shortSourceName); + return this.CreateDirectorySymbol(section, sourceLineNumbers, id, parentId, name, sectionInlinedDirectoryIds, shortName, sourceName, shortSourceName); } - public Identifier CreateDirectoryTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null) + public Identifier CreateDirectorySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null) { if (String.IsNullOrEmpty(shortName) && !name.Equals("SourceDir") && !this.IsValidShortFilename(name)) { @@ -86,7 +86,7 @@ namespace WixToolset.Core.ExtensibilityServices } // For anonymous directories, create the identifier. If this identifier already exists in the - // active section, bail so we don't add duplicate anonymous directory tuples (which are legal + // active section, bail so we don't add duplicate anonymous directory symbols (which are legal // but bloat the intermediate and ultimately make the linker do "busy work"). if (null == id) { @@ -98,7 +98,7 @@ namespace WixToolset.Core.ExtensibilityServices } } - var tuple = section.AddTuple(new DirectoryTuple(sourceLineNumbers, id) + var symbol = section.AddSymbol(new DirectorySymbol(sourceLineNumbers, id) { ParentDirectoryRef = parentId, Name = name, @@ -107,7 +107,7 @@ namespace WixToolset.Core.ExtensibilityServices SourceShortName = shortSourceName }); - return tuple.Id; + return symbol.Id; } public string CreateDirectoryReferenceFromInlineSyntax(IntermediateSection section, SourceLineNumber sourceLineNumbers, string parentId, XAttribute attribute, ISet sectionInlinedDirectoryIds) @@ -122,9 +122,9 @@ namespace WixToolset.Core.ExtensibilityServices if (1 == inlineSyntax.Length) { id = inlineSyntax[0]; - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, id); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, id); } - else // start creating tuples for the entries in the inline syntax + else // start creating symbols for the entries in the inline syntax { id = parentId; @@ -138,14 +138,14 @@ namespace WixToolset.Core.ExtensibilityServices //} id = inlineSyntax[0].TrimEnd(':'); - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, id); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, id); pathStartsAt = 1; } for (var i = pathStartsAt; i < inlineSyntax.Length; ++i) { - var inlineId = this.CreateDirectoryTuple(section, sourceLineNumbers, null, id, inlineSyntax[i], sectionInlinedDirectoryIds); + var inlineId = this.CreateDirectorySymbol(section, sourceLineNumbers, null, id, inlineSyntax[i], sectionInlinedDirectoryIds); id = inlineId.Id; } } @@ -174,10 +174,10 @@ namespace WixToolset.Core.ExtensibilityServices [Obsolete] public Identifier CreateRegistryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash) { - return this.CreateRegistryTuple(section, sourceLineNumbers, root, key, name, value, componentId, escapeLeadingHash); + return this.CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, escapeLeadingHash); } - public Identifier CreateRegistryTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash) + public Identifier CreateRegistrySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash) { if (RegistryRootType.Unknown == root) { @@ -202,7 +202,7 @@ namespace WixToolset.Core.ExtensibilityServices var id = this.CreateIdentifier("reg", componentId, ((int)root).ToString(CultureInfo.InvariantCulture.NumberFormat), key.ToLowerInvariant(), (null != name ? name.ToLowerInvariant() : name)); - var tuple = section.AddTuple(new RegistryTuple(sourceLineNumbers, id) + var symbol = section.AddSymbol(new RegistrySymbol(sourceLineNumbers, id) { Root = root, Key = key, @@ -211,30 +211,30 @@ namespace WixToolset.Core.ExtensibilityServices ComponentRef = componentId, }); - return tuple.Id; + return symbol.Id; } - public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, params string[] primaryKeys) + public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys) { - section.AddTuple(new WixSimpleReferenceTuple(sourceLineNumbers) + section.AddSymbol(new WixSimpleReferenceSymbol(sourceLineNumbers) { - Table = tupleName, + Table = symbolName, PrimaryKeys = String.Join("/", primaryKeys) }); } - public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, params string[] primaryKeys) + public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys) { - this.CreateSimpleReference(section, sourceLineNumbers, tupleDefinition.Name, primaryKeys); + this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKeys); } [Obsolete] public void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId) { - this.CreateWixGroupTuple(section, sourceLineNumbers, parentType, parentId, childType, childId); + this.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId); } - public void CreateWixGroupTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId) + public void CreateWixGroupSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId) { if (null == parentId || ComplexReferenceParentType.Unknown == parentType) { @@ -246,7 +246,7 @@ namespace WixToolset.Core.ExtensibilityServices throw new ArgumentNullException("childId"); } - section.AddTuple(new WixGroupTuple(sourceLineNumbers) + section.AddSymbol(new WixGroupSymbol(sourceLineNumbers) { ParentId = parentId, ParentType = parentType, @@ -255,7 +255,7 @@ namespace WixToolset.Core.ExtensibilityServices }); } - public void CreateWixSearchTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId) + public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId) { // TODO: verify variable is not a standard bundle variable if (variable == null) @@ -263,7 +263,7 @@ namespace WixToolset.Core.ExtensibilityServices this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, elementName, "Variable")); } - section.AddTuple(new WixSearchTuple(sourceLineNumbers, id) + section.AddSymbol(new WixSearchSymbol(sourceLineNumbers, id) { Variable = variable, Condition = condition, @@ -272,20 +272,20 @@ namespace WixToolset.Core.ExtensibilityServices if (after != null) { - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixSearch, after); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixSearch, after); // TODO: We're currently defaulting to "always run after", which we will need to change... - this.CreateWixSearchRelationTuple(section, sourceLineNumbers, id, after, 2); + this.CreateWixSearchRelationSymbol(section, sourceLineNumbers, id, after, 2); } if (!String.IsNullOrEmpty(bundleExtensionId)) { - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixBundleExtension, bundleExtensionId); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundleExtension, bundleExtensionId); } } - public void CreateWixSearchRelationTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes) + public void CreateWixSearchRelationSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes) { - section.AddTuple(new WixSearchRelationTuple(sourceLineNumbers, id) + section.AddSymbol(new WixSearchRelationSymbol(sourceLineNumbers, id) { ParentSearchRef = parentId, Attributes = attributes, @@ -293,43 +293,43 @@ namespace WixToolset.Core.ExtensibilityServices } [Obsolete] - public IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null) + public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null) { - return this.CreateTuple(section, sourceLineNumbers, tableName, identifier); + return this.CreateSymbol(section, sourceLineNumbers, tableName, identifier); } [Obsolete] - public IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null) + public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null) { - return this.CreateTuple(section, sourceLineNumbers, tupleType, identifier); + return this.CreateSymbol(section, sourceLineNumbers, symbolType, identifier); } - public IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, Identifier identifier = null) + public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, Identifier identifier = null) { if (this.Creator == null) { - this.CreateTupleDefinitionCreator(); + this.CreateSymbolDefinitionCreator(); } - if (!this.Creator.TryGetTupleDefinitionByName(tupleName, out var tupleDefinition)) + if (!this.Creator.TryGetSymbolDefinitionByName(symbolName, out var symbolDefinition)) { - throw new ArgumentException(nameof(tupleName)); + throw new ArgumentException(nameof(symbolName)); } - return this.CreateTuple(section, sourceLineNumbers, tupleDefinition, identifier); + return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier); } [Obsolete] - public IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null) + public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null) { - var tupleDefinition = TupleDefinitions.ByType(tupleType); + var symbolDefinition = SymbolDefinitions.ByType(symbolType); - return this.CreateTuple(section, sourceLineNumbers, tupleDefinition, identifier); + return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier); } - public IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, Identifier identifier = null) + public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, Identifier identifier = null) { - return section.AddTuple(tupleDefinition.CreateTuple(sourceLineNumbers, identifier)); + return section.AddSymbol(symbolDefinition.CreateSymbol(sourceLineNumbers, identifier)); } public string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args) @@ -384,34 +384,34 @@ namespace WixToolset.Core.ExtensibilityServices public void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition) { - section.AddTuple(new WixEnsureTableTuple(sourceLineNumbers) + section.AddSymbol(new WixEnsureTableSymbol(sourceLineNumbers) { Table = tableDefinition.Name, }); // TODO: Check if the given table definition is a custom table. For now we have to assume that it isn't. - //this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixCustomTable, tableDefinition.Name); + //this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixCustomTable, tableDefinition.Name); } public void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName) { - section.AddTuple(new WixEnsureTableTuple(sourceLineNumbers) + section.AddSymbol(new WixEnsureTableSymbol(sourceLineNumbers) { Table = tableName, }); if (this.Creator == null) { - this.CreateTupleDefinitionCreator(); + this.CreateSymbolDefinitionCreator(); } - // TODO: The tableName may not be the same as the tupleName. For now, we have to assume that it is. + // TODO: The tableName may not be the same as the symbolName. For now, we have to assume that it is. // We don't add custom table definitions to the tableDefinitions collection, // so if it's not in there, it better be a custom table. If the Id is just wrong, // instead of a custom table, we get an unresolved reference at link time. - if (!this.Creator.TryGetTupleDefinitionByName(tableName, out var _)) + if (!this.Creator.TryGetSymbolDefinitionByName(tableName, out var _)) { - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixCustomTable, tableName); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixCustomTable, tableName); } } @@ -898,11 +898,11 @@ namespace WixToolset.Core.ExtensibilityServices } } - public WixActionTuple ScheduleActionTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition, string beforeAction, string afterAction, bool overridable = false) + public WixActionSymbol ScheduleActionSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, AccessModifier access, SequenceTable sequence, string actionName, string condition, string beforeAction, string afterAction, bool overridable = false) { var actionId = new Identifier(access, sequence, actionName); - var actionTuple = section.AddTuple(new WixActionTuple(sourceLineNumbers, actionId) + var actionSymbol = section.AddSymbol(new WixActionSymbol(sourceLineNumbers, actionId) { SequenceTable = sequence, Action = actionName, @@ -916,11 +916,11 @@ namespace WixToolset.Core.ExtensibilityServices { if (WindowsInstallerStandard.IsStandardAction(beforeAction)) { - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), beforeAction); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), beforeAction); } else { - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, beforeAction); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, beforeAction); } } @@ -928,15 +928,15 @@ namespace WixToolset.Core.ExtensibilityServices { if (WindowsInstallerStandard.IsStandardAction(afterAction)) { - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), afterAction); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), afterAction); } else { - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, afterAction); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, afterAction); } } - return actionTuple; + return actionSymbol; } public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform currentPlatform, CustomActionPlatforms supportedPlatforms) @@ -968,7 +968,7 @@ namespace WixToolset.Core.ExtensibilityServices break; } - this.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, name + suffix); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, name + suffix); } } @@ -984,9 +984,9 @@ namespace WixToolset.Core.ExtensibilityServices this.Messaging.Write(ErrorMessages.UnexpectedElement(sourceLineNumbers, parentElement.Name.LocalName, childElement.Name.LocalName)); } - private void CreateTupleDefinitionCreator() + private void CreateSymbolDefinitionCreator() { - this.Creator = this.ServiceProvider.GetService(); + this.Creator = this.ServiceProvider.GetService(); } private static bool TryFindExtension(IEnumerable extensions, XNamespace ns, out ICompilerExtension extension) diff --git a/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs b/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs index 7ef72afc..2bff21d6 100644 --- a/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs +++ b/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs @@ -8,9 +8,9 @@ namespace WixToolset.Core.ExtensibilityServices using WixToolset.Extensibility; using WixToolset.Extensibility.Services; - internal class TupleDefinitionCreator : ITupleDefinitionCreator + internal class SymbolDefinitionCreator : ISymbolDefinitionCreator { - public TupleDefinitionCreator(IWixToolsetServiceProvider serviceProvider) + public SymbolDefinitionCreator(IWixToolsetServiceProvider serviceProvider) { this.ServiceProvider = serviceProvider; } @@ -19,9 +19,9 @@ namespace WixToolset.Core.ExtensibilityServices private IEnumerable ExtensionData { get; set; } - private Dictionary CustomDefinitionByName { get; } = new Dictionary(); + private Dictionary CustomDefinitionByName { get; } = new Dictionary(); - public void AddCustomTupleDefinition(IntermediateTupleDefinition definition) + public void AddCustomSymbolDefinition(IntermediateSymbolDefinition definition) { if (!this.CustomDefinitionByName.TryGetValue(definition.Name, out var existing) || definition.Revision > existing.Revision) { @@ -29,12 +29,12 @@ namespace WixToolset.Core.ExtensibilityServices } } - public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + public bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) { // First, look in the built-ins. - tupleDefinition = TupleDefinitions.ByName(name); + symbolDefinition = SymbolDefinitions.ByName(name); - if (tupleDefinition == null) + if (symbolDefinition == null) { if (this.ExtensionData == null) { @@ -44,20 +44,20 @@ namespace WixToolset.Core.ExtensibilityServices // Second, look in the extensions. foreach (var data in this.ExtensionData) { - if (data.TryGetTupleDefinitionByName(name, out tupleDefinition)) + if (data.TryGetSymbolDefinitionByName(name, out symbolDefinition)) { break; } } - // Finally, look in the custom tuple definitions provided during an intermediate load. - if (tupleDefinition == null) + // Finally, look in the custom symbol definitions provided during an intermediate load. + if (symbolDefinition == null) { - this.CustomDefinitionByName.TryGetValue(name, out tupleDefinition); + this.CustomDefinitionByName.TryGetValue(name, out symbolDefinition); } } - return tupleDefinition != null; + return symbolDefinition != null; } private void LoadExtensionData() diff --git a/src/WixToolset.Core/Librarian.cs b/src/WixToolset.Core/Librarian.cs index 0c519b88..6dc8611d 100644 --- a/src/WixToolset.Core/Librarian.cs +++ b/src/WixToolset.Core/Librarian.cs @@ -89,17 +89,17 @@ namespace WixToolset.Core var fileResolver = new FileResolver(context.BindPaths, context.Extensions); - foreach (var tuple in sections.SelectMany(s => s.Tuples)) + foreach (var symbol in sections.SelectMany(s => s.Symbols)) { - foreach (var field in tuple.Fields.Where(f => f?.Type == IntermediateFieldType.Path)) + foreach (var field in symbol.Fields.Where(f => f?.Type == IntermediateFieldType.Path)) { var pathField = field.AsPath(); if (pathField != null && !String.IsNullOrEmpty(pathField.Path)) { - var resolution = variableResolver.ResolveVariables(tuple.SourceLineNumbers, pathField.Path); + var resolution = variableResolver.ResolveVariables(symbol.SourceLineNumbers, pathField.Path); - var file = fileResolver.Resolve(tuple.SourceLineNumbers, tuple.Definition, resolution.Value); + var file = fileResolver.Resolve(symbol.SourceLineNumbers, symbol.Definition, resolution.Value); if (!String.IsNullOrEmpty(file)) { @@ -108,7 +108,7 @@ namespace WixToolset.Core } else { - this.Messaging.Write(ErrorMessages.FileNotFound(tuple.SourceLineNumbers, pathField.Path, tuple.Definition.Name)); + this.Messaging.Write(ErrorMessages.FileNotFound(symbol.SourceLineNumbers, pathField.Path, symbol.Definition.Name)); } } } diff --git a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs index 31cbf0b8..1c2ca8eb 100644 --- a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs +++ b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs @@ -31,17 +31,17 @@ namespace WixToolset.Core.Link /// /// Gets the collection of loaded symbols. /// - public IDictionary TuplesByName { get; private set; } + public IDictionary SymbolsByName { get; private set; } /// /// Gets the collection of possibly conflicting symbols. /// - public IEnumerable PossibleConflicts { get; private set; } + public IEnumerable PossibleConflicts { get; private set; } public void Execute() { - var tuplesByName = new Dictionary(); - var possibleConflicts = new HashSet(); + var symbolsByName = new Dictionary(); + var possibleConflicts = new HashSet(); if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) { @@ -66,44 +66,44 @@ namespace WixToolset.Core.Link } else { - this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Tuples.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id)); - this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Tuples.FirstOrDefault()?.SourceLineNumbers)); + this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Symbols.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id)); + this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Symbols.FirstOrDefault()?.SourceLineNumbers)); } } // Load all the symbols from the section's tables that create symbols. - foreach (var tuple in section.Tuples.Where(t => t.Id != null)) + foreach (var symbol in section.Symbols.Where(t => t.Id != null)) { - var symbol = new TupleWithSection(section, tuple); + var symbolWithSection = new SymbolWithSection(section, symbol); - if (!tuplesByName.TryGetValue(symbol.Name, out var existingSymbol)) + if (!symbolsByName.TryGetValue(symbolWithSection.Name, out var existingSymbol)) { - tuplesByName.Add(symbol.Name, symbol); + symbolsByName.Add(symbolWithSection.Name, symbolWithSection); } else // uh-oh, duplicate symbols. { // If the duplicate symbols are both private directories, there is a chance that they - // point to identical tuples. Identical directory tuples are redundant and will not cause + // point to identical symbols. Identical directory symbols are redundant and will not cause // conflicts. - if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbol.Access && - TupleDefinitionType.Directory == existingSymbol.Tuple.Definition.Type && existingSymbol.Tuple.IsIdentical(symbol.Tuple)) + if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbolWithSection.Access && + SymbolDefinitionType.Directory == existingSymbol.Symbol.Definition.Type && existingSymbol.Symbol.IsIdentical(symbolWithSection.Symbol)) { - // Ensure identical symbol's tuple is marked redundant to ensure (should the tuple be + // Ensure identical symbol's symbol is marked redundant to ensure (should the symbol be // referenced into the final output) it will not add duplicate primary keys during // the .IDT importing. //symbol.Row.Redundant = true; - TODO: remove this - existingSymbol.AddRedundant(symbol); + existingSymbol.AddRedundant(symbolWithSection); } else { - existingSymbol.AddPossibleConflict(symbol); + existingSymbol.AddPossibleConflict(symbolWithSection); possibleConflicts.Add(existingSymbol); } } } } - this.TuplesByName = tuplesByName; + this.SymbolsByName = symbolsByName; this.PossibleConflicts = possibleConflicts; } } diff --git a/src/WixToolset.Core/Link/IntermediateTupleExtensions.cs b/src/WixToolset.Core/Link/IntermediateTupleExtensions.cs index c4c12e81..db53f1ce 100644 --- a/src/WixToolset.Core/Link/IntermediateTupleExtensions.cs +++ b/src/WixToolset.Core/Link/IntermediateTupleExtensions.cs @@ -4,12 +4,12 @@ namespace WixToolset.Core.Link { using WixToolset.Data; - internal static class IntermediateTupleExtensions + internal static class IntermediateSymbolExtensions { - public static bool IsIdentical(this IntermediateTuple first, IntermediateTuple second) + public static bool IsIdentical(this IntermediateSymbol first, IntermediateSymbol second) { - var identical = (first.Definition.Type == second.Definition.Type && - first.Definition.Name == second.Definition.Name && + var identical = (first.Definition.Type == second.Definition.Type && + first.Definition.Name == second.Definition.Name && first.Definition.FieldDefinitions.Length == second.Definition.FieldDefinitions.Length); for (int i = 0; identical && i < first.Definition.FieldDefinitions.Length; ++i) diff --git a/src/WixToolset.Core/Link/ReportConflictingTuplesCommand.cs b/src/WixToolset.Core/Link/ReportConflictingTuplesCommand.cs index ff01f573..ace2e19d 100644 --- a/src/WixToolset.Core/Link/ReportConflictingTuplesCommand.cs +++ b/src/WixToolset.Core/Link/ReportConflictingTuplesCommand.cs @@ -7,9 +7,9 @@ namespace WixToolset.Core.Link using WixToolset.Data; using WixToolset.Extensibility.Services; - internal class ReportConflictingTuplesCommand + internal class ReportConflictingSymbolsCommand { - public ReportConflictingTuplesCommand(IMessaging messaging, IEnumerable possibleConflicts, IEnumerable resolvedSections) + public ReportConflictingSymbolsCommand(IMessaging messaging, IEnumerable possibleConflicts, IEnumerable resolvedSections) { this.Messaging = messaging; this.PossibleConflicts = possibleConflicts; @@ -18,18 +18,18 @@ namespace WixToolset.Core.Link private IMessaging Messaging { get; } - private IEnumerable PossibleConflicts { get; } + private IEnumerable PossibleConflicts { get; } private IEnumerable ResolvedSections { get; } public void Execute() { // Do a quick check if there are any possibly conflicting symbols that don't come from tables that allow - // overriding. Hopefully the tuples with possible conflicts list is usually very short list (empty should + // overriding. Hopefully the symbols with possible conflicts list is usually very short list (empty should // be the most common). If we find any matches, we'll do a more costly check to see if the possible conflicting - // tuples are in sections we actually referenced. From the resulting set, show an error for each duplicate - // (aka: conflicting) tuple. - var illegalDuplicates = this.PossibleConflicts.Where(s => s.Tuple.Definition.Type != TupleDefinitionType.WixAction && s.Tuple.Definition.Type != TupleDefinitionType.WixVariable).ToList(); + // symbols are in sections we actually referenced. From the resulting set, show an error for each duplicate + // (aka: conflicting) symbol. + var illegalDuplicates = this.PossibleConflicts.Where(s => s.Symbol.Definition.Type != SymbolDefinitionType.WixAction && s.Symbol.Definition.Type != SymbolDefinitionType.WixVariable).ToList(); if (0 < illegalDuplicates.Count) { var referencedSections = new HashSet(this.ResolvedSections); @@ -40,11 +40,11 @@ namespace WixToolset.Core.Link if (actuallyReferencedDuplicates.Any()) { - this.Messaging.Write(ErrorMessages.DuplicateSymbol(referencedDuplicate.Tuple.SourceLineNumbers, referencedDuplicate.Name)); + this.Messaging.Write(ErrorMessages.DuplicateSymbol(referencedDuplicate.Symbol.SourceLineNumbers, referencedDuplicate.Name)); foreach (var duplicate in actuallyReferencedDuplicates) { - this.Messaging.Write(ErrorMessages.DuplicateSymbol2(duplicate.Tuple.SourceLineNumbers)); + this.Messaging.Write(ErrorMessages.DuplicateSymbol2(duplicate.Symbol.SourceLineNumbers)); } } } diff --git a/src/WixToolset.Core/Link/ResolveReferencesCommand.cs b/src/WixToolset.Core/Link/ResolveReferencesCommand.cs index 4ffb5443..d2be0699 100644 --- a/src/WixToolset.Core/Link/ResolveReferencesCommand.cs +++ b/src/WixToolset.Core/Link/ResolveReferencesCommand.cs @@ -6,7 +6,7 @@ namespace WixToolset.Core.Link using System.Collections.Generic; using System.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility.Services; /// @@ -15,19 +15,19 @@ namespace WixToolset.Core.Link internal class ResolveReferencesCommand { private readonly IntermediateSection entrySection; - private readonly IDictionary tuplesWithSections; - private HashSet referencedTuples; + private readonly IDictionary symbolsWithSections; + private HashSet referencedSymbols; private HashSet resolvedSections; - public ResolveReferencesCommand(IMessaging messaging, IntermediateSection entrySection, IDictionary tuplesWithSections) + public ResolveReferencesCommand(IMessaging messaging, IntermediateSection entrySection, IDictionary symbolsWithSections) { this.Messaging = messaging; this.entrySection = entrySection; - this.tuplesWithSections = tuplesWithSections; + this.symbolsWithSections = symbolsWithSections; this.BuildingMergeModule = (SectionType.Module == entrySection.Type); } - public IEnumerable ReferencedTupleWithSections => this.referencedTuples; + public IEnumerable ReferencedSymbolWithSections => this.referencedSymbols; public IEnumerable ResolvedSections => this.resolvedSections; @@ -41,7 +41,7 @@ namespace WixToolset.Core.Link public void Execute() { this.resolvedSections = new HashSet(); - this.referencedTuples = new HashSet(); + this.referencedSymbols = new HashSet(); this.RecursivelyResolveReferences(this.entrySection); } @@ -60,10 +60,10 @@ namespace WixToolset.Core.Link } // Process all of the references contained in this section using the collection of - // tuples provided. Then recursively call this method to process the - // located tuple's section. All in all this is a very simple depth-first + // symbols provided. Then recursively call this method to process the + // located symbol's section. All in all this is a very simple depth-first // search of the references per-section. - foreach (var wixSimpleReferenceRow in section.Tuples.OfType()) + foreach (var wixSimpleReferenceRow in section.Symbols.OfType()) { // If we're building a Merge Module, ignore all references to the Media table // because Merge Modules don't have Media tables. @@ -72,44 +72,44 @@ namespace WixToolset.Core.Link continue; } - if (!this.tuplesWithSections.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var tupleWithSection)) + if (!this.symbolsWithSections.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbolWithSection)) { this.Messaging.Write(ErrorMessages.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName)); } - else // see if the tuple (and any of its duplicates) are appropriately accessible. + else // see if the symbol (and any of its duplicates) are appropriately accessible. { - var accessible = this.DetermineAccessibleTuples(section, tupleWithSection); + var accessible = this.DetermineAccessibleSymbols(section, symbolWithSection); if (!accessible.Any()) { - this.Messaging.Write(ErrorMessages.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName, tupleWithSection.Access)); + this.Messaging.Write(ErrorMessages.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName, symbolWithSection.Access)); } else if (1 == accessible.Count) { - var accessibleTuple = accessible[0]; - this.referencedTuples.Add(accessibleTuple); + var accessibleSymbol = accessible[0]; + this.referencedSymbols.Add(accessibleSymbol); - if (null != accessibleTuple.Section) + if (null != accessibleSymbol.Section) { - this.RecursivelyResolveReferences(accessibleTuple.Section); + this.RecursivelyResolveReferences(accessibleSymbol.Section); } } - else // display errors for the duplicate tuples. + else // display errors for the duplicate symbols. { - var accessibleTuple = accessible[0]; + var accessibleSymbol = accessible[0]; var referencingSourceLineNumber = wixSimpleReferenceRow.SourceLineNumbers?.ToString(); if (String.IsNullOrEmpty(referencingSourceLineNumber)) { - this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleTuple.Tuple.SourceLineNumbers, accessibleTuple.Name)); + this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleSymbol.Symbol.SourceLineNumbers, accessibleSymbol.Name)); } else { - this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleTuple.Tuple.SourceLineNumbers, accessibleTuple.Name, referencingSourceLineNumber)); + this.Messaging.Write(ErrorMessages.DuplicateSymbol(accessibleSymbol.Symbol.SourceLineNumbers, accessibleSymbol.Name, referencingSourceLineNumber)); } foreach (var accessibleDuplicate in accessible.Skip(1)) { - this.Messaging.Write(ErrorMessages.DuplicateSymbol2(accessibleDuplicate.Tuple.SourceLineNumbers)); + this.Messaging.Write(ErrorMessages.DuplicateSymbol2(accessibleDuplicate.Symbol.SourceLineNumbers)); } } } @@ -117,67 +117,67 @@ namespace WixToolset.Core.Link } /// - /// Determine if the tuple and any of its duplicates are accessbile by referencing section. + /// Determine if the symbol and any of its duplicates are accessbile by referencing section. /// - /// Section referencing the tuple. - /// Tuple being referenced. - /// List of tuples accessible by referencing section. - private List DetermineAccessibleTuples(IntermediateSection referencingSection, TupleWithSection tupleWithSection) + /// Section referencing the symbol. + /// Symbol being referenced. + /// List of symbols accessible by referencing section. + private List DetermineAccessibleSymbols(IntermediateSection referencingSection, SymbolWithSection symbolWithSection) { - var accessibleTuples = new List(); + var accessibleSymbols = new List(); - if (this.AccessibleTuple(referencingSection, tupleWithSection)) + if (this.AccessibleSymbol(referencingSection, symbolWithSection)) { - accessibleTuples.Add(tupleWithSection); + accessibleSymbols.Add(symbolWithSection); } - foreach (var dupe in tupleWithSection.PossiblyConflicts) + foreach (var dupe in symbolWithSection.PossiblyConflicts) { - // don't count overridable WixActionTuples - var tupleAction = tupleWithSection.Tuple as WixActionTuple; - var dupeAction = dupe.Tuple as WixActionTuple; - if (tupleAction?.Overridable != dupeAction?.Overridable) + // don't count overridable WixActionSymbols + var symbolAction = symbolWithSection.Symbol as WixActionSymbol; + var dupeAction = dupe.Symbol as WixActionSymbol; + if (symbolAction?.Overridable != dupeAction?.Overridable) { continue; } - if (this.AccessibleTuple(referencingSection, dupe)) + if (this.AccessibleSymbol(referencingSection, dupe)) { - accessibleTuples.Add(dupe); + accessibleSymbols.Add(dupe); } } - foreach (var dupe in tupleWithSection.Redundants) + foreach (var dupe in symbolWithSection.Redundants) { - if (this.AccessibleTuple(referencingSection, dupe)) + if (this.AccessibleSymbol(referencingSection, dupe)) { - accessibleTuples.Add(dupe); + accessibleSymbols.Add(dupe); } } - return accessibleTuples; + return accessibleSymbols; } /// - /// Determine if a single tuple is accessible by the referencing section. + /// Determine if a single symbol is accessible by the referencing section. /// - /// Section referencing the tuple. - /// Tuple being referenced. - /// True if tuple is accessible. - private bool AccessibleTuple(IntermediateSection referencingSection, TupleWithSection tupleWithSection) + /// Section referencing the symbol. + /// Symbol being referenced. + /// True if symbol is accessible. + private bool AccessibleSymbol(IntermediateSection referencingSection, SymbolWithSection symbolWithSection) { - switch (tupleWithSection.Access) + switch (symbolWithSection.Access) { case AccessModifier.Public: return true; case AccessModifier.Internal: - return tupleWithSection.Section.CompilationId.Equals(referencingSection.CompilationId) || (null != tupleWithSection.Section.LibraryId && tupleWithSection.Section.LibraryId.Equals(referencingSection.LibraryId)); + return symbolWithSection.Section.CompilationId.Equals(referencingSection.CompilationId) || (null != symbolWithSection.Section.LibraryId && symbolWithSection.Section.LibraryId.Equals(referencingSection.LibraryId)); case AccessModifier.Protected: - return tupleWithSection.Section.CompilationId.Equals(referencingSection.CompilationId); + return symbolWithSection.Section.CompilationId.Equals(referencingSection.CompilationId); case AccessModifier.Private: - return referencingSection == tupleWithSection.Section; + return referencingSection == symbolWithSection.Section; default: - throw new ArgumentOutOfRangeException(nameof(tupleWithSection.Access)); + throw new ArgumentOutOfRangeException(nameof(symbolWithSection.Access)); } } } diff --git a/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs b/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs index 80cafa50..1702d3ca 100644 --- a/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs +++ b/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs @@ -3,17 +3,17 @@ namespace WixToolset.Core.Link { using System; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; - internal static class WixComplexReferenceTupleExtensions + internal static class WixComplexReferenceSymbolExtensions { /// /// Creates a shallow copy of the ComplexReference. /// /// A shallow copy of the ComplexReference. - public static WixComplexReferenceTuple Clone(this WixComplexReferenceTuple source) + public static WixComplexReferenceSymbol Clone(this WixComplexReferenceSymbol source) { - var clone = new WixComplexReferenceTuple(source.SourceLineNumbers, source.Id); + var clone = new WixComplexReferenceSymbol(source.SourceLineNumbers, source.Id); clone.ParentType = source.ParentType; clone.Parent = source.Parent; clone.ParentLanguage = source.ParentLanguage; @@ -29,23 +29,23 @@ namespace WixToolset.Core.Link /// /// Complex reference to compare to. /// Zero if the objects are equivalent, negative number if the provided object is less, positive if greater. - public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple other) + public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol other) { - var comparison = tuple.ChildType - other.ChildType; + var comparison = symbol.ChildType - other.ChildType; if (0 == comparison) { - comparison = String.Compare(tuple.Child, other.Child, StringComparison.Ordinal); + comparison = String.Compare(symbol.Child, other.Child, StringComparison.Ordinal); if (0 == comparison) { - comparison = tuple.ParentType - other.ParentType; + comparison = symbol.ParentType - other.ParentType; if (0 == comparison) { - string thisParentLanguage = null == tuple.ParentLanguage ? String.Empty : tuple.ParentLanguage; + string thisParentLanguage = null == symbol.ParentLanguage ? String.Empty : symbol.ParentLanguage; string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage; comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal); if (0 == comparison) { - comparison = String.Compare(tuple.Parent, other.Parent, StringComparison.Ordinal); + comparison = String.Compare(symbol.Parent, other.Parent, StringComparison.Ordinal); } } } @@ -58,15 +58,15 @@ namespace WixToolset.Core.Link /// Changes all of the parent references to point to the passed in parent reference. /// /// New parent complex reference. - public static void Reparent(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple parent) + public static void Reparent(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol parent) { - tuple.Parent = parent.Parent; - tuple.ParentLanguage = parent.ParentLanguage; - tuple.ParentType = parent.ParentType; + symbol.Parent = parent.Parent; + symbol.ParentLanguage = parent.ParentLanguage; + symbol.ParentType = parent.ParentType; - if (!tuple.IsPrimary) + if (!symbol.IsPrimary) { - tuple.IsPrimary = parent.IsPrimary; + symbol.IsPrimary = parent.IsPrimary; } } } diff --git a/src/WixToolset.Core/Link/WixGroupingOrdering.cs b/src/WixToolset.Core/Link/WixGroupingOrdering.cs index 7e0030ca..a7013062 100644 --- a/src/WixToolset.Core/Link/WixGroupingOrdering.cs +++ b/src/WixToolset.Core/Link/WixGroupingOrdering.cs @@ -10,7 +10,7 @@ namespace WixToolset.Core.Link using System.Linq; using System.Text; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility.Services; using WixToolset.Data.Burn; @@ -155,7 +155,7 @@ namespace WixToolset.Core.Link foreach (int rowIndex in sortedIndexes) { //wixGroupTable.Rows.RemoveAt(rowIndex); - this.EntrySection.Tuples.RemoveAt(rowIndex); + this.EntrySection.Symbols.RemoveAt(rowIndex); } } @@ -173,7 +173,7 @@ namespace WixToolset.Core.Link // groups to read from that table instead. foreach (var item in orderedItems) { - this.EntrySection.AddTuple(new WixGroupTuple(item.Row.SourceLineNumbers) + this.EntrySection.AddSymbol(new WixGroupSymbol(item.Row.SourceLineNumbers) { ParentId = parentId, ParentType = (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), parentType), @@ -238,9 +238,9 @@ namespace WixToolset.Core.Link //} // Collect all of the groups - for (int rowIndex = 0; rowIndex < this.EntrySection.Tuples.Count; ++rowIndex) + for (int rowIndex = 0; rowIndex < this.EntrySection.Symbols.Count; ++rowIndex) { - if (this.EntrySection.Tuples[rowIndex] is WixGroupTuple row) + if (this.EntrySection.Symbols[rowIndex] is WixGroupSymbol row) { var rowParentName = row.ParentId; var rowParentType = row.ParentType.ToString(); @@ -357,7 +357,7 @@ namespace WixToolset.Core.Link // return; //} - foreach (var row in this.EntrySection.Tuples.OfType()) + foreach (var row in this.EntrySection.Symbols.OfType()) { var rowItemType = row.ItemType.ToString(); var rowItemName = row.ItemIdRef; @@ -513,7 +513,7 @@ namespace WixToolset.Core.Link private readonly ItemCollection beforeItems; // for checking for circular references private bool flattenedAfterItems; - public Item(IntermediateTuple row, string type, string id) + public Item(IntermediateSymbol row, string type, string id) { this.Row = row; this.Type = type; @@ -526,7 +526,7 @@ namespace WixToolset.Core.Link this.flattenedAfterItems = false; } - public IntermediateTuple Row { get; private set; } + public IntermediateSymbol Row { get; private set; } public string Type { get; private set; } public string Id { get; private set; } public string Key { get; private set; } diff --git a/src/WixToolset.Core/LinkContext.cs b/src/WixToolset.Core/LinkContext.cs index 65b1179e..2f5ecf59 100644 --- a/src/WixToolset.Core/LinkContext.cs +++ b/src/WixToolset.Core/LinkContext.cs @@ -26,7 +26,7 @@ namespace WixToolset.Core public IEnumerable Intermediates { get; set; } - public ITupleDefinitionCreator TupleDefinitionCreator { get; set; } + public ISymbolDefinitionCreator SymbolDefinitionCreator { get; set; } public CancellationToken CancellationToken { get; set; } } diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 862681bb..cdefa5c7 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs @@ -10,7 +10,7 @@ namespace WixToolset.Core using System.Linq; using WixToolset.Core.Link; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; @@ -60,9 +60,9 @@ namespace WixToolset.Core { this.Context = context; - if (this.Context.TupleDefinitionCreator == null) + if (this.Context.SymbolDefinitionCreator == null) { - this.Context.TupleDefinitionCreator = this.ServiceProvider.GetService(); + this.Context.SymbolDefinitionCreator = this.ServiceProvider.GetService(); } foreach (var extension in this.Context.Extensions) @@ -85,7 +85,7 @@ namespace WixToolset.Core // Add sections from the extensions with data. foreach (var data in this.Context.ExtensionData) { - var library = data.GetLibrary(this.Context.TupleDefinitionCreator); + var library = data.GetLibrary(this.Context.SymbolDefinitionCreator); if (library != null) { @@ -107,7 +107,7 @@ namespace WixToolset.Core var multipleFeatureComponents = new Hashtable(); - var wixVariables = new Dictionary(); + var wixVariables = new Dictionary(); #if MOVE_TO_BACKEND // verify that modularization types match for foreign key relationships @@ -149,12 +149,12 @@ namespace WixToolset.Core throw new WixException(ErrorMessages.MissingEntrySection(this.Context.ExpectedOutputType.ToString())); } - // Add the missing standard action tuples. - this.LoadStandardActions(find.EntrySection, find.TuplesByName); + // Add the missing standard action symbols. + this.LoadStandardActions(find.EntrySection, find.SymbolsByName); - // Resolve the tuple references to find the set of sections we care about for linking. + // Resolve the symbol references to find the set of sections we care about for linking. // Of course, we start with the entry section (that's how it got its name after all). - var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.TuplesByName); + var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.SymbolsByName); resolve.Execute(); @@ -190,16 +190,16 @@ namespace WixToolset.Core } // Display an error message for Components that were not referenced by a Feature. - foreach (var tupleWithSection in resolve.ReferencedTupleWithSections.Where(s => s.Tuple.Definition.Type == TupleDefinitionType.Component)) + foreach (var symbolWithSection in resolve.ReferencedSymbolWithSections.Where(s => s.Symbol.Definition.Type == SymbolDefinitionType.Component)) { - if (!referencedComponents.Contains(tupleWithSection.Name)) + if (!referencedComponents.Contains(symbolWithSection.Name)) { - this.Messaging.Write(ErrorMessages.OrphanedComponent(tupleWithSection.Tuple.SourceLineNumbers, tupleWithSection.Tuple.Id.Id)); + this.Messaging.Write(ErrorMessages.OrphanedComponent(symbolWithSection.Symbol.SourceLineNumbers, symbolWithSection.Symbol.Id.Id)); } } // Report duplicates that would ultimately end up being primary key collisions. - var reportDupes = new ReportConflictingTuplesCommand(this.Messaging, find.PossibleConflicts, resolve.ResolvedSections); + var reportDupes = new ReportConflictingSymbolsCommand(this.Messaging, find.PossibleConflicts, resolve.ResolvedSections); reportDupes.Execute(); if (this.Messaging.EncounteredError) @@ -208,7 +208,7 @@ namespace WixToolset.Core } // resolve the feature to feature connects - this.ResolveFeatureToFeatureConnects(featuresToFeatures, find.TuplesByName); + this.ResolveFeatureToFeatureConnects(featuresToFeatures, find.SymbolsByName); // Create the section to hold the linked content. var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type, find.EntrySection.Codepage); @@ -225,17 +225,17 @@ namespace WixToolset.Core sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture); } - foreach (var tuple in section.Tuples) + foreach (var symbol in section.Symbols) { - var copyTuple = true; // by default, copy tuples. + var copySymbol = true; // by default, copy symbols. // handle special tables - switch (tuple.Definition.Type) + switch (symbol.Definition.Type) { - case TupleDefinitionType.Class: + case SymbolDefinitionType.Class: if (SectionType.Product == resolvedSection.Type) { - this.ResolveFeatures(tuple, (int)ClassTupleFields.ComponentRef, (int)ClassTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); + this.ResolveFeatures(symbol, (int)ClassSymbolFields.ComponentRef, (int)ClassSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); } break; @@ -287,48 +287,48 @@ namespace WixToolset.Core } break; #endif - case TupleDefinitionType.Extension: + case SymbolDefinitionType.Extension: if (SectionType.Product == resolvedSection.Type) { - this.ResolveFeatures(tuple, (int)ExtensionTupleFields.ComponentRef, (int)ExtensionTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); + this.ResolveFeatures(symbol, (int)ExtensionSymbolFields.ComponentRef, (int)ExtensionSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); } break; #if MOVE_TO_BACKEND - case TupleDefinitionType.ModuleSubstitution: + case SymbolDefinitionType.ModuleSubstitution: containsModuleSubstitution = true; break; - case TupleDefinitionType.ModuleConfiguration: + case SymbolDefinitionType.ModuleConfiguration: containsModuleConfiguration = true; break; #endif - case TupleDefinitionType.Assembly: + case SymbolDefinitionType.Assembly: if (SectionType.Product == resolvedSection.Type) { - this.ResolveFeatures(tuple, (int)AssemblyTupleFields.ComponentRef, (int)AssemblyTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); + this.ResolveFeatures(symbol, (int)AssemblySymbolFields.ComponentRef, (int)AssemblySymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); } break; - case TupleDefinitionType.PublishComponent: + case SymbolDefinitionType.PublishComponent: if (SectionType.Product == resolvedSection.Type) { - this.ResolveFeatures(tuple, (int)PublishComponentTupleFields.ComponentRef, (int)PublishComponentTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); + this.ResolveFeatures(symbol, (int)PublishComponentSymbolFields.ComponentRef, (int)PublishComponentSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); } break; - case TupleDefinitionType.Shortcut: + case SymbolDefinitionType.Shortcut: if (SectionType.Product == resolvedSection.Type) { - this.ResolveFeatures(tuple, (int)ShortcutTupleFields.ComponentRef, (int)ShortcutTupleFields.Target, componentsToFeatures, multipleFeatureComponents); + this.ResolveFeatures(symbol, (int)ShortcutSymbolFields.ComponentRef, (int)ShortcutSymbolFields.Target, componentsToFeatures, multipleFeatureComponents); } break; - case TupleDefinitionType.TypeLib: + case SymbolDefinitionType.TypeLib: if (SectionType.Product == resolvedSection.Type) { - this.ResolveFeatures(tuple, (int)TypeLibTupleFields.ComponentRef, (int)TypeLibTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); + this.ResolveFeatures(symbol, (int)TypeLibSymbolFields.ComponentRef, (int)TypeLibSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); } break; @@ -352,51 +352,51 @@ namespace WixToolset.Core break; #endif - case TupleDefinitionType.WixMerge: + case SymbolDefinitionType.WixMerge: if (SectionType.Product == resolvedSection.Type) { - this.ResolveFeatures(tuple, -1, (int)WixMergeTupleFields.FeatureRef, modulesToFeatures, null); + this.ResolveFeatures(symbol, -1, (int)WixMergeSymbolFields.FeatureRef, modulesToFeatures, null); } break; - case TupleDefinitionType.WixComplexReference: - copyTuple = false; + case SymbolDefinitionType.WixComplexReference: + copySymbol = false; break; - case TupleDefinitionType.WixSimpleReference: - copyTuple = false; + case SymbolDefinitionType.WixSimpleReference: + copySymbol = false; break; - case TupleDefinitionType.WixVariable: + case SymbolDefinitionType.WixVariable: // check for colliding values and collect the wix variable rows { - var wixVariableTuple = (WixVariableTuple)tuple; - var id = wixVariableTuple.Id.Id; + var wixVariableSymbol = (WixVariableSymbol)symbol; + var id = wixVariableSymbol.Id.Id; - if (wixVariables.TryGetValue(id, out var collidingTuple)) + if (wixVariables.TryGetValue(id, out var collidingSymbol)) { - if (collidingTuple.Overridable && !wixVariableTuple.Overridable) + if (collidingSymbol.Overridable && !wixVariableSymbol.Overridable) { - wixVariables[id] = wixVariableTuple; + wixVariables[id] = wixVariableSymbol; } - else if (!wixVariableTuple.Overridable || (collidingTuple.Overridable && wixVariableTuple.Overridable)) + else if (!wixVariableSymbol.Overridable || (collidingSymbol.Overridable && wixVariableSymbol.Overridable)) { - this.Messaging.Write(ErrorMessages.WixVariableCollision(wixVariableTuple.SourceLineNumbers, id)); + this.Messaging.Write(ErrorMessages.WixVariableCollision(wixVariableSymbol.SourceLineNumbers, id)); } } else { - wixVariables.Add(id, wixVariableTuple); + wixVariables.Add(id, wixVariableSymbol); } } - copyTuple = false; + copySymbol = false; break; } - if (copyTuple) + if (copySymbol) { - resolvedSection.AddTuple(tuple); + resolvedSection.AddSymbol(symbol); } } } @@ -406,7 +406,7 @@ namespace WixToolset.Core { foreach (var feature in connectToFeature.ConnectFeatures) { - resolvedSection.AddTuple(new WixFeatureModulesTuple + resolvedSection.AddSymbol(new WixFeatureModulesSymbol { FeatureRef = feature, WixMergeRef = connectToFeature.ChildId @@ -462,16 +462,16 @@ namespace WixToolset.Core { //var componentSectionIds = new Dictionary(); - //foreach (var componentTuple in entrySection.Tuples.OfType()) + //foreach (var componentSymbol in entrySection.Symbols.OfType()) //{ - // componentSectionIds.Add(componentTuple.Id.Id, componentTuple.SectionId); + // componentSectionIds.Add(componentSymbol.Id.Id, componentSymbol.SectionId); //} - //foreach (var featureComponentTuple in entrySection.Tuples.OfType()) + //foreach (var featureComponentSymbol in entrySection.Symbols.OfType()) //{ - // if (componentSectionIds.TryGetValue(featureComponentTuple.Component_, out var componentSectionId)) + // if (componentSectionIds.TryGetValue(featureComponentSymbol.Component_, out var componentSectionId)) // { - // featureComponentTuple.SectionId = componentSectionId; + // featureComponentSymbol.SectionId = componentSectionId; // } //} } @@ -544,9 +544,9 @@ namespace WixToolset.Core #endif // copy the wix variable rows to the output after all overriding has been accounted for. - foreach (var tuple in wixVariables.Values) + foreach (var symbol in wixVariables.Values) { - resolvedSection.AddTuple(tuple); + resolvedSection.AddSymbol(symbol); } // Bundles have groups of data that must be flattened in a way different from other types. @@ -734,17 +734,17 @@ namespace WixToolset.Core /// /// Load the standard action symbols. /// - /// Collection of symbols. - private void LoadStandardActions(IntermediateSection section, IDictionary tuplesByName) + /// Collection of symbols. + private void LoadStandardActions(IntermediateSection section, IDictionary symbolsByName) { - foreach (var actionTuple in WindowsInstallerStandard.StandardActions()) + foreach (var actionSymbol in WindowsInstallerStandard.StandardActions()) { - var tupleWithSection = new TupleWithSection(section, actionTuple); + var symbolWithSection = new SymbolWithSection(section, actionSymbol); - // If the action's tuple has not already been defined (i.e. overriden by the user), add it now. - if (!tuplesByName.ContainsKey(tupleWithSection.Name)) + // If the action's symbol has not already been defined (i.e. overriden by the user), add it now. + if (!symbolsByName.ContainsKey(symbolWithSection.Name)) { - tuplesByName.Add(tupleWithSection.Name, tupleWithSection); + symbolsByName.Add(symbolWithSection.Name, symbolWithSection); } } } @@ -752,7 +752,7 @@ namespace WixToolset.Core /// /// Process the complex references. /// - /// Active section to add tuples to. + /// Active section to add symbols to. /// Sections that are referenced during the link process. /// Collection of all components referenced by complex reference. /// Component to feature complex references. @@ -764,8 +764,8 @@ namespace WixToolset.Core foreach (var section in sections) { - // Need ToList since we might want to add tuples while processing. - foreach (var wixComplexReferenceRow in section.Tuples.OfType().ToList()) + // Need ToList since we might want to add symbols while processing. + foreach (var wixComplexReferenceRow in section.Symbols.OfType().ToList()) { ConnectToFeature connection; switch (wixComplexReferenceRow.ParentType) @@ -799,7 +799,7 @@ namespace WixToolset.Core } // add a row to the FeatureComponents table - section.AddTuple(new FeatureComponentsTuple + section.AddSymbol(new FeatureComponentsSymbol { FeatureRef = wixComplexReferenceRow.Parent, ComponentRef = wixComplexReferenceRow.Child, @@ -867,7 +867,7 @@ namespace WixToolset.Core componentsToModules.Add(wixComplexReferenceRow.Child, wixComplexReferenceRow); // should always be new // add a row to the ModuleComponents table - section.AddTuple(new ModuleComponentsTuple + section.AddSymbol(new ModuleComponentsSymbol { Component = wixComplexReferenceRow.Child, ModuleID = wixComplexReferenceRow.Parent, @@ -931,7 +931,7 @@ namespace WixToolset.Core /// Sections that are referenced during the link process. private void FlattenSectionsComplexReferences(IEnumerable sections) { - var parentGroups = new Dictionary>(); + var parentGroups = new Dictionary>(); var parentGroupsSections = new Dictionary(); var parentGroupsNeedingProcessing = new Dictionary(); @@ -945,12 +945,12 @@ namespace WixToolset.Core foreach (var section in sections) { // Count down because we'll sometimes remove items from the list. - for (var i = section.Tuples.Count - 1; i >= 0; --i) + for (var i = section.Symbols.Count - 1; i >= 0; --i) { // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature, // and Module. Non-grouping complex references are simple and // resolved during normal complex reference resolutions. - if (section.Tuples[i] is WixComplexReferenceTuple wixComplexReferenceRow && + if (section.Symbols[i] is WixComplexReferenceSymbol wixComplexReferenceRow && (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.ComponentGroup == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.Feature == wixComplexReferenceRow.ParentType || @@ -965,12 +965,12 @@ namespace WixToolset.Core // Step 2. if (!parentGroups.TryGetValue(parentTypeAndId, out var childrenComplexRefs)) { - childrenComplexRefs = new List(); + childrenComplexRefs = new List(); parentGroups.Add(parentTypeAndId, childrenComplexRefs); } childrenComplexRefs.Add(wixComplexReferenceRow); - section.Tuples.RemoveAt(i); + section.Symbols.RemoveAt(i); // Remember the mapping from set of complex references with a common // parent to their section. We'll need this to add them back to the @@ -1034,7 +1034,7 @@ namespace WixToolset.Core (ComplexReferenceParentType.ComponentGroup != wixComplexReferenceRow.ParentType) && (ComplexReferenceParentType.PatchFamilyGroup != wixComplexReferenceRow.ParentType)) { - section.AddTuple(wixComplexReferenceRow); + section.AddSymbol(wixComplexReferenceRow); } } } @@ -1059,12 +1059,12 @@ namespace WixToolset.Core /// Stack of groups processed thus far. Used to detect loops. /// Hash table of complex references grouped by parent id. /// Hash table of parent groups that still have nested groups that need to be flattened. - private void FlattenGroup(string parentTypeAndId, Stack loopDetector, Dictionary> parentGroups, Dictionary parentGroupsNeedingProcessing) + private void FlattenGroup(string parentTypeAndId, Stack loopDetector, Dictionary> parentGroups, Dictionary parentGroupsNeedingProcessing) { Debug.Assert(parentGroupsNeedingProcessing.ContainsKey(parentTypeAndId)); loopDetector.Push(parentTypeAndId); // push this complex reference parent identfier into the stack for loop verifying - var allNewChildComplexReferences = new List(); + var allNewChildComplexReferences = new List(); var referencesToParent = parentGroups[parentTypeAndId]; foreach (var wixComplexReferenceRow in referencesToParent) @@ -1158,7 +1158,7 @@ namespace WixToolset.Core } } - int ComplexReferenceComparision(WixComplexReferenceTuple x, WixComplexReferenceTuple y) + int ComplexReferenceComparision(WixComplexReferenceSymbol x, WixComplexReferenceSymbol y) { var comparison = x.ChildType - y.ChildType; if (0 == comparison) @@ -1242,11 +1242,11 @@ namespace WixToolset.Core /// /// Feature to feature complex references. /// All symbols loaded from the sections. - private void ResolveFeatureToFeatureConnects(ConnectToFeatureCollection featuresToFeatures, IDictionary allSymbols) + private void ResolveFeatureToFeatureConnects(ConnectToFeatureCollection featuresToFeatures, IDictionary allSymbols) { foreach (ConnectToFeature connection in featuresToFeatures) { - var wixSimpleReferenceRow = new WixSimpleReferenceTuple + var wixSimpleReferenceRow = new WixSimpleReferenceSymbol { Table = "Feature", PrimaryKeys = connection.ChildId @@ -1254,8 +1254,8 @@ namespace WixToolset.Core if (allSymbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbol)) { - var featureTuple = (FeatureTuple)symbol.Tuple; - featureTuple.ParentFeatureRef = connection.PrimaryFeature; + var featureSymbol = (FeatureSymbol)symbol.Symbol; + featureSymbol.ParentFeatureRef = connection.PrimaryFeature; } } } @@ -1308,15 +1308,15 @@ namespace WixToolset.Core /// /// Resolve features for columns that have null guid placeholders. /// - /// Tuple to resolve. + /// Symbol to resolve. /// Number of the column containing the connection identifier. /// Number of the column containing the feature. /// Connect to feature complex references. /// Hashtable of known components under multiple features. - private void ResolveFeatures(IntermediateTuple tuple, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents) + private void ResolveFeatures(IntermediateSymbol symbol, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents) { - var connectionId = connectionColumn < 0 ? tuple.Id.Id : tuple.AsString(connectionColumn); - var featureId = tuple.AsString(featureColumn); + var connectionId = connectionColumn < 0 ? symbol.Id.Id : symbol.AsString(connectionColumn); + var featureId = symbol.AsString(featureColumn); if (EmptyGuid == featureId) { @@ -1327,11 +1327,11 @@ namespace WixToolset.Core // display an error for the component or merge module as appropriate if (null != multipleFeatureComponents) { - this.Messaging.Write(ErrorMessages.ComponentExpectedFeature(tuple.SourceLineNumbers, connectionId, tuple.Definition.Name, tuple.Id.Id)); + this.Messaging.Write(ErrorMessages.ComponentExpectedFeature(symbol.SourceLineNumbers, connectionId, symbol.Definition.Name, symbol.Id.Id)); } else { - this.Messaging.Write(ErrorMessages.MergeModuleExpectedFeature(tuple.SourceLineNumbers, connectionId)); + this.Messaging.Write(ErrorMessages.MergeModuleExpectedFeature(symbol.SourceLineNumbers, connectionId)); } } else @@ -1359,7 +1359,7 @@ namespace WixToolset.Core } // set the feature - tuple.Set(featureColumn, connection.PrimaryFeature); + symbol.Set(featureColumn, connection.PrimaryFeature); } } } diff --git a/src/WixToolset.Core/Resolver.cs b/src/WixToolset.Core/Resolver.cs index 1342444f..4f12ae76 100644 --- a/src/WixToolset.Core/Resolver.cs +++ b/src/WixToolset.Core/Resolver.cs @@ -7,7 +7,7 @@ namespace WixToolset.Core using System.Linq; using WixToolset.Core.Bind; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; @@ -132,72 +132,72 @@ namespace WixToolset.Core { foreach (var section in context.IntermediateRepresentation.Sections) { - foreach (var tuple in section.Tuples.OfType()) + foreach (var symbol in section.Symbols.OfType()) { - if (this.VariableResolver.TryGetLocalizedControl(tuple.Id.Id, null, out var localizedControl)) + if (this.VariableResolver.TryGetLocalizedControl(symbol.Id.Id, null, out var localizedControl)) { if (CompilerConstants.IntegerNotSet != localizedControl.X) { - tuple.HCentering = localizedControl.X; + symbol.HCentering = localizedControl.X; } if (CompilerConstants.IntegerNotSet != localizedControl.Y) { - tuple.VCentering = localizedControl.Y; + symbol.VCentering = localizedControl.Y; } if (CompilerConstants.IntegerNotSet != localizedControl.Width) { - tuple.Width = localizedControl.Width; + symbol.Width = localizedControl.Width; } if (CompilerConstants.IntegerNotSet != localizedControl.Height) { - tuple.Height = localizedControl.Height; + symbol.Height = localizedControl.Height; } - tuple.RightAligned |= localizedControl.RightAligned; - tuple.RightToLeft |= localizedControl.RightToLeft; - tuple.LeftScroll |= localizedControl.LeftScroll; + symbol.RightAligned |= localizedControl.RightAligned; + symbol.RightToLeft |= localizedControl.RightToLeft; + symbol.LeftScroll |= localizedControl.LeftScroll; if (!String.IsNullOrEmpty(localizedControl.Text)) { - tuple.Title = localizedControl.Text; + symbol.Title = localizedControl.Text; } } } - foreach (var tuple in section.Tuples.OfType()) + foreach (var symbol in section.Symbols.OfType()) { - if (this.VariableResolver.TryGetLocalizedControl(tuple.DialogRef, tuple.Control, out var localizedControl)) + if (this.VariableResolver.TryGetLocalizedControl(symbol.DialogRef, symbol.Control, out var localizedControl)) { if (CompilerConstants.IntegerNotSet != localizedControl.X) { - tuple.X = localizedControl.X; + symbol.X = localizedControl.X; } if (CompilerConstants.IntegerNotSet != localizedControl.Y) { - tuple.Y = localizedControl.Y; + symbol.Y = localizedControl.Y; } if (CompilerConstants.IntegerNotSet != localizedControl.Width) { - tuple.Width = localizedControl.Width; + symbol.Width = localizedControl.Width; } if (CompilerConstants.IntegerNotSet != localizedControl.Height) { - tuple.Height = localizedControl.Height; + symbol.Height = localizedControl.Height; } - tuple.RightAligned |= localizedControl.RightAligned; - tuple.RightToLeft |= localizedControl.RightToLeft; - tuple.LeftScroll |= localizedControl.LeftScroll; + symbol.RightAligned |= localizedControl.RightAligned; + symbol.RightToLeft |= localizedControl.RightToLeft; + symbol.LeftScroll |= localizedControl.LeftScroll; if (!String.IsNullOrEmpty(localizedControl.Text)) { - tuple.Text = localizedControl.Text; + symbol.Text = localizedControl.Text; } } } @@ -215,10 +215,10 @@ namespace WixToolset.Core } // Gather all the wix variables. - var wixVariableTuples = context.IntermediateRepresentation.Sections.SelectMany(s => s.Tuples).OfType(); - foreach (var tuple in wixVariableTuples) + var wixVariableSymbols = context.IntermediateRepresentation.Sections.SelectMany(s => s.Symbols).OfType(); + foreach (var symbol in wixVariableSymbols) { - this.VariableResolver.AddVariable(tuple.SourceLineNumbers, tuple.Id.Id, tuple.Value, tuple.Overridable); + this.VariableResolver.AddVariable(symbol.SourceLineNumbers, symbol.Id.Id, symbol.Value, symbol.Overridable); } return codepage; @@ -234,7 +234,7 @@ namespace WixToolset.Core AddFilteredLocalizations(result, filter, localizations); // Filter localizations provided by extensions with data. - var creator = context.ServiceProvider.GetService(); + var creator = context.ServiceProvider.GetService(); foreach (var data in context.ExtensionData) { diff --git a/src/WixToolset.Core/WixToolsetServiceProvider.cs b/src/WixToolset.Core/WixToolsetServiceProvider.cs index d7a6171a..646b21fa 100644 --- a/src/WixToolset.Core/WixToolsetServiceProvider.cs +++ b/src/WixToolset.Core/WixToolsetServiceProvider.cs @@ -20,7 +20,7 @@ namespace WixToolset.Core // Singletons. this.AddService((provider, singletons) => AddSingleton(singletons, new ExtensionManager(provider))); this.AddService((provider, singletons) => AddSingleton(singletons, new Messaging())); - this.AddService((provider, singletons) => AddSingleton(singletons, new TupleDefinitionCreator(provider))); + this.AddService((provider, singletons) => AddSingleton(singletons, new SymbolDefinitionCreator(provider))); this.AddService((provider, singletons) => AddSingleton(singletons, new ParseHelper(provider))); this.AddService((provider, singletons) => AddSingleton(singletons, new PreprocessHelper(provider))); this.AddService((provider, singletons) => AddSingleton(singletons, new BackendHelper(provider))); -- cgit v1.2.3-55-g6feb