diff options
Diffstat (limited to 'src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs')
-rw-r--r-- | src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs new file mode 100644 index 00000000..9959a56f --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs | |||
@@ -0,0 +1,63 @@ | |||
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.ComPlus | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.ComPlus.Symbols; | ||
7 | |||
8 | public static partial class ComPlusSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition ComPlusMethod = new IntermediateSymbolDefinition( | ||
11 | ComPlusSymbolDefinitionType.ComPlusMethod.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(ComPlusMethodSymbolFields.InterfaceRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(ComPlusMethodSymbolFields.Index), IntermediateFieldType.Number), | ||
16 | new IntermediateFieldDefinition(nameof(ComPlusMethodSymbolFields.Name), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(ComPlusMethodSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.ComPlus.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum ComPlusMethodSymbolFields | ||
27 | { | ||
28 | InterfaceRef, | ||
29 | Index, | ||
30 | Name, | ||
31 | } | ||
32 | |||
33 | public class ComPlusMethodSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public ComPlusMethodSymbol() : base(ComPlusSymbolDefinitions.ComPlusMethod, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public ComPlusMethodSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusMethod, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[ComPlusMethodSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string InterfaceRef | ||
46 | { | ||
47 | get => this.Fields[(int)ComPlusMethodSymbolFields.InterfaceRef].AsString(); | ||
48 | set => this.Set((int)ComPlusMethodSymbolFields.InterfaceRef, value); | ||
49 | } | ||
50 | |||
51 | public int? Index | ||
52 | { | ||
53 | get => this.Fields[(int)ComPlusMethodSymbolFields.Index].AsNullableNumber(); | ||
54 | set => this.Set((int)ComPlusMethodSymbolFields.Index, value); | ||
55 | } | ||
56 | |||
57 | public string Name | ||
58 | { | ||
59 | get => this.Fields[(int)ComPlusMethodSymbolFields.Name].AsString(); | ||
60 | set => this.Set((int)ComPlusMethodSymbolFields.Name, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||