aboutsummaryrefslogtreecommitdiff
path: root/src/test/Example.Extension/ExampleTupleDefinitions.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-06-25 14:43:50 -0700
committerRob Mensching <rob@firegiant.com>2020-06-25 14:50:31 -0700
commit38afa9e7bc7eacc021f8805f607368a05751e3c3 (patch)
tree803b0a8d9a06a7d6f7c4df408437017ae21a883e /src/test/Example.Extension/ExampleTupleDefinitions.cs
parent8968578d50858721317d410549a9f9b5c62bf1f7 (diff)
downloadwix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.gz
wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.bz2
wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.zip
The Great Tuple to Symbol Rename (tm)
Diffstat (limited to 'src/test/Example.Extension/ExampleTupleDefinitions.cs')
-rw-r--r--src/test/Example.Extension/ExampleTupleDefinitions.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/test/Example.Extension/ExampleTupleDefinitions.cs b/src/test/Example.Extension/ExampleTupleDefinitions.cs
index 446c2c45..f13d716d 100644
--- a/src/test/Example.Extension/ExampleTupleDefinitions.cs
+++ b/src/test/Example.Extension/ExampleTupleDefinitions.cs
@@ -6,58 +6,58 @@ namespace Example.Extension
6 using WixToolset.Data; 6 using WixToolset.Data;
7 using WixToolset.Data.Burn; 7 using WixToolset.Data.Burn;
8 8
9 public enum ExampleTupleDefinitionType 9 public enum ExampleSymbolDefinitionType
10 { 10 {
11 Example, 11 Example,
12 ExampleSearch, 12 ExampleSearch,
13 } 13 }
14 14
15 public static class ExampleTupleDefinitions 15 public static class ExampleSymbolDefinitions
16 { 16 {
17 public static readonly IntermediateTupleDefinition Example = new IntermediateTupleDefinition( 17 public static readonly IntermediateSymbolDefinition Example = new IntermediateSymbolDefinition(
18 ExampleTupleDefinitionType.Example.ToString(), 18 ExampleSymbolDefinitionType.Example.ToString(),
19 new[] 19 new[]
20 { 20 {
21 new IntermediateFieldDefinition(nameof(ExampleTupleFields.Value), IntermediateFieldType.String), 21 new IntermediateFieldDefinition(nameof(ExampleSymbolFields.Value), IntermediateFieldType.String),
22 }, 22 },
23 typeof(ExampleTuple)); 23 typeof(ExampleSymbol));
24 24
25 public static readonly IntermediateTupleDefinition ExampleSearch = new IntermediateTupleDefinition( 25 public static readonly IntermediateSymbolDefinition ExampleSearch = new IntermediateSymbolDefinition(
26 ExampleTupleDefinitionType.ExampleSearch.ToString(), 26 ExampleSymbolDefinitionType.ExampleSearch.ToString(),
27 new[] 27 new[]
28 { 28 {
29 new IntermediateFieldDefinition(nameof(ExampleSearchTupleFields.SearchFor), IntermediateFieldType.String), 29 new IntermediateFieldDefinition(nameof(ExampleSearchSymbolFields.SearchFor), IntermediateFieldType.String),
30 }, 30 },
31 typeof(ExampleSearchTuple)); 31 typeof(ExampleSearchSymbol));
32 32
33 static ExampleTupleDefinitions() 33 static ExampleSymbolDefinitions()
34 { 34 {
35 ExampleSearch.AddTag(BurnConstants.BundleExtensionSearchTupleDefinitionTag); 35 ExampleSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag);
36 } 36 }
37 37
38 public static bool TryGetTupleType(string name, out ExampleTupleDefinitionType type) 38 public static bool TryGetSymbolType(string name, out ExampleSymbolDefinitionType type)
39 { 39 {
40 return Enum.TryParse(name, out type); 40 return Enum.TryParse(name, out type);
41 } 41 }
42 42
43 public static IntermediateTupleDefinition ByName(string name) 43 public static IntermediateSymbolDefinition ByName(string name)
44 { 44 {
45 if (!TryGetTupleType(name, out var type)) 45 if (!TryGetSymbolType(name, out var type))
46 { 46 {
47 return null; 47 return null;
48 } 48 }
49 return ByType(type); 49 return ByType(type);
50 } 50 }
51 51
52 public static IntermediateTupleDefinition ByType(ExampleTupleDefinitionType type) 52 public static IntermediateSymbolDefinition ByType(ExampleSymbolDefinitionType type)
53 { 53 {
54 switch (type) 54 switch (type)
55 { 55 {
56 case ExampleTupleDefinitionType.Example: 56 case ExampleSymbolDefinitionType.Example:
57 return ExampleTupleDefinitions.Example; 57 return ExampleSymbolDefinitions.Example;
58 58
59 case ExampleTupleDefinitionType.ExampleSearch: 59 case ExampleSymbolDefinitionType.ExampleSearch:
60 return ExampleTupleDefinitions.ExampleSearch; 60 return ExampleSymbolDefinitions.ExampleSearch;
61 61
62 default: 62 default:
63 throw new ArgumentOutOfRangeException(nameof(type)); 63 throw new ArgumentOutOfRangeException(nameof(type));