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