@joebigelow / wix-1 / commits / 20572fec

The Great Tuple to Symbol Rename (tm)

Rob Mensching committed Jun 27, 2020 at 01:53 UTC 20572fec71899df1a19f5759c64984b6ea9b20df
5 files changed +40 -40
src/wixext/NetFxCompiler.cs
+4 -4
@@ -8,7 +8,7 @@ namespace WixToolset.Netfx
8 using WixToolset.Data;
9 using WixToolset.Extensibility;
10 using WixToolset.Extensibility.Data;
11 - using WixToolset.Netfx.Tuples;
11 + using WixToolset.Netfx.Symbols;
12
13 /// <summary>
14 /// The compiler for the WiX Toolset .NET Framework Extension.
@@ -75,7 +75,7 @@ namespace WixToolset.Netfx
75 // See if a formatted value is specified.
76 if (-1 == appBaseDirectory.IndexOf("[", StringComparison.Ordinal))
77 {
78 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, appBaseDirectory);
78 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, appBaseDirectory);
79 }
80 break;
81 case "AssemblyApplication":
@@ -84,7 +84,7 @@ namespace WixToolset.Netfx
84 // See if a formatted value is specified.
85 if (-1 == assemblyApplication.IndexOf("[", StringComparison.Ordinal))
86 {
87 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, assemblyApplication);
87 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, assemblyApplication);
88 }
89 break;
90 case "Debug":
@@ -149,7 +149,7 @@ namespace WixToolset.Netfx
149
150 if (!this.Messaging.EncounteredError)
151 {
152 - section.AddTuple(new NetFxNativeImageTuple(sourceLineNumbers, id)
152 + section.AddSymbol(new NetFxNativeImageSymbol(sourceLineNumbers, id)
153 {
154 FileRef = fileId,
155 Priority = priority,
src/wixext/NetFxExtensionData.cs
+6 -6
@@ -4,22 +4,22 @@ namespace WixToolset.Netfx
4 {
5 using WixToolset.Data;
6 using WixToolset.Extensibility;
7 - using WixToolset.Netfx.Tuples;
7 + using WixToolset.Netfx.Symbols;
8
9 /// <summary>
10 /// The WiX Toolset .NET Framework Extension.
11 /// </summary>
12 public sealed class NetfxExtensionData : BaseExtensionData
13 {
14 - public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
14 + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition)
15 {
16 - tupleDefinition = (name == NetfxTupleDefinitionNames.NetFxNativeImage) ? NetfxTupleDefinitions.NetFxNativeImage : null;
17 - return tupleDefinition != null;
16 + symbolDefinition = (name == NetfxSymbolDefinitionNames.NetFxNativeImage) ? NetfxSymbolDefinitions.NetFxNativeImage : null;
17 + return symbolDefinition != null;
18 }
19
20 - public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
20 + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions)
21 {
22 - return Intermediate.Load(typeof(NetfxExtensionData).Assembly, "WixToolset.Netfx.netfx.wixlib", tupleDefinitions);
22 + return Intermediate.Load(typeof(NetfxExtensionData).Assembly, "WixToolset.Netfx.netfx.wixlib", symbolDefinitions);
23 }
24 }
25 }
src/wixext/NetfxTableDefinitions.cs
+3 -3
@@ -3,13 +3,13 @@
3 namespace WixToolset.Netfx
4 {
5 using WixToolset.Data.WindowsInstaller;
6 - using WixToolset.Netfx.Tuples;
6 + using WixToolset.Netfx.Symbols;
7
8 public static class NetfxTableDefinitions
9 {
10 public static readonly TableDefinition NetFxNativeImage = new TableDefinition(
11 "Wix4NetFxNativeImage",
12 - NetfxTupleDefinitions.NetFxNativeImage,
12 + NetfxSymbolDefinitions.NetFxNativeImage,
13 new[]
14 {
15 new ColumnDefinition("Wix4NetFxNativeImage", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The primary key, a non-localized token.", modularizeType: ColumnModularizeType.Column),
@@ -19,7 +19,7 @@ namespace WixToolset.Netfx
19 new ColumnDefinition("File_Application", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "The application which loads this assembly.", modularizeType: ColumnModularizeType.Column),
20 new ColumnDefinition("Directory_ApplicationBase", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "The directory containing the application which loads this assembly.", modularizeType: ColumnModularizeType.Column),
21 },
22 - tupleIdIsPrimaryKey: true
22 + symbolIdIsPrimaryKey: true
23 );
24
25 public static readonly TableDefinition[] All = new[]
src/wixext/Tuples/NetFxNativeImageTuple.cs
+16 -16
@@ -1,10 +1,10 @@
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 -namespace WixToolset.Netfx.Tuples
3 +namespace WixToolset.Netfx.Symbols
4 {
5 using WixToolset.Data;
6
7 - public enum NetFxNativeImageTupleFields
7 + public enum NetFxNativeImageSymbolFields
8 {
9 FileRef,
10 Priority,
@@ -13,46 +13,46 @@ namespace WixToolset.Netfx.Tuples
13 ApplicationBaseDirectoryRef,
14 }
15
16 - public class NetFxNativeImageTuple : IntermediateTuple
16 + public class NetFxNativeImageSymbol : IntermediateSymbol
17 {
18 - public NetFxNativeImageTuple() : base(NetfxTupleDefinitions.NetFxNativeImage, null, null)
18 + public NetFxNativeImageSymbol() : base(NetfxSymbolDefinitions.NetFxNativeImage, null, null)
19 {
20 }
21
22 - public NetFxNativeImageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxTupleDefinitions.NetFxNativeImage, sourceLineNumber, id)
22 + public NetFxNativeImageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNativeImage, sourceLineNumber, id)
23 {
24 }
25
26 - public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index];
26 + public IntermediateField this[NetFxNativeImageSymbolFields index] => this.Fields[(int)index];
27
28 public string FileRef
29 {
30 - get => this.Fields[(int)NetFxNativeImageTupleFields.FileRef].AsString();
31 - set => this.Set((int)NetFxNativeImageTupleFields.FileRef, value);
30 + get => this.Fields[(int)NetFxNativeImageSymbolFields.FileRef].AsString();
31 + set => this.Set((int)NetFxNativeImageSymbolFields.FileRef, value);
32 }
33
34 public int Priority
35 {
36 - get => this.Fields[(int)NetFxNativeImageTupleFields.Priority].AsNumber();
37 - set => this.Set((int)NetFxNativeImageTupleFields.Priority, value);
36 + get => this.Fields[(int)NetFxNativeImageSymbolFields.Priority].AsNumber();
37 + set => this.Set((int)NetFxNativeImageSymbolFields.Priority, value);
38 }
39
40 public int Attributes
41 {
42 - get => this.Fields[(int)NetFxNativeImageTupleFields.Attributes].AsNumber();
43 - set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value);
42 + get => this.Fields[(int)NetFxNativeImageSymbolFields.Attributes].AsNumber();
43 + set => this.Set((int)NetFxNativeImageSymbolFields.Attributes, value);
44 }
45
46 public string ApplicationFileRef
47 {
48 - get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationFileRef].AsString();
49 - set => this.Set((int)NetFxNativeImageTupleFields.ApplicationFileRef, value);
48 + get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationFileRef].AsString();
49 + set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationFileRef, value);
50 }
51
52 public string ApplicationBaseDirectoryRef
53 {
54 - get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef].AsString();
55 - set => this.Set((int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef, value);
54 + get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef].AsString();
55 + set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef, value);
56 }
57 }
58 }
\ No newline at end of file
src/wixext/Tuples/NetfxTupleDefinitions.cs
+11 -11
@@ -1,26 +1,26 @@
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 -namespace WixToolset.Netfx.Tuples
3 +namespace WixToolset.Netfx.Symbols
4 {
5 using WixToolset.Data;
6
7 - public static class NetfxTupleDefinitionNames
7 + public static class NetfxSymbolDefinitionNames
8 {
9 public static string NetFxNativeImage { get; } = "NetFxNativeImage";
10 }
11
12 - public static class NetfxTupleDefinitions
12 + public static class NetfxSymbolDefinitions
13 {
14 - public static readonly IntermediateTupleDefinition NetFxNativeImage = new IntermediateTupleDefinition(
15 - NetfxTupleDefinitionNames.NetFxNativeImage,
14 + public static readonly IntermediateSymbolDefinition NetFxNativeImage = new IntermediateSymbolDefinition(
15 + NetfxSymbolDefinitionNames.NetFxNativeImage,
16 new[]
17 {
18 - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.FileRef), IntermediateFieldType.String),
19 - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number),
20 - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number),
21 - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationFileRef), IntermediateFieldType.String),
22 - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String),
18 + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.FileRef), IntermediateFieldType.String),
19 + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Priority), IntermediateFieldType.Number),
20 + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Attributes), IntermediateFieldType.Number),
21 + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationFileRef), IntermediateFieldType.String),
22 + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String),
23 },
24 - typeof(NetFxNativeImageTuple));
24 + typeof(NetFxNativeImageSymbol));
25 }
26 }