main
cs 68 lines 2.64 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 WixPatchBaseline = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.WixPatchBaseline,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(WixPatchBaselineSymbolFields.DiskId), IntermediateFieldType.Number),
14 new IntermediateFieldDefinition(nameof(WixPatchBaselineSymbolFields.ValidationFlags), IntermediateFieldType.Number),
15 new IntermediateFieldDefinition(nameof(WixPatchBaselineSymbolFields.BaselineFile), IntermediateFieldType.Path),
16 new IntermediateFieldDefinition(nameof(WixPatchBaselineSymbolFields.UpdateFile), IntermediateFieldType.Path),
17 },
18 typeof(WixPatchBaselineSymbol));
19 }
20 }
21
22 namespace WixToolset.Data.Symbols
23 {
24 public enum WixPatchBaselineSymbolFields
25 {
26 DiskId,
27 ValidationFlags,
28 BaselineFile,
29 UpdateFile,
30 }
31
32 public class WixPatchBaselineSymbol : IntermediateSymbol
33 {
34 public WixPatchBaselineSymbol() : base(SymbolDefinitions.WixPatchBaseline, null, null)
35 {
36 }
37
38 public WixPatchBaselineSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixPatchBaseline, sourceLineNumber, id)
39 {
40 }
41
42 public IntermediateField this[WixPatchBaselineSymbolFields index] => this.Fields[(int)index];
43
44 public int DiskId
45 {
46 get => (int)this.Fields[(int)WixPatchBaselineSymbolFields.DiskId];
47 set => this.Set((int)WixPatchBaselineSymbolFields.DiskId, value);
48 }
49
50 public TransformFlags ValidationFlags
51 {
52 get => (TransformFlags)this.Fields[(int)WixPatchBaselineSymbolFields.ValidationFlags].AsNumber();
53 set => this.Set((int)WixPatchBaselineSymbolFields.ValidationFlags, (int)value);
54 }
55
56 public IntermediateFieldPathValue BaselineFile
57 {
58 get => this.Fields[(int)WixPatchBaselineSymbolFields.BaselineFile].AsPath();
59 set => this.Set((int)WixPatchBaselineSymbolFields.BaselineFile, value);
60 }
61
62 public IntermediateFieldPathValue UpdateFile
63 {
64 get => this.Fields[(int)WixPatchBaselineSymbolFields.UpdateFile].AsPath();
65 set => this.Set((int)WixPatchBaselineSymbolFields.UpdateFile, value);
66 }
67 }
68 }