main
cs 94 lines 3.4 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 WixBundlePatchTargetCode = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.WixBundlePatchTargetCode,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.PackagePayloadRef), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.TargetCode), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.Attributes), IntermediateFieldType.Number),
16 new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.Type), IntermediateFieldType.Number),
17 },
18 typeof(WixBundlePatchTargetCodeSymbol));
19 }
20 }
21
22 namespace WixToolset.Data.Symbols
23 {
24 using System;
25
26 public enum WixBundlePatchTargetCodeSymbolFields
27 {
28 PackagePayloadRef,
29 TargetCode,
30 Attributes,
31 Type,
32 }
33
34 [Flags]
35 public enum WixBundlePatchTargetCodeAttributes : int
36 {
37 None = 0,
38 }
39
40 public enum WixBundlePatchTargetCodeType
41 {
42 /// <summary>
43 /// The transform has no specific target.
44 /// </summary>
45 Unspecified,
46
47 /// <summary>
48 /// The transform targets a specific ProductCode.
49 /// </summary>
50 ProductCode,
51
52 /// <summary>
53 /// The transform targets a specific UpgradeCode.
54 /// </summary>
55 UpgradeCode,
56 }
57
58 public class WixBundlePatchTargetCodeSymbol : IntermediateSymbol
59 {
60 public WixBundlePatchTargetCodeSymbol() : base(SymbolDefinitions.WixBundlePatchTargetCode, null, null)
61 {
62 }
63
64 public WixBundlePatchTargetCodeSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundlePatchTargetCode, sourceLineNumber, id)
65 {
66 }
67
68 public IntermediateField this[WixBundlePatchTargetCodeSymbolFields index] => this.Fields[(int)index];
69
70 public string PackagePayloadRef
71 {
72 get => (string)this.Fields[(int)WixBundlePatchTargetCodeSymbolFields.PackagePayloadRef];
73 set => this.Set((int)WixBundlePatchTargetCodeSymbolFields.PackagePayloadRef, value);
74 }
75
76 public string TargetCode
77 {
78 get => (string)this.Fields[(int)WixBundlePatchTargetCodeSymbolFields.TargetCode];
79 set => this.Set((int)WixBundlePatchTargetCodeSymbolFields.TargetCode, value);
80 }
81
82 public WixBundlePatchTargetCodeAttributes Attributes
83 {
84 get => (WixBundlePatchTargetCodeAttributes)this.Fields[(int)WixBundlePatchTargetCodeSymbolFields.Attributes].AsNumber();
85 set => this.Set((int)WixBundlePatchTargetCodeSymbolFields.Attributes, (int)value);
86 }
87
88 public WixBundlePatchTargetCodeType Type
89 {
90 get => (WixBundlePatchTargetCodeType)this.Fields[(int)WixBundlePatchTargetCodeSymbolFields.Type].AsNumber();
91 set => this.Set((int)WixBundlePatchTargetCodeSymbolFields.Type, (int)value);
92 }
93 }
94 }