The Great Tuple to Symbol Rename (tm)
Rob Mensching committed
Jun 27, 2020 at 02:50 UTC
0ea7e4a065e5c65dd59396dbdf3b7ba1b85c6c4a
6 files changed
+79
-79
src/wixext/DependencyCompiler.cs
+19
-19
@@ -8,8 +8,8 @@ namespace WixToolset.Dependency
8
using System.Text;
9
using System.Xml.Linq;
10
using WixToolset.Data;
11
- using WixToolset.Data.Tuples;
12
- using WixToolset.Dependency.Tuples;
11
+ using WixToolset.Data.Symbols;
12
+ using WixToolset.Dependency.Symbols;
13
using WixToolset.Extensibility;
14
using WixToolset.Extensibility.Data;
15
@@ -207,9 +207,9 @@ namespace WixToolset.Dependency
207
208
if (!this.Messaging.EncounteredError)
209
{
210
- // Create the provider tuple for the bundle. The Component_ field is required
210
+ // Create the provider symbol for the bundle. The Component_ field is required
211
// in the table definition but unused for bundles, so just set it to the valid ID.
212
- section.AddTuple(new WixDependencyProviderTuple(sourceLineNumbers, id)
212
+ section.AddSymbol(new WixDependencyProviderSymbol(sourceLineNumbers, id)
213
{
214
ComponentRef = id.Id,
215
ProviderKey = providerKey,
@@ -290,7 +290,7 @@ namespace WixToolset.Dependency
290
else if (PackageType.None == packageType)
291
{
292
// Make sure the ProductCode is authored and set the key.
293
- this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Property, "ProductCode");
293
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Property, "ProductCode");
294
key = "!(bind.property.ProductCode)";
295
}
296
@@ -344,7 +344,7 @@ namespace WixToolset.Dependency
344
345
if (!this.Messaging.EncounteredError)
346
{
347
- var tuple = section.AddTuple(new WixDependencyProviderTuple(sourceLineNumbers, id)
347
+ var symbol = section.AddSymbol(new WixDependencyProviderSymbol(sourceLineNumbers, id)
348
{
349
ComponentRef = parentId,
350
ProviderKey = key,
@@ -352,12 +352,12 @@ namespace WixToolset.Dependency
352
353
if (!String.IsNullOrEmpty(version))
354
{
355
- tuple.Version = version;
355
+ symbol.Version = version;
356
}
357
358
if (!String.IsNullOrEmpty(displayName))
359
{
360
- tuple.DisplayName = displayName;
360
+ symbol.DisplayName = displayName;
361
}
362
363
if (PackageType.None == packageType)
@@ -379,18 +379,18 @@ namespace WixToolset.Dependency
379
var root = RegistryRootType.MachineUser;
380
381
var value = "[ProductCode]";
382
- this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, root, keyProvides, null, value, parentId, false);
382
+ this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, root, keyProvides, null, value, parentId, false);
383
384
value = !String.IsNullOrEmpty(version) ? version : "[ProductVersion]";
385
- var versionRegistryTuple =
386
- this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, root, keyProvides, "Version", value, parentId, false);
385
+ var versionRegistrySymbol =
386
+ this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, root, keyProvides, "Version", value, parentId, false);
387
388
value = !String.IsNullOrEmpty(displayName) ? displayName : "[ProductName]";
389
- this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, root, keyProvides, "DisplayName", value, parentId, false);
389
+ this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, root, keyProvides, "DisplayName", value, parentId, false);
390
391
// Use the Version registry value and use that as a potential key path.
392
keyPath = this.CreateComponentKeyPath();
393
- keyPath.Id = versionRegistryTuple.Id;
393
+ keyPath.Id = versionRegistrySymbol.Id;
394
keyPath.Explicit = false;
395
keyPath.Type = PossibleKeyPathType.Registry;
396
}
@@ -494,7 +494,7 @@ namespace WixToolset.Dependency
494
this.AddReferenceToWixDependencyRequire(section, sourceLineNumbers);
495
}
496
497
- var tuple = section.AddTuple(new WixDependencyTuple(sourceLineNumbers, id)
497
+ var symbol = section.AddSymbol(new WixDependencySymbol(sourceLineNumbers, id)
498
{
499
ProviderKey = providerKey,
500
MinVersion = minVersion,
@@ -503,13 +503,13 @@ namespace WixToolset.Dependency
503
504
if (0 != attributes)
505
{
506
- tuple.Attributes = attributes;
506
+ symbol.Attributes = attributes;
507
}
508
509
- // Create the relationship between this WixDependency tuple and the WixDependencyProvider tuple.
509
+ // Create the relationship between this WixDependency symbol and the WixDependencyProvider symbol.
510
if (!String.IsNullOrEmpty(providerId))
511
{
512
- section.AddTuple(new WixDependencyRefTuple(sourceLineNumbers)
512
+ section.AddSymbol(new WixDependencyRefSymbol(sourceLineNumbers)
513
{
514
WixDependencyProviderRef = providerId,
515
WixDependencyRef = id.Id,
@@ -565,10 +565,10 @@ namespace WixToolset.Dependency
565
}
566
567
// Create a link dependency on the row that contains information we'll need during bind.
568
- this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, DependencyTupleDefinitions.WixDependency, id);
568
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, DependencySymbolDefinitions.WixDependency, id);
569
570
// Create the relationship between the WixDependency row and the parent WixDependencyProvider row.
571
- section.AddTuple(new WixDependencyRefTuple(sourceLineNumbers)
571
+ section.AddSymbol(new WixDependencyRefSymbol(sourceLineNumbers)
572
{
573
WixDependencyProviderRef = providerId,
574
WixDependencyRef = id,
src/wixext/DependencyExtensionData.cs
+5
-5
@@ -16,15 +16,15 @@ namespace WixToolset.Dependency
16
/// <value>The default culture.</value>
17
public override string DefaultCulture => "en-US";
18
19
- public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
19
+ public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition)
20
{
21
- tupleDefinition = DependencyTupleDefinitions.ByName(name);
22
- return tupleDefinition != null;
21
+ symbolDefinition = DependencySymbolDefinitions.ByName(name);
22
+ return symbolDefinition != null;
23
}
24
25
- public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
25
+ public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions)
26
{
27
- return Intermediate.Load(typeof(DependencyExtensionData).Assembly, "WixToolset.Dependency.dependency.wixlib", tupleDefinitions);
27
+ return Intermediate.Load(typeof(DependencyExtensionData).Assembly, "WixToolset.Dependency.dependency.wixlib", symbolDefinitions);
28
}
29
}
30
}
src/wixext/DependencyTableDefinitions.cs
+6
-6
@@ -9,7 +9,7 @@ namespace WixToolset.Dependency
9
{
10
public static readonly TableDefinition WixDependencyProvider = new TableDefinition(
11
"WixDependencyProvider",
12
- TupleDefinitions.WixDependencyProvider,
12
+ SymbolDefinitions.WixDependencyProvider,
13
new[]
14
{
15
new ColumnDefinition("WixDependencyProvider", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The non-localized primary key for the table.", modularizeType: ColumnModularizeType.Column),
@@ -19,12 +19,12 @@ namespace WixToolset.Dependency
19
new ColumnDefinition("DisplayName", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "The display name of the package."),
20
new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, maxValue: 2147483647, description: "A 32-bit word that specifies the attribute flags to be applied."),
21
},
22
- tupleIdIsPrimaryKey: true
22
+ symbolIdIsPrimaryKey: true
23
);
24
25
public static readonly TableDefinition WixDependency = new TableDefinition(
26
"WixDependency",
27
- DependencyTupleDefinitions.WixDependency,
27
+ DependencySymbolDefinitions.WixDependency,
28
new[]
29
{
30
new ColumnDefinition("WixDependency", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The non-localized primary key for the table.", modularizeType: ColumnModularizeType.Column),
@@ -33,18 +33,18 @@ namespace WixToolset.Dependency
33
new ColumnDefinition("MaxVersion", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Version, description: "The maximum version of the provider supported."),
34
new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, maxValue: 2147483647, description: "A 32-bit word that specifies the attribute flags to be applied."),
35
},
36
- tupleIdIsPrimaryKey: true
36
+ symbolIdIsPrimaryKey: true
37
);
38
39
public static readonly TableDefinition WixDependencyRef = new TableDefinition(
40
"WixDependencyRef",
41
- DependencyTupleDefinitions.WixDependencyRef,
41
+ DependencySymbolDefinitions.WixDependencyRef,
42
new[]
43
{
44
new ColumnDefinition("WixDependencyProvider_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "WixDependencyProvider", keyColumn: 1, description: "Foreign key into the Component table.", modularizeType: ColumnModularizeType.Column),
45
new ColumnDefinition("WixDependency_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "WixDependency", keyColumn: 1, description: "Foreign key into the WixDependency table.", modularizeType: ColumnModularizeType.Column),
46
},
47
- tupleIdIsPrimaryKey: false
47
+ symbolIdIsPrimaryKey: false
48
);
49
50
public static readonly TableDefinition[] All = new[]
src/wixext/Tuples/DependencyTupleDefinitions.cs
+9
-9
@@ -5,19 +5,19 @@ namespace WixToolset.Dependency
5
using System;
6
using WixToolset.Data;
7
8
- public enum DependencyTupleDefinitionType
8
+ public enum DependencySymbolDefinitionType
9
{
10
WixDependency,
11
WixDependencyRef,
12
}
13
14
- public static partial class DependencyTupleDefinitions
14
+ public static partial class DependencySymbolDefinitions
15
{
16
public static readonly Version Version = new Version("4.0.0");
17
18
- public static IntermediateTupleDefinition ByName(string name)
18
+ public static IntermediateSymbolDefinition ByName(string name)
19
{
20
- if (!Enum.TryParse(name, out DependencyTupleDefinitionType type))
20
+ if (!Enum.TryParse(name, out DependencySymbolDefinitionType type))
21
{
22
return null;
23
}
@@ -25,15 +25,15 @@ namespace WixToolset.Dependency
25
return ByType(type);
26
}
27
28
- public static IntermediateTupleDefinition ByType(DependencyTupleDefinitionType type)
28
+ public static IntermediateSymbolDefinition ByType(DependencySymbolDefinitionType type)
29
{
30
switch (type)
31
{
32
- case DependencyTupleDefinitionType.WixDependency:
33
- return DependencyTupleDefinitions.WixDependency;
32
+ case DependencySymbolDefinitionType.WixDependency:
33
+ return DependencySymbolDefinitions.WixDependency;
34
35
- case DependencyTupleDefinitionType.WixDependencyRef:
36
- return DependencyTupleDefinitions.WixDependencyRef;
35
+ case DependencySymbolDefinitionType.WixDependencyRef:
36
+ return DependencySymbolDefinitions.WixDependencyRef;
37
38
default:
39
throw new ArgumentOutOfRangeException(nameof(type));
src/wixext/Tuples/WixDependencyRefTuple.cs
+17
-17
@@ -3,53 +3,53 @@
3
namespace WixToolset.Dependency
4
{
5
using WixToolset.Data;
6
- using WixToolset.Dependency.Tuples;
6
+ using WixToolset.Dependency.Symbols;
7
8
- public static partial class DependencyTupleDefinitions
8
+ public static partial class DependencySymbolDefinitions
9
{
10
- public static readonly IntermediateTupleDefinition WixDependencyRef = new IntermediateTupleDefinition(
11
- DependencyTupleDefinitionType.WixDependencyRef.ToString(),
10
+ public static readonly IntermediateSymbolDefinition WixDependencyRef = new IntermediateSymbolDefinition(
11
+ DependencySymbolDefinitionType.WixDependencyRef.ToString(),
12
new[]
13
{
14
- new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependencyProviderRef), IntermediateFieldType.String),
15
- new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependencyRef), IntermediateFieldType.String),
14
+ new IntermediateFieldDefinition(nameof(WixDependencyRefSymbolFields.WixDependencyProviderRef), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixDependencyRefSymbolFields.WixDependencyRef), IntermediateFieldType.String),
16
},
17
- typeof(WixDependencyRefTuple));
17
+ typeof(WixDependencyRefSymbol));
18
}
19
}
20
21
-namespace WixToolset.Dependency.Tuples
21
+namespace WixToolset.Dependency.Symbols
22
{
23
using WixToolset.Data;
24
25
- public enum WixDependencyRefTupleFields
25
+ public enum WixDependencyRefSymbolFields
26
{
27
WixDependencyProviderRef,
28
WixDependencyRef,
29
}
30
31
- public class WixDependencyRefTuple : IntermediateTuple
31
+ public class WixDependencyRefSymbol : IntermediateSymbol
32
{
33
- public WixDependencyRefTuple() : base(DependencyTupleDefinitions.WixDependencyRef, null, null)
33
+ public WixDependencyRefSymbol() : base(DependencySymbolDefinitions.WixDependencyRef, null, null)
34
{
35
}
36
37
- public WixDependencyRefTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependencyRef, sourceLineNumber, id)
37
+ public WixDependencyRefSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencySymbolDefinitions.WixDependencyRef, sourceLineNumber, id)
38
{
39
}
40
41
- public IntermediateField this[WixDependencyRefTupleFields index] => this.Fields[(int)index];
41
+ public IntermediateField this[WixDependencyRefSymbolFields index] => this.Fields[(int)index];
42
43
public string WixDependencyProviderRef
44
{
45
- get => this.Fields[(int)WixDependencyRefTupleFields.WixDependencyProviderRef].AsString();
46
- set => this.Set((int)WixDependencyRefTupleFields.WixDependencyProviderRef, value);
45
+ get => this.Fields[(int)WixDependencyRefSymbolFields.WixDependencyProviderRef].AsString();
46
+ set => this.Set((int)WixDependencyRefSymbolFields.WixDependencyProviderRef, value);
47
}
48
49
public string WixDependencyRef
50
{
51
- get => this.Fields[(int)WixDependencyRefTupleFields.WixDependencyRef].AsString();
52
- set => this.Set((int)WixDependencyRefTupleFields.WixDependencyRef, value);
51
+ get => this.Fields[(int)WixDependencyRefSymbolFields.WixDependencyRef].AsString();
52
+ set => this.Set((int)WixDependencyRefSymbolFields.WixDependencyRef, value);
53
}
54
}
55
}
\ No newline at end of file
src/wixext/Tuples/WixDependencyTuple.cs
+23
-23
@@ -3,28 +3,28 @@
3
namespace WixToolset.Dependency
4
{
5
using WixToolset.Data;
6
- using WixToolset.Dependency.Tuples;
6
+ using WixToolset.Dependency.Symbols;
7
8
- public static partial class DependencyTupleDefinitions
8
+ public static partial class DependencySymbolDefinitions
9
{
10
- public static readonly IntermediateTupleDefinition WixDependency = new IntermediateTupleDefinition(
11
- DependencyTupleDefinitionType.WixDependency.ToString(),
10
+ public static readonly IntermediateSymbolDefinition WixDependency = new IntermediateSymbolDefinition(
11
+ DependencySymbolDefinitionType.WixDependency.ToString(),
12
new[]
13
{
14
- new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.ProviderKey), IntermediateFieldType.String),
15
- new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MinVersion), IntermediateFieldType.String),
16
- new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MaxVersion), IntermediateFieldType.String),
17
- new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.Attributes), IntermediateFieldType.Number),
14
+ new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.ProviderKey), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.MinVersion), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.MaxVersion), IntermediateFieldType.String),
17
+ new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.Attributes), IntermediateFieldType.Number),
18
},
19
- typeof(WixDependencyTuple));
19
+ typeof(WixDependencySymbol));
20
}
21
}
22
23
-namespace WixToolset.Dependency.Tuples
23
+namespace WixToolset.Dependency.Symbols
24
{
25
using WixToolset.Data;
26
27
- public enum WixDependencyTupleFields
27
+ public enum WixDependencySymbolFields
28
{
29
ProviderKey,
30
MinVersion,
@@ -32,40 +32,40 @@ namespace WixToolset.Dependency.Tuples
32
Attributes,
33
}
34
35
- public class WixDependencyTuple : IntermediateTuple
35
+ public class WixDependencySymbol : IntermediateSymbol
36
{
37
- public WixDependencyTuple() : base(DependencyTupleDefinitions.WixDependency, null, null)
37
+ public WixDependencySymbol() : base(DependencySymbolDefinitions.WixDependency, null, null)
38
{
39
}
40
41
- public WixDependencyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependency, sourceLineNumber, id)
41
+ public WixDependencySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencySymbolDefinitions.WixDependency, sourceLineNumber, id)
42
{
43
}
44
45
- public IntermediateField this[WixDependencyTupleFields index] => this.Fields[(int)index];
45
+ public IntermediateField this[WixDependencySymbolFields index] => this.Fields[(int)index];
46
47
public string ProviderKey
48
{
49
- get => this.Fields[(int)WixDependencyTupleFields.ProviderKey].AsString();
50
- set => this.Set((int)WixDependencyTupleFields.ProviderKey, value);
49
+ get => this.Fields[(int)WixDependencySymbolFields.ProviderKey].AsString();
50
+ set => this.Set((int)WixDependencySymbolFields.ProviderKey, value);
51
}
52
53
public string MinVersion
54
{
55
- get => this.Fields[(int)WixDependencyTupleFields.MinVersion].AsString();
56
- set => this.Set((int)WixDependencyTupleFields.MinVersion, value);
55
+ get => this.Fields[(int)WixDependencySymbolFields.MinVersion].AsString();
56
+ set => this.Set((int)WixDependencySymbolFields.MinVersion, value);
57
}
58
59
public string MaxVersion
60
{
61
- get => this.Fields[(int)WixDependencyTupleFields.MaxVersion].AsString();
62
- set => this.Set((int)WixDependencyTupleFields.MaxVersion, value);
61
+ get => this.Fields[(int)WixDependencySymbolFields.MaxVersion].AsString();
62
+ set => this.Set((int)WixDependencySymbolFields.MaxVersion, value);
63
}
64
65
public int Attributes
66
{
67
- get => this.Fields[(int)WixDependencyTupleFields.Attributes].AsNumber();
68
- set => this.Set((int)WixDependencyTupleFields.Attributes, value);
67
+ get => this.Fields[(int)WixDependencySymbolFields.Attributes].AsNumber();
68
+ set => this.Set((int)WixDependencySymbolFields.Attributes, value);
69
}
70
}
71
}
\ No newline at end of file