diff options
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixSearchSymbol.cs')
-rw-r--r-- | src/WixToolset.Data/Symbols/WixSearchSymbol.cs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixSearchSymbol.cs b/src/WixToolset.Data/Symbols/WixSearchSymbol.cs new file mode 100644 index 00000000..2d6a927c --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixSearchSymbol.cs | |||
@@ -0,0 +1,60 @@ | |||
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.Data | ||
4 | { | ||
5 | using WixToolset.Data.Symbols; | ||
6 | |||
7 | public static partial class SymbolDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateSymbolDefinition WixSearch = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixSearch, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixSearchSymbolFields.Variable), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixSearchSymbolFields.Condition), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixSearchSymbolFields.BundleExtensionRef), IntermediateFieldType.String), | ||
16 | }, | ||
17 | typeof(WixSearchSymbol)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Data.Symbols | ||
22 | { | ||
23 | public enum WixSearchSymbolFields | ||
24 | { | ||
25 | Variable, | ||
26 | Condition, | ||
27 | BundleExtensionRef, | ||
28 | } | ||
29 | |||
30 | public class WixSearchSymbol : IntermediateSymbol | ||
31 | { | ||
32 | public WixSearchSymbol() : base(SymbolDefinitions.WixSearch, null, null) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | public WixSearchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixSearch, sourceLineNumber, id) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | public IntermediateField this[WixSearchSymbolFields index] => this.Fields[(int)index]; | ||
41 | |||
42 | public string Variable | ||
43 | { | ||
44 | get => (string)this.Fields[(int)WixSearchSymbolFields.Variable]; | ||
45 | set => this.Set((int)WixSearchSymbolFields.Variable, value); | ||
46 | } | ||
47 | |||
48 | public string Condition | ||
49 | { | ||
50 | get => (string)this.Fields[(int)WixSearchSymbolFields.Condition]; | ||
51 | set => this.Set((int)WixSearchSymbolFields.Condition, value); | ||
52 | } | ||
53 | |||
54 | public string BundleExtensionRef | ||
55 | { | ||
56 | get => (string)this.Fields[(int)WixSearchSymbolFields.BundleExtensionRef]; | ||
57 | set => this.Set((int)WixSearchSymbolFields.BundleExtensionRef, value); | ||
58 | } | ||
59 | } | ||
60 | } \ No newline at end of file | ||