aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Symbols/WixBundleCustomDataCellSymbol.cs
blob: 0488969aa0ef27bfa15d7460f35f11ed8c86e4a0 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// 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 WixBundleCustomDataCell = new IntermediateSymbolDefinition(
            SymbolDefinitionType.WixBundleCustomDataCell,
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellSymbolFields.CustomDataRef), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellSymbolFields.AttributeRef), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellSymbolFields.ElementId), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellSymbolFields.Value), IntermediateFieldType.String),
            },
            typeof(WixBundleCustomDataCellSymbol));
    }
}

namespace WixToolset.Data.Symbols
{
    public enum WixBundleCustomDataCellSymbolFields
    {
        CustomDataRef,
        AttributeRef,
        ElementId,
        Value,
    }

    public class WixBundleCustomDataCellSymbol : IntermediateSymbol
    {
        public WixBundleCustomDataCellSymbol() : base(SymbolDefinitions.WixBundleCustomDataCell, null, null)
        {
        }

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

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

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

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

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

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