@joebigelow / wix / commits / 8e0423b2

The Great Tuple to Symbol Rename (tm)

Rob Mensching committed Jun 27, 2020 at 12:07 UTC 8e0423b251346b66627795b4ae1cbdebcb7c5784
5 files changed +39 -39
src/wixext/DifxAppCompiler.cs
+5 -5
@@ -6,7 +6,7 @@ namespace WixToolset.DifxApp
6 using System.Collections.Generic;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9 - using WixToolset.DifxApp.Tuples;
9 + using WixToolset.DifxApp.Symbols;
10 using WixToolset.Extensibility;
11
12 /// <summary>
@@ -138,10 +138,10 @@ namespace WixToolset.DifxApp
138 switch (this.Context.Platform)
139 {
140 case Platform.X86:
141 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MsiProcessDrivers");
141 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "MsiProcessDrivers");
142 break;
143 case Platform.X64:
144 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MsiProcessDrivers_x64");
144 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "MsiProcessDrivers_x64");
145 break;
146 case Platform.IA64:
147 case Platform.ARM:
@@ -149,7 +149,7 @@ namespace WixToolset.DifxApp
149 break;
150 }
151
152 - var tuple = section.AddTuple(new MsiDriverPackagesTuple(sourceLineNumbers)
152 + var symbol = section.AddSymbol(new MsiDriverPackagesSymbol(sourceLineNumbers)
153 {
154 ComponentRef = componentId,
155 Flags = attributes,
@@ -157,7 +157,7 @@ namespace WixToolset.DifxApp
157
158 if (CompilerConstants.IntegerNotSet != sequence)
159 {
160 - tuple.Sequence = sequence;
160 + symbol.Sequence = sequence;
161 }
162 }
163 }
src/wixext/DifxAppExtensionData.cs
+5 -5
@@ -9,15 +9,15 @@ namespace WixToolset.DifxApp
9 {
10 public override string DefaultCulture => "en-US";
11
12 - public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
12 + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition)
13 {
14 - tupleDefinition = DifxAppTupleDefinitions.ByName(name);
15 - return tupleDefinition != null;
14 + symbolDefinition = DifxAppSymbolDefinitions.ByName(name);
15 + return symbolDefinition != null;
16 }
17
18 - public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
18 + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions)
19 {
20 - return Intermediate.Load(typeof(DifxAppExtensionData).Assembly, "WixToolset.DifxApp.difxapp.wixlib", tupleDefinitions);
20 + return Intermediate.Load(typeof(DifxAppExtensionData).Assembly, "WixToolset.DifxApp.difxapp.wixlib", symbolDefinitions);
21 }
22 }
23 }
src/wixext/DifxAppTableDefinitions.cs
+2 -2
@@ -8,14 +8,14 @@ namespace WixToolset.DifxApp
8 {
9 public static readonly TableDefinition MsiDriverPackages = new TableDefinition(
10 "MsiDriverPackages",
11 - DifxAppTupleDefinitions.MsiDriverPackages,
11 + DifxAppSymbolDefinitions.MsiDriverPackages,
12 new[]
13 {
14 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),
15 new ColumnDefinition("Flags", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 31, description: "Flags for installing and uninstalling driver packages"),
16 new ColumnDefinition("Sequence", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, description: "Order in which the driver packages are processed"),
17 },
18 - tupleIdIsPrimaryKey: false
18 + symbolIdIsPrimaryKey: false
19 );
20
21 public static readonly TableDefinition[] All = new[]
src/wixext/Tuples/DifxAppTupleDefinitions.cs
+7 -7
@@ -5,18 +5,18 @@ namespace WixToolset.DifxApp
5 using System;
6 using WixToolset.Data;
7
8 - public enum DifxAppTupleDefinitionType
8 + public enum DifxAppSymbolDefinitionType
9 {
10 MsiDriverPackages,
11 }
12
13 - public static partial class DifxAppTupleDefinitions
13 + public static partial class DifxAppSymbolDefinitions
14 {
15 public static readonly Version Version = new Version("4.0.0");
16
17 - public static IntermediateTupleDefinition ByName(string name)
17 + public static IntermediateSymbolDefinition ByName(string name)
18 {
19 - if (!Enum.TryParse(name, out DifxAppTupleDefinitionType type))
19 + if (!Enum.TryParse(name, out DifxAppSymbolDefinitionType type))
20 {
21 return null;
22 }
@@ -24,12 +24,12 @@ namespace WixToolset.DifxApp
24 return ByType(type);
25 }
26
27 - public static IntermediateTupleDefinition ByType(DifxAppTupleDefinitionType type)
27 + public static IntermediateSymbolDefinition ByType(DifxAppSymbolDefinitionType type)
28 {
29 switch (type)
30 {
31 - case DifxAppTupleDefinitionType.MsiDriverPackages:
32 - return DifxAppTupleDefinitions.MsiDriverPackages;
31 + case DifxAppSymbolDefinitionType.MsiDriverPackages:
32 + return DifxAppSymbolDefinitions.MsiDriverPackages;
33
34 default:
35 throw new ArgumentOutOfRangeException(nameof(type));
src/wixext/Tuples/MsiDriverPackagesTuple.cs
+20 -20
@@ -3,61 +3,61 @@
3 namespace WixToolset.DifxApp
4 {
5 using WixToolset.Data;
6 - using WixToolset.DifxApp.Tuples;
6 + using WixToolset.DifxApp.Symbols;
7
8 - public static partial class DifxAppTupleDefinitions
8 + public static partial class DifxAppSymbolDefinitions
9 {
10 - public static readonly IntermediateTupleDefinition MsiDriverPackages = new IntermediateTupleDefinition(
11 - DifxAppTupleDefinitionType.MsiDriverPackages.ToString(),
10 + public static readonly IntermediateSymbolDefinition MsiDriverPackages = new IntermediateSymbolDefinition(
11 + DifxAppSymbolDefinitionType.MsiDriverPackages.ToString(),
12 new[]
13 {
14 - new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.ComponentRef), IntermediateFieldType.String),
15 - new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Flags), IntermediateFieldType.Number),
16 - new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Sequence), IntermediateFieldType.Number),
14 + new IntermediateFieldDefinition(nameof(MsiDriverPackagesSymbolFields.ComponentRef), IntermediateFieldType.String),
15 + new IntermediateFieldDefinition(nameof(MsiDriverPackagesSymbolFields.Flags), IntermediateFieldType.Number),
16 + new IntermediateFieldDefinition(nameof(MsiDriverPackagesSymbolFields.Sequence), IntermediateFieldType.Number),
17 },
18 - typeof(MsiDriverPackagesTuple));
18 + typeof(MsiDriverPackagesSymbol));
19 }
20 }
21
22 -namespace WixToolset.DifxApp.Tuples
22 +namespace WixToolset.DifxApp.Symbols
23 {
24 using WixToolset.Data;
25
26 - public enum MsiDriverPackagesTupleFields
26 + public enum MsiDriverPackagesSymbolFields
27 {
28 ComponentRef,
29 Flags,
30 Sequence,
31 }
32
33 - public class MsiDriverPackagesTuple : IntermediateTuple
33 + public class MsiDriverPackagesSymbol : IntermediateSymbol
34 {
35 - public MsiDriverPackagesTuple() : base(DifxAppTupleDefinitions.MsiDriverPackages, null, null)
35 + public MsiDriverPackagesSymbol() : base(DifxAppSymbolDefinitions.MsiDriverPackages, null, null)
36 {
37 }
38
39 - public MsiDriverPackagesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DifxAppTupleDefinitions.MsiDriverPackages, sourceLineNumber, id)
39 + public MsiDriverPackagesSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DifxAppSymbolDefinitions.MsiDriverPackages, sourceLineNumber, id)
40 {
41 }
42
43 - public IntermediateField this[MsiDriverPackagesTupleFields index] => this.Fields[(int)index];
43 + public IntermediateField this[MsiDriverPackagesSymbolFields index] => this.Fields[(int)index];
44
45 public string ComponentRef
46 {
47 - get => this.Fields[(int)MsiDriverPackagesTupleFields.ComponentRef].AsString();
48 - set => this.Set((int)MsiDriverPackagesTupleFields.ComponentRef, value);
47 + get => this.Fields[(int)MsiDriverPackagesSymbolFields.ComponentRef].AsString();
48 + set => this.Set((int)MsiDriverPackagesSymbolFields.ComponentRef, value);
49 }
50
51 public int Flags
52 {
53 - get => this.Fields[(int)MsiDriverPackagesTupleFields.Flags].AsNumber();
54 - set => this.Set((int)MsiDriverPackagesTupleFields.Flags, value);
53 + get => this.Fields[(int)MsiDriverPackagesSymbolFields.Flags].AsNumber();
54 + set => this.Set((int)MsiDriverPackagesSymbolFields.Flags, value);
55 }
56
57 public int? Sequence
58 {
59 - get => this.Fields[(int)MsiDriverPackagesTupleFields.Sequence].AsNullableNumber();
60 - set => this.Set((int)MsiDriverPackagesTupleFields.Sequence, value);
59 + get => this.Fields[(int)MsiDriverPackagesSymbolFields.Sequence].AsNullableNumber();
60 + set => this.Set((int)MsiDriverPackagesSymbolFields.Sequence, value);
61 }
62 }
63 }
\ No newline at end of file