aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/Tuples/BalTupleDefinitions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wixext/Tuples/BalTupleDefinitions.cs')
-rw-r--r--src/wixext/Tuples/BalTupleDefinitions.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/wixext/Tuples/BalTupleDefinitions.cs b/src/wixext/Tuples/BalTupleDefinitions.cs
new file mode 100644
index 00000000..676db9f6
--- /dev/null
+++ b/src/wixext/Tuples/BalTupleDefinitions.cs
@@ -0,0 +1,55 @@
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
3namespace WixToolset.Bal
4{
5 using System;
6 using WixToolset.Data;
7
8 public enum BalTupleDefinitionType
9 {
10 WixBalBAFunctions,
11 WixBalCondition,
12 WixMbaPrereqInformation,
13 WixStdbaOptions,
14 WixStdbaOverridableVariable,
15 }
16
17 public static partial class BalTupleDefinitions
18 {
19 public static readonly Version Version = new Version("4.0.0");
20
21 public static IntermediateTupleDefinition ByName(string name)
22 {
23 if (!Enum.TryParse(name, out BalTupleDefinitionType type))
24 {
25 return null;
26 }
27
28 return ByType(type);
29 }
30
31 public static IntermediateTupleDefinition ByType(BalTupleDefinitionType type)
32 {
33 switch (type)
34 {
35 case BalTupleDefinitionType.WixBalBAFunctions:
36 return BalTupleDefinitions.WixBalBAFunctions;
37
38 case BalTupleDefinitionType.WixBalCondition:
39 return BalTupleDefinitions.WixBalCondition;
40
41 case BalTupleDefinitionType.WixMbaPrereqInformation:
42 return BalTupleDefinitions.WixMbaPrereqInformation;
43
44 case BalTupleDefinitionType.WixStdbaOptions:
45 return BalTupleDefinitions.WixStdbaOptions;
46
47 case BalTupleDefinitionType.WixStdbaOverridableVariable:
48 return BalTupleDefinitions.WixStdbaOverridableVariable;
49
50 default:
51 throw new ArgumentOutOfRangeException(nameof(type));
52 }
53 }
54 }
55}