| 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 CreateFolder = new IntermediateSymbolDefinition( |
| 10 | SymbolDefinitionType.CreateFolder, |
| 11 | new[] |
| 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(CreateFolderSymbolFields.DirectoryRef), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(CreateFolderSymbolFields.ComponentRef), IntermediateFieldType.String), |
| 15 | }, |
| 16 | typeof(CreateFolderSymbol)); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | namespace WixToolset.Data.Symbols |
| 21 | { |
| 22 | public enum CreateFolderSymbolFields |
| 23 | { |
| 24 | DirectoryRef, |
| 25 | ComponentRef, |
| 26 | } |
| 27 | |
| 28 | public class CreateFolderSymbol : IntermediateSymbol |
| 29 | { |
| 30 | public CreateFolderSymbol() : base(SymbolDefinitions.CreateFolder, null, null) |
| 31 | { |
| 32 | } |
| 33 | |
| 34 | public CreateFolderSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.CreateFolder, sourceLineNumber, id) |
| 35 | { |
| 36 | } |
| 37 | |
| 38 | public IntermediateField this[CreateFolderSymbolFields index] => this.Fields[(int)index]; |
| 39 | |
| 40 | public string DirectoryRef |
| 41 | { |
| 42 | get => (string)this.Fields[(int)CreateFolderSymbolFields.DirectoryRef]; |
| 43 | set => this.Set((int)CreateFolderSymbolFields.DirectoryRef, value); |
| 44 | } |
| 45 | |
| 46 | public string ComponentRef |
| 47 | { |
| 48 | get => (string)this.Fields[(int)CreateFolderSymbolFields.ComponentRef]; |
| 49 | set => this.Set((int)CreateFolderSymbolFields.ComponentRef, value); |
| 50 | } |
| 51 | } |
| 52 | } |