diff options
Diffstat (limited to '')
-rw-r--r-- | src/WixToolset.Data/Tuples/SummaryInformationTuple.cs | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs b/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs new file mode 100644 index 00000000..a67f1985 --- /dev/null +++ b/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs | |||
@@ -0,0 +1,71 @@ | |||
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.Tuples; | ||
6 | |||
7 | public static partial class TupleDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateTupleDefinition SummaryInformation = new IntermediateTupleDefinition( | ||
10 | TupleDefinitionType.SummaryInformation, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(SummaryInformationTupleFields.PropertyId), IntermediateFieldType.Number), | ||
14 | new IntermediateFieldDefinition(nameof(SummaryInformationTupleFields.Value), IntermediateFieldType.String), | ||
15 | }, | ||
16 | typeof(SummaryInformationTuple)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Data.Tuples | ||
21 | { | ||
22 | public enum SummaryInformationTupleFields | ||
23 | { | ||
24 | PropertyId, | ||
25 | Value, | ||
26 | } | ||
27 | |||
28 | public enum SumaryInformationType | ||
29 | { | ||
30 | Codepage = 1, | ||
31 | Title, | ||
32 | Subject, | ||
33 | Author, | ||
34 | Keywords, | ||
35 | Comments, | ||
36 | PlatformAndLanguage, | ||
37 | TransformPlatformAndLanguageOrStorageNames, | ||
38 | PackageCode, | ||
39 | Created = 12, | ||
40 | LastSaved, | ||
41 | WindowsInstallerVersion, | ||
42 | WordCount, | ||
43 | CreatingApplication = 18, | ||
44 | Security | ||
45 | } | ||
46 | |||
47 | public class SummaryInformationTuple : IntermediateTuple | ||
48 | { | ||
49 | public SummaryInformationTuple() : base(TupleDefinitions.SummaryInformation, null, null) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | public SummaryInformationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.SummaryInformation, sourceLineNumber, id) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | public IntermediateField this[SummaryInformationTupleFields index] => this.Fields[(int)index]; | ||
58 | |||
59 | public SumaryInformationType PropertyId | ||
60 | { | ||
61 | get => (SumaryInformationType)this.Fields[(int)SummaryInformationTupleFields.PropertyId].AsNumber(); | ||
62 | set => this.Set((int)SummaryInformationTupleFields.PropertyId, (int)value); | ||
63 | } | ||
64 | |||
65 | public string Value | ||
66 | { | ||
67 | get => (string)this.Fields[(int)SummaryInformationTupleFields.Value]; | ||
68 | set => this.Set((int)SummaryInformationTupleFields.Value, value); | ||
69 | } | ||
70 | } | ||
71 | } | ||