main
cs 63 lines 2.42 KB
Raw
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.BootstrapperApplications
4 {
5 using WixToolset.Data;
6 using WixToolset.BootstrapperApplications.Symbols;
7
8 public static partial class BalSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition WixPrereqInformation = new IntermediateSymbolDefinition(
11 BalSymbolDefinitionType.WixPrereqInformation.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.PackageId), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.LicenseFile), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.LicenseUrl), IntermediateFieldType.String),
17 },
18 typeof(WixPrereqInformationSymbol));
19 }
20 }
21
22 namespace WixToolset.BootstrapperApplications.Symbols
23 {
24 using WixToolset.Data;
25
26 public enum WixPrereqInformationSymbolFields
27 {
28 PackageId,
29 LicenseFile,
30 LicenseUrl,
31 }
32
33 public class WixPrereqInformationSymbol : IntermediateSymbol
34 {
35 public WixPrereqInformationSymbol() : base(BalSymbolDefinitions.WixPrereqInformation, null, null)
36 {
37 }
38
39 public WixPrereqInformationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixPrereqInformation, sourceLineNumber, id)
40 {
41 }
42
43 public IntermediateField this[WixPrereqInformationSymbolFields index] => this.Fields[(int)index];
44
45 public string PackageId
46 {
47 get => this.Fields[(int)WixPrereqInformationSymbolFields.PackageId].AsString();
48 set => this.Set((int)WixPrereqInformationSymbolFields.PackageId, value);
49 }
50
51 public string LicenseFile
52 {
53 get => this.Fields[(int)WixPrereqInformationSymbolFields.LicenseFile].AsString();
54 set => this.Set((int)WixPrereqInformationSymbolFields.LicenseFile, value);
55 }
56
57 public string LicenseUrl
58 {
59 get => this.Fields[(int)WixPrereqInformationSymbolFields.LicenseUrl].AsString();
60 set => this.Set((int)WixPrereqInformationSymbolFields.LicenseUrl, value);
61 }
62 }
63 }