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