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