| 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 ComPlusInterface = new IntermediateSymbolDefinition( |
| 11 | ComPlusSymbolDefinitionType.ComPlusInterface.ToString(), |
| 12 | new[] |
| 13 | { |
| 14 | new IntermediateFieldDefinition(nameof(ComPlusInterfaceSymbolFields.ComPlusComponentRef), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(ComPlusInterfaceSymbolFields.IID), IntermediateFieldType.String), |
| 16 | }, |
| 17 | typeof(ComPlusInterfaceSymbol)); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | namespace WixToolset.ComPlus.Symbols |
| 22 | { |
| 23 | using WixToolset.Data; |
| 24 | |
| 25 | public enum ComPlusInterfaceSymbolFields |
| 26 | { |
| 27 | ComPlusComponentRef, |
| 28 | IID, |
| 29 | } |
| 30 | |
| 31 | public class ComPlusInterfaceSymbol : IntermediateSymbol |
| 32 | { |
| 33 | public ComPlusInterfaceSymbol() : base(ComPlusSymbolDefinitions.ComPlusInterface, null, null) |
| 34 | { |
| 35 | } |
| 36 | |
| 37 | public ComPlusInterfaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusInterface, sourceLineNumber, id) |
| 38 | { |
| 39 | } |
| 40 | |
| 41 | public IntermediateField this[ComPlusInterfaceSymbolFields index] => this.Fields[(int)index]; |
| 42 | |
| 43 | public string ComPlusComponentRef |
| 44 | { |
| 45 | get => this.Fields[(int)ComPlusInterfaceSymbolFields.ComPlusComponentRef].AsString(); |
| 46 | set => this.Set((int)ComPlusInterfaceSymbolFields.ComPlusComponentRef, value); |
| 47 | } |
| 48 | |
| 49 | public string IID |
| 50 | { |
| 51 | get => this.Fields[(int)ComPlusInterfaceSymbolFields.IID].AsString(); |
| 52 | set => this.Set((int)ComPlusInterfaceSymbolFields.IID, value); |
| 53 | } |
| 54 | } |
| 55 | } |