From 8e0423b251346b66627795b4ae1cbdebcb7c5784 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 12:07:22 -0700 Subject: The Great Tuple to Symbol Rename (tm) --- src/wixext/DifxAppCompiler.cs | 10 +++---- src/wixext/DifxAppExtensionData.cs | 10 +++---- src/wixext/DifxAppTableDefinitions.cs | 4 +-- src/wixext/Tuples/DifxAppTupleDefinitions.cs | 14 +++++----- src/wixext/Tuples/MsiDriverPackagesTuple.cs | 40 ++++++++++++++-------------- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/wixext/DifxAppCompiler.cs b/src/wixext/DifxAppCompiler.cs index 4d0b8ec9..e3687a49 100644 --- a/src/wixext/DifxAppCompiler.cs +++ b/src/wixext/DifxAppCompiler.cs @@ -6,7 +6,7 @@ namespace WixToolset.DifxApp using System.Collections.Generic; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.DifxApp.Tuples; + using WixToolset.DifxApp.Symbols; using WixToolset.Extensibility; /// @@ -138,10 +138,10 @@ namespace WixToolset.DifxApp switch (this.Context.Platform) { case Platform.X86: - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MsiProcessDrivers"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "MsiProcessDrivers"); break; case Platform.X64: - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MsiProcessDrivers_x64"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "MsiProcessDrivers_x64"); break; case Platform.IA64: case Platform.ARM: @@ -149,7 +149,7 @@ namespace WixToolset.DifxApp break; } - var tuple = section.AddTuple(new MsiDriverPackagesTuple(sourceLineNumbers) + var symbol = section.AddSymbol(new MsiDriverPackagesSymbol(sourceLineNumbers) { ComponentRef = componentId, Flags = attributes, @@ -157,7 +157,7 @@ namespace WixToolset.DifxApp if (CompilerConstants.IntegerNotSet != sequence) { - tuple.Sequence = sequence; + symbol.Sequence = sequence; } } } diff --git a/src/wixext/DifxAppExtensionData.cs b/src/wixext/DifxAppExtensionData.cs index 49e1354f..31a95b8e 100644 --- a/src/wixext/DifxAppExtensionData.cs +++ b/src/wixext/DifxAppExtensionData.cs @@ -9,15 +9,15 @@ namespace WixToolset.DifxApp { public override string DefaultCulture => "en-US"; - public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) { - tupleDefinition = DifxAppTupleDefinitions.ByName(name); - return tupleDefinition != null; + symbolDefinition = DifxAppSymbolDefinitions.ByName(name); + return symbolDefinition != null; } - public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) { - return Intermediate.Load(typeof(DifxAppExtensionData).Assembly, "WixToolset.DifxApp.difxapp.wixlib", tupleDefinitions); + return Intermediate.Load(typeof(DifxAppExtensionData).Assembly, "WixToolset.DifxApp.difxapp.wixlib", symbolDefinitions); } } } diff --git a/src/wixext/DifxAppTableDefinitions.cs b/src/wixext/DifxAppTableDefinitions.cs index 8c92c94f..a6c26444 100644 --- a/src/wixext/DifxAppTableDefinitions.cs +++ b/src/wixext/DifxAppTableDefinitions.cs @@ -8,14 +8,14 @@ namespace WixToolset.DifxApp { public static readonly TableDefinition MsiDriverPackages = new TableDefinition( "MsiDriverPackages", - DifxAppTupleDefinitions.MsiDriverPackages, + DifxAppSymbolDefinitions.MsiDriverPackages, new[] { new ColumnDefinition("Component", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Name of the component that represents the driver package", modularizeType: ColumnModularizeType.Column), new ColumnDefinition("Flags", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 31, description: "Flags for installing and uninstalling driver packages"), new ColumnDefinition("Sequence", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, description: "Order in which the driver packages are processed"), }, - tupleIdIsPrimaryKey: false + symbolIdIsPrimaryKey: false ); public static readonly TableDefinition[] All = new[] diff --git a/src/wixext/Tuples/DifxAppTupleDefinitions.cs b/src/wixext/Tuples/DifxAppTupleDefinitions.cs index 37dabb86..76f4d88f 100644 --- a/src/wixext/Tuples/DifxAppTupleDefinitions.cs +++ b/src/wixext/Tuples/DifxAppTupleDefinitions.cs @@ -5,18 +5,18 @@ namespace WixToolset.DifxApp using System; using WixToolset.Data; - public enum DifxAppTupleDefinitionType + public enum DifxAppSymbolDefinitionType { MsiDriverPackages, } - public static partial class DifxAppTupleDefinitions + public static partial class DifxAppSymbolDefinitions { public static readonly Version Version = new Version("4.0.0"); - public static IntermediateTupleDefinition ByName(string name) + public static IntermediateSymbolDefinition ByName(string name) { - if (!Enum.TryParse(name, out DifxAppTupleDefinitionType type)) + if (!Enum.TryParse(name, out DifxAppSymbolDefinitionType type)) { return null; } @@ -24,12 +24,12 @@ namespace WixToolset.DifxApp return ByType(type); } - public static IntermediateTupleDefinition ByType(DifxAppTupleDefinitionType type) + public static IntermediateSymbolDefinition ByType(DifxAppSymbolDefinitionType type) { switch (type) { - case DifxAppTupleDefinitionType.MsiDriverPackages: - return DifxAppTupleDefinitions.MsiDriverPackages; + case DifxAppSymbolDefinitionType.MsiDriverPackages: + return DifxAppSymbolDefinitions.MsiDriverPackages; default: throw new ArgumentOutOfRangeException(nameof(type)); diff --git a/src/wixext/Tuples/MsiDriverPackagesTuple.cs b/src/wixext/Tuples/MsiDriverPackagesTuple.cs index 9c57e47c..2fd91bc8 100644 --- a/src/wixext/Tuples/MsiDriverPackagesTuple.cs +++ b/src/wixext/Tuples/MsiDriverPackagesTuple.cs @@ -3,61 +3,61 @@ namespace WixToolset.DifxApp { using WixToolset.Data; - using WixToolset.DifxApp.Tuples; + using WixToolset.DifxApp.Symbols; - public static partial class DifxAppTupleDefinitions + public static partial class DifxAppSymbolDefinitions { - public static readonly IntermediateTupleDefinition MsiDriverPackages = new IntermediateTupleDefinition( - DifxAppTupleDefinitionType.MsiDriverPackages.ToString(), + public static readonly IntermediateSymbolDefinition MsiDriverPackages = new IntermediateSymbolDefinition( + DifxAppSymbolDefinitionType.MsiDriverPackages.ToString(), new[] { - new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.ComponentRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Flags), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiDriverPackagesSymbolFields.ComponentRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiDriverPackagesSymbolFields.Flags), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiDriverPackagesSymbolFields.Sequence), IntermediateFieldType.Number), }, - typeof(MsiDriverPackagesTuple)); + typeof(MsiDriverPackagesSymbol)); } } -namespace WixToolset.DifxApp.Tuples +namespace WixToolset.DifxApp.Symbols { using WixToolset.Data; - public enum MsiDriverPackagesTupleFields + public enum MsiDriverPackagesSymbolFields { ComponentRef, Flags, Sequence, } - public class MsiDriverPackagesTuple : IntermediateTuple + public class MsiDriverPackagesSymbol : IntermediateSymbol { - public MsiDriverPackagesTuple() : base(DifxAppTupleDefinitions.MsiDriverPackages, null, null) + public MsiDriverPackagesSymbol() : base(DifxAppSymbolDefinitions.MsiDriverPackages, null, null) { } - public MsiDriverPackagesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DifxAppTupleDefinitions.MsiDriverPackages, sourceLineNumber, id) + public MsiDriverPackagesSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DifxAppSymbolDefinitions.MsiDriverPackages, sourceLineNumber, id) { } - public IntermediateField this[MsiDriverPackagesTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[MsiDriverPackagesSymbolFields index] => this.Fields[(int)index]; public string ComponentRef { - get => this.Fields[(int)MsiDriverPackagesTupleFields.ComponentRef].AsString(); - set => this.Set((int)MsiDriverPackagesTupleFields.ComponentRef, value); + get => this.Fields[(int)MsiDriverPackagesSymbolFields.ComponentRef].AsString(); + set => this.Set((int)MsiDriverPackagesSymbolFields.ComponentRef, value); } public int Flags { - get => this.Fields[(int)MsiDriverPackagesTupleFields.Flags].AsNumber(); - set => this.Set((int)MsiDriverPackagesTupleFields.Flags, value); + get => this.Fields[(int)MsiDriverPackagesSymbolFields.Flags].AsNumber(); + set => this.Set((int)MsiDriverPackagesSymbolFields.Flags, value); } public int? Sequence { - get => this.Fields[(int)MsiDriverPackagesTupleFields.Sequence].AsNullableNumber(); - set => this.Set((int)MsiDriverPackagesTupleFields.Sequence, value); + get => this.Fields[(int)MsiDriverPackagesSymbolFields.Sequence].AsNullableNumber(); + set => this.Set((int)MsiDriverPackagesSymbolFields.Sequence, value); } } } \ No newline at end of file -- cgit v1.2.3-55-g6feb