| 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 WixBundleUpdate = new IntermediateSymbolDefinition( |
| 10 | SymbolDefinitionType.WixBundleUpdate, |
| 11 | new[] |
| 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixBundleUpdateSymbolFields.Location), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(WixBundleUpdateSymbolFields.Attributes), IntermediateFieldType.Number), |
| 15 | }, |
| 16 | typeof(WixBundleUpdateSymbol)); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | namespace WixToolset.Data.Symbols |
| 21 | { |
| 22 | using System; |
| 23 | |
| 24 | public enum WixBundleUpdateSymbolFields |
| 25 | { |
| 26 | Location, |
| 27 | Attributes, |
| 28 | } |
| 29 | |
| 30 | [Flags] |
| 31 | public enum WixBundleUpdateAttributes |
| 32 | { |
| 33 | None = 0x0, |
| 34 | } |
| 35 | |
| 36 | public class WixBundleUpdateSymbol : IntermediateSymbol |
| 37 | { |
| 38 | public WixBundleUpdateSymbol() : base(SymbolDefinitions.WixBundleUpdate, null, null) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | public WixBundleUpdateSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleUpdate, sourceLineNumber, id) |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | public IntermediateField this[WixBundleUpdateSymbolFields index] => this.Fields[(int)index]; |
| 47 | |
| 48 | public string Location |
| 49 | { |
| 50 | get => (string)this.Fields[(int)WixBundleUpdateSymbolFields.Location]; |
| 51 | set => this.Set((int)WixBundleUpdateSymbolFields.Location, value); |
| 52 | } |
| 53 | |
| 54 | public WixBundleUpdateAttributes Attributes |
| 55 | { |
| 56 | get => (WixBundleUpdateAttributes)this.Fields[(int)WixBundleUpdateSymbolFields.Attributes].AsNumber(); |
| 57 | set => this.Set((int)WixBundleUpdateSymbolFields.Attributes, (int)value); |
| 58 | } |
| 59 | } |
| 60 | } |