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