summaryrefslogtreecommitdiff
path: root/src/ext/Util/wixext/Symbols/WixFormatFilesSymbol.cs
blob: 38a9b8ff994f307e3f408d45152cee61277bced5 (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
// 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.Util
{
    using WixToolset.Data;
    using WixToolset.Util.Symbols;

    public static partial class UtilSymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition WixFormatFiles = new IntermediateSymbolDefinition(
            UtilSymbolDefinitionType.WixFormatFiles.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixFormatFilesSymbolFields.BinaryRef), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixFormatFilesSymbolFields.FileRef), IntermediateFieldType.String),
            },
            typeof(WixFormatFilesSymbol));
    }
}

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

    public enum WixFormatFilesSymbolFields
    {
        BinaryRef,
        FileRef,
    }

    public class WixFormatFilesSymbol : IntermediateSymbol
    {
        public WixFormatFilesSymbol() : base(UtilSymbolDefinitions.WixFormatFiles, null, null)
        {
        }

        public WixFormatFilesSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.WixFormatFiles, sourceLineNumber, id)
        {
        }

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

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

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