aboutsummaryrefslogtreecommitdiff
path: root/src/api/wix/WixToolset.Data/Symbols/ModuleExclusionSymbol.cs
blob: 0c45abfa6a1038d409e26d0e4a2e7fd058edcfd5 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// 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 ModuleExclusion = new IntermediateSymbolDefinition(
            SymbolDefinitionType.ModuleExclusion,
            new[]
            {
                new IntermediateFieldDefinition(nameof(ModuleExclusionSymbolFields.ModuleID), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ModuleExclusionSymbolFields.ModuleLanguage), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ModuleExclusionSymbolFields.ExcludedID), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ModuleExclusionSymbolFields.ExcludedLanguage), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ModuleExclusionSymbolFields.ExcludedMinVersion), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ModuleExclusionSymbolFields.ExcludedMaxVersion), IntermediateFieldType.String),
            },
            typeof(ModuleExclusionSymbol));
    }
}

namespace WixToolset.Data.Symbols
{
    public enum ModuleExclusionSymbolFields
    {
        ModuleID,
        ModuleLanguage,
        ExcludedID,
        ExcludedLanguage,
        ExcludedMinVersion,
        ExcludedMaxVersion,
    }

    public class ModuleExclusionSymbol : IntermediateSymbol
    {
        public ModuleExclusionSymbol() : base(SymbolDefinitions.ModuleExclusion, null, null)
        {
        }

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

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

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

        public int ModuleLanguage
        {
            get => (int)this.Fields[(int)ModuleExclusionSymbolFields.ModuleLanguage];
            set => this.Set((int)ModuleExclusionSymbolFields.ModuleLanguage, value);
        }

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

        public int ExcludedLanguage
        {
            get => (int)this.Fields[(int)ModuleExclusionSymbolFields.ExcludedLanguage];
            set => this.Set((int)ModuleExclusionSymbolFields.ExcludedLanguage, value);
        }

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

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