diff options
Diffstat (limited to 'src/WixToolset.Data/Tuples/ClassTuple.cs')
-rw-r--r-- | src/WixToolset.Data/Tuples/ClassTuple.cs | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/ClassTuple.cs b/src/WixToolset.Data/Tuples/ClassTuple.cs new file mode 100644 index 00000000..a9bb3b95 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ClassTuple.cs | |||
@@ -0,0 +1,140 @@ | |||
1 | // 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. | ||
2 | |||
3 | namespace WixToolset.Data | ||
4 | { | ||
5 | using WixToolset.Data.Tuples; | ||
6 | |||
7 | public static partial class TupleDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateTupleDefinition Class = new IntermediateTupleDefinition( | ||
10 | TupleDefinitionType.Class, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(ClassTupleFields.CLSID), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(ClassTupleFields.Context), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(ClassTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(ClassTupleFields.ProgId_Default), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(ClassTupleFields.Description), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(ClassTupleFields.AppId_), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(ClassTupleFields.FileTypeMask), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(ClassTupleFields.Icon_), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(ClassTupleFields.IconIndex), IntermediateFieldType.Number), | ||
22 | new IntermediateFieldDefinition(nameof(ClassTupleFields.DefInprocHandler), IntermediateFieldType.String), | ||
23 | new IntermediateFieldDefinition(nameof(ClassTupleFields.Argument), IntermediateFieldType.String), | ||
24 | new IntermediateFieldDefinition(nameof(ClassTupleFields.Feature_), IntermediateFieldType.String), | ||
25 | new IntermediateFieldDefinition(nameof(ClassTupleFields.Attributes), IntermediateFieldType.Number), | ||
26 | }, | ||
27 | typeof(ClassTuple)); | ||
28 | } | ||
29 | } | ||
30 | |||
31 | namespace WixToolset.Data.Tuples | ||
32 | { | ||
33 | public enum ClassTupleFields | ||
34 | { | ||
35 | CLSID, | ||
36 | Context, | ||
37 | Component_, | ||
38 | ProgId_Default, | ||
39 | Description, | ||
40 | AppId_, | ||
41 | FileTypeMask, | ||
42 | Icon_, | ||
43 | IconIndex, | ||
44 | DefInprocHandler, | ||
45 | Argument, | ||
46 | Feature_, | ||
47 | Attributes, | ||
48 | } | ||
49 | |||
50 | public class ClassTuple : IntermediateTuple | ||
51 | { | ||
52 | public ClassTuple() : base(TupleDefinitions.Class, null, null) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | public ClassTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Class, sourceLineNumber, id) | ||
57 | { | ||
58 | } | ||
59 | |||
60 | public IntermediateField this[ClassTupleFields index] => this.Fields[(int)index]; | ||
61 | |||
62 | public string CLSID | ||
63 | { | ||
64 | get => (string)this.Fields[(int)ClassTupleFields.CLSID]?.Value; | ||
65 | set => this.Set((int)ClassTupleFields.CLSID, value); | ||
66 | } | ||
67 | |||
68 | public string Context | ||
69 | { | ||
70 | get => (string)this.Fields[(int)ClassTupleFields.Context]?.Value; | ||
71 | set => this.Set((int)ClassTupleFields.Context, value); | ||
72 | } | ||
73 | |||
74 | public string Component_ | ||
75 | { | ||
76 | get => (string)this.Fields[(int)ClassTupleFields.Component_]?.Value; | ||
77 | set => this.Set((int)ClassTupleFields.Component_, value); | ||
78 | } | ||
79 | |||
80 | public string ProgId_Default | ||
81 | { | ||
82 | get => (string)this.Fields[(int)ClassTupleFields.ProgId_Default]?.Value; | ||
83 | set => this.Set((int)ClassTupleFields.ProgId_Default, value); | ||
84 | } | ||
85 | |||
86 | public string Description | ||
87 | { | ||
88 | get => (string)this.Fields[(int)ClassTupleFields.Description]?.Value; | ||
89 | set => this.Set((int)ClassTupleFields.Description, value); | ||
90 | } | ||
91 | |||
92 | public string AppId_ | ||
93 | { | ||
94 | get => (string)this.Fields[(int)ClassTupleFields.AppId_]?.Value; | ||
95 | set => this.Set((int)ClassTupleFields.AppId_, value); | ||
96 | } | ||
97 | |||
98 | public string FileTypeMask | ||
99 | { | ||
100 | get => (string)this.Fields[(int)ClassTupleFields.FileTypeMask]?.Value; | ||
101 | set => this.Set((int)ClassTupleFields.FileTypeMask, value); | ||
102 | } | ||
103 | |||
104 | public string Icon_ | ||
105 | { | ||
106 | get => (string)this.Fields[(int)ClassTupleFields.Icon_]?.Value; | ||
107 | set => this.Set((int)ClassTupleFields.Icon_, value); | ||
108 | } | ||
109 | |||
110 | public int IconIndex | ||
111 | { | ||
112 | get => (int)this.Fields[(int)ClassTupleFields.IconIndex]?.Value; | ||
113 | set => this.Set((int)ClassTupleFields.IconIndex, value); | ||
114 | } | ||
115 | |||
116 | public string DefInprocHandler | ||
117 | { | ||
118 | get => (string)this.Fields[(int)ClassTupleFields.DefInprocHandler]?.Value; | ||
119 | set => this.Set((int)ClassTupleFields.DefInprocHandler, value); | ||
120 | } | ||
121 | |||
122 | public string Argument | ||
123 | { | ||
124 | get => (string)this.Fields[(int)ClassTupleFields.Argument]?.Value; | ||
125 | set => this.Set((int)ClassTupleFields.Argument, value); | ||
126 | } | ||
127 | |||
128 | public string Feature_ | ||
129 | { | ||
130 | get => (string)this.Fields[(int)ClassTupleFields.Feature_]?.Value; | ||
131 | set => this.Set((int)ClassTupleFields.Feature_, value); | ||
132 | } | ||
133 | |||
134 | public int Attributes | ||
135 | { | ||
136 | get => (int)this.Fields[(int)ClassTupleFields.Attributes]?.Value; | ||
137 | set => this.Set((int)ClassTupleFields.Attributes, value); | ||
138 | } | ||
139 | } | ||
140 | } \ No newline at end of file | ||