| 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.Util |
| 4 | { |
| 5 | using WixToolset.Data; |
| 6 | using WixToolset.Util.Symbols; |
| 7 | |
| 8 | public static partial class UtilSymbolDefinitions |
| 9 | { |
| 10 | public static readonly IntermediateSymbolDefinition WixRemoveFolderEx = new IntermediateSymbolDefinition( |
| 11 | UtilSymbolDefinitionType.WixRemoveFolderEx.ToString(), |
| 12 | new[] |
| 13 | { |
| 14 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExSymbolFields.ComponentRef), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExSymbolFields.Property), IntermediateFieldType.String), |
| 16 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExSymbolFields.InstallMode), IntermediateFieldType.Number), |
| 17 | new IntermediateFieldDefinition(nameof(WixRemoveFolderExSymbolFields.Condition), IntermediateFieldType.String), |
| 18 | }, |
| 19 | typeof(WixRemoveFolderExSymbol)); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | namespace WixToolset.Util.Symbols |
| 24 | { |
| 25 | using WixToolset.Data; |
| 26 | |
| 27 | public enum WixRemoveFolderExSymbolFields |
| 28 | { |
| 29 | ComponentRef, |
| 30 | Property, |
| 31 | InstallMode, |
| 32 | Condition, |
| 33 | } |
| 34 | |
| 35 | public enum WixRemoveFolderExInstallMode |
| 36 | { |
| 37 | Install = 1, |
| 38 | Uninstall = 2, |
| 39 | Both = 3, |
| 40 | } |
| 41 | |
| 42 | public class WixRemoveFolderExSymbol : IntermediateSymbol |
| 43 | { |
| 44 | public WixRemoveFolderExSymbol() : base(UtilSymbolDefinitions.WixRemoveFolderEx, null, null) |
| 45 | { |
| 46 | } |
| 47 | |
| 48 | public WixRemoveFolderExSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.WixRemoveFolderEx, sourceLineNumber, id) |
| 49 | { |
| 50 | } |
| 51 | |
| 52 | public IntermediateField this[WixRemoveFolderExSymbolFields index] => this.Fields[(int)index]; |
| 53 | |
| 54 | public string ComponentRef |
| 55 | { |
| 56 | get => this.Fields[(int)WixRemoveFolderExSymbolFields.ComponentRef].AsString(); |
| 57 | set => this.Set((int)WixRemoveFolderExSymbolFields.ComponentRef, value); |
| 58 | } |
| 59 | |
| 60 | public string Property |
| 61 | { |
| 62 | get => this.Fields[(int)WixRemoveFolderExSymbolFields.Property].AsString(); |
| 63 | set => this.Set((int)WixRemoveFolderExSymbolFields.Property, value); |
| 64 | } |
| 65 | |
| 66 | public WixRemoveFolderExInstallMode InstallMode |
| 67 | { |
| 68 | get => (WixRemoveFolderExInstallMode)this.Fields[(int)WixRemoveFolderExSymbolFields.InstallMode].AsNumber(); |
| 69 | set => this.Set((int)WixRemoveFolderExSymbolFields.InstallMode, (int)value); |
| 70 | } |
| 71 | |
| 72 | public string Condition |
| 73 | { |
| 74 | get => this.Fields[(int)WixRemoveFolderExSymbolFields.Condition].AsString(); |
| 75 | set => this.Set((int)WixRemoveFolderExSymbolFields.Condition, value); |
| 76 | } |
| 77 | } |
| 78 | } |