aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/ClassTuple.cs
blob: a9bb3b9526fa6b3d0bbfe6ca7d37d7bf9ce1c33e (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// 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.Tuples;

    public static partial class TupleDefinitions
    {
        public static readonly IntermediateTupleDefinition Class = new IntermediateTupleDefinition(
            TupleDefinitionType.Class,
            new[]
            {
                new IntermediateFieldDefinition(nameof(ClassTupleFields.CLSID), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.Context), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.Component_), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.ProgId_Default), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.Description), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.AppId_), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.FileTypeMask), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.Icon_), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.IconIndex), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.DefInprocHandler), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.Argument), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.Feature_), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ClassTupleFields.Attributes), IntermediateFieldType.Number),
            },
            typeof(ClassTuple));
    }
}

namespace WixToolset.Data.Tuples
{
    public enum ClassTupleFields
    {
        CLSID,
        Context,
        Component_,
        ProgId_Default,
        Description,
        AppId_,
        FileTypeMask,
        Icon_,
        IconIndex,
        DefInprocHandler,
        Argument,
        Feature_,
        Attributes,
    }

    public class ClassTuple : IntermediateTuple
    {
        public ClassTuple() : base(TupleDefinitions.Class, null, null)
        {
        }

        public ClassTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Class, sourceLineNumber, id)
        {
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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