main
cs 102 lines 3.3 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.Data
4 {
5 using WixToolset.Data.Symbols;
6
7 public static partial class SymbolDefinitions
8 {
9 public static readonly IntermediateSymbolDefinition SummaryInformation = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.SummaryInformation,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(SummaryInformationSymbolFields.PropertyId), IntermediateFieldType.Number),
14 new IntermediateFieldDefinition(nameof(SummaryInformationSymbolFields.Value), IntermediateFieldType.String),
15 },
16 typeof(SummaryInformationSymbol));
17 }
18 }
19
20 namespace WixToolset.Data.Symbols
21 {
22 public enum SummaryInformationSymbolFields
23 {
24 PropertyId,
25 Value,
26 }
27
28 public enum SummaryInformationType
29 {
30 Codepage = 1,
31 Title,
32 Subject,
33 PatchPackageName = 3, //used by patches
34 Author,
35 Keywords,
36 Comments,
37 PlatformAndLanguage,
38 PatchProductCodes = 7, // used by patches
39 TransformPlatformAndLanguageOrStorageNames,
40 TransformNames = 8, // used by patches
41 PackageCode,
42 PatchCode = 9, // used by patches
43 TransformProductCodes = 9, // used by transforms
44 Reserved11 = 11, // reserved by patches
45 Created,
46 LastSaved,
47 WindowsInstallerVersion,
48 Reserved14 = 14, // reserved by patches
49 WordCount,
50 PatchInstallerRequirement = 15, // used by patches
51 Reserved16, // reserved by patches
52 TransformValidationFlags = 16, // used by transforms
53 CreatingApplication = 18,
54 Security
55 }
56
57 /// <summary>
58 /// Summary information values for the PachInstallerRequirement property.
59 /// </summary>
60 public enum PatchInstallerRequirement
61 {
62 /// <summary>Any version of the installer will do</summary>
63 Version10 = 1,
64
65 /// <summary>At least 1.2</summary>
66 Version12 = 2,
67
68 /// <summary>At least 2.0</summary>
69 Version20 = 3,
70
71 /// <summary>At least 3.0</summary>
72 Version30 = 4,
73
74 /// <summary>At least 3.1</summary>
75 Version31 = 5,
76 }
77
78 public class SummaryInformationSymbol : IntermediateSymbol
79 {
80 public SummaryInformationSymbol() : base(SymbolDefinitions.SummaryInformation, null, null)
81 {
82 }
83
84 public SummaryInformationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.SummaryInformation, sourceLineNumber, id)
85 {
86 }
87
88 public IntermediateField this[SummaryInformationSymbolFields index] => this.Fields[(int)index];
89
90 public SummaryInformationType PropertyId
91 {
92 get => (SummaryInformationType)this.Fields[(int)SummaryInformationSymbolFields.PropertyId].AsNumber();
93 set => this.Set((int)SummaryInformationSymbolFields.PropertyId, (int)value);
94 }
95
96 public string Value
97 {
98 get => (string)this.Fields[(int)SummaryInformationSymbolFields.Value];
99 set => this.Set((int)SummaryInformationSymbolFields.Value, value);
100 }
101 }
102 }