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