aboutsummaryrefslogtreecommitdiff
path: root/src/api/wix/WixToolset.Data/Symbols/WixPatchTargetSymbol.cs
blob: e8c01c26fc6c540c952af9d4ebda14cc269657f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// 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.

namespace WixToolset.Data
{
    using WixToolset.Data.Symbols;

    public static partial class SymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition WixPatchTarget = new IntermediateSymbolDefinition(
            SymbolDefinitionType.WixPatchTarget,
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixPatchTargetSymbolFields.ProductCode), IntermediateFieldType.String),
            },
            typeof(WixPatchTargetSymbol));
    }
}

namespace WixToolset.Data.Symbols
{
    public enum WixPatchTargetSymbolFields
    {
        ProductCode,
    }

    public class WixPatchTargetSymbol : IntermediateSymbol
    {
        public WixPatchTargetSymbol() : base(SymbolDefinitions.WixPatchTarget, null, null)
        {
        }

        public WixPatchTargetSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixPatchTarget, sourceLineNumber, id)
        {
        }

        public IntermediateField this[WixPatchTargetSymbolFields index] => this.Fields[(int)index];

        public string ProductCode
        {
            get => (string)this.Fields[(int)WixPatchTargetSymbolFields.ProductCode];
            set => this.Set((int)WixPatchTargetSymbolFields.ProductCode, value);
        }
    }
}