diff options
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixProductSearchSymbol.cs')
-rw-r--r-- | src/WixToolset.Data/Symbols/WixProductSearchSymbol.cs | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixProductSearchSymbol.cs b/src/WixToolset.Data/Symbols/WixProductSearchSymbol.cs new file mode 100644 index 00000000..f8a17b64 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixProductSearchSymbol.cs | |||
@@ -0,0 +1,64 @@ | |||
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 WixProductSearch = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixProductSearch, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixProductSearchSymbolFields.Guid), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixProductSearchSymbolFields.Attributes), IntermediateFieldType.Number), | ||
15 | }, | ||
16 | typeof(WixProductSearchSymbol)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Data.Symbols | ||
21 | { | ||
22 | using System; | ||
23 | |||
24 | public enum WixProductSearchSymbolFields | ||
25 | { | ||
26 | Guid, | ||
27 | Attributes, | ||
28 | } | ||
29 | |||
30 | [Flags] | ||
31 | public enum WixProductSearchAttributes | ||
32 | { | ||
33 | Version = 0x1, | ||
34 | Language = 0x2, | ||
35 | State = 0x4, | ||
36 | Assignment = 0x8, | ||
37 | UpgradeCode = 0x10, | ||
38 | } | ||
39 | |||
40 | public class WixProductSearchSymbol : IntermediateSymbol | ||
41 | { | ||
42 | public WixProductSearchSymbol() : base(SymbolDefinitions.WixProductSearch, null, null) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | public WixProductSearchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixProductSearch, sourceLineNumber, id) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | public IntermediateField this[WixProductSearchSymbolFields index] => this.Fields[(int)index]; | ||
51 | |||
52 | public string Guid | ||
53 | { | ||
54 | get => (string)this.Fields[(int)WixProductSearchSymbolFields.Guid]; | ||
55 | set => this.Set((int)WixProductSearchSymbolFields.Guid, value); | ||
56 | } | ||
57 | |||
58 | public WixProductSearchAttributes Attributes | ||
59 | { | ||
60 | get => (WixProductSearchAttributes)this.Fields[(int)WixProductSearchSymbolFields.Attributes].AsNumber(); | ||
61 | set => this.Set((int)WixProductSearchSymbolFields.Attributes, (int)value); | ||
62 | } | ||
63 | } | ||
64 | } | ||