| 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.Symbols; |
| 6 | |
| 7 | public static partial class SymbolDefinitions |
| 8 | { |
| 9 | public static readonly IntermediateSymbolDefinition ProgId = new IntermediateSymbolDefinition( |
| 10 | SymbolDefinitionType.ProgId, |
| 11 | new[] |
| 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(ProgIdSymbolFields.ProgId), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(ProgIdSymbolFields.ParentProgIdRef), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(ProgIdSymbolFields.ClassRef), IntermediateFieldType.String), |
| 16 | new IntermediateFieldDefinition(nameof(ProgIdSymbolFields.Description), IntermediateFieldType.String), |
| 17 | new IntermediateFieldDefinition(nameof(ProgIdSymbolFields.IconRef), IntermediateFieldType.String), |
| 18 | new IntermediateFieldDefinition(nameof(ProgIdSymbolFields.IconIndex), IntermediateFieldType.Number), |
| 19 | }, |
| 20 | typeof(ProgIdSymbol)); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | namespace WixToolset.Data.Symbols |
| 25 | { |
| 26 | public enum ProgIdSymbolFields |
| 27 | { |
| 28 | ProgId, |
| 29 | ParentProgIdRef, |
| 30 | ClassRef, |
| 31 | Description, |
| 32 | IconRef, |
| 33 | IconIndex, |
| 34 | } |
| 35 | |
| 36 | public class ProgIdSymbol : IntermediateSymbol |
| 37 | { |
| 38 | public ProgIdSymbol() : base(SymbolDefinitions.ProgId, null, null) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | public ProgIdSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.ProgId, sourceLineNumber, id) |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | public IntermediateField this[ProgIdSymbolFields index] => this.Fields[(int)index]; |
| 47 | |
| 48 | public string ProgId |
| 49 | { |
| 50 | get => (string)this.Fields[(int)ProgIdSymbolFields.ProgId]; |
| 51 | set => this.Set((int)ProgIdSymbolFields.ProgId, value); |
| 52 | } |
| 53 | |
| 54 | public string ParentProgIdRef |
| 55 | { |
| 56 | get => (string)this.Fields[(int)ProgIdSymbolFields.ParentProgIdRef]; |
| 57 | set => this.Set((int)ProgIdSymbolFields.ParentProgIdRef, value); |
| 58 | } |
| 59 | |
| 60 | public string ClassRef |
| 61 | { |
| 62 | get => (string)this.Fields[(int)ProgIdSymbolFields.ClassRef]; |
| 63 | set => this.Set((int)ProgIdSymbolFields.ClassRef, value); |
| 64 | } |
| 65 | |
| 66 | public string Description |
| 67 | { |
| 68 | get => (string)this.Fields[(int)ProgIdSymbolFields.Description]; |
| 69 | set => this.Set((int)ProgIdSymbolFields.Description, value); |
| 70 | } |
| 71 | |
| 72 | public string IconRef |
| 73 | { |
| 74 | get => (string)this.Fields[(int)ProgIdSymbolFields.IconRef]; |
| 75 | set => this.Set((int)ProgIdSymbolFields.IconRef, value); |
| 76 | } |
| 77 | |
| 78 | public int? IconIndex |
| 79 | { |
| 80 | get => (int?)this.Fields[(int)ProgIdSymbolFields.IconIndex]; |
| 81 | set => this.Set((int)ProgIdSymbolFields.IconIndex, value); |
| 82 | } |
| 83 | } |
| 84 | } |