main
cs 92 lines 3.47 KB
Raw
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 MoveFile = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.MoveFile,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(MoveFileSymbolFields.ComponentRef), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(MoveFileSymbolFields.SourceName), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(MoveFileSymbolFields.DestinationName), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(MoveFileSymbolFields.DestinationShortName), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(MoveFileSymbolFields.SourceFolder), IntermediateFieldType.String),
18 new IntermediateFieldDefinition(nameof(MoveFileSymbolFields.DestFolder), IntermediateFieldType.String),
19 new IntermediateFieldDefinition(nameof(MoveFileSymbolFields.Delete), IntermediateFieldType.Bool),
20 },
21 typeof(MoveFileSymbol));
22 }
23 }
24
25 namespace WixToolset.Data.Symbols
26 {
27 public enum MoveFileSymbolFields
28 {
29 ComponentRef,
30 SourceName,
31 DestinationName,
32 DestinationShortName,
33 SourceFolder,
34 DestFolder,
35 Delete,
36 }
37
38 public class MoveFileSymbol : IntermediateSymbol
39 {
40 public MoveFileSymbol() : base(SymbolDefinitions.MoveFile, null, null)
41 {
42 }
43
44 public MoveFileSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.MoveFile, sourceLineNumber, id)
45 {
46 }
47
48 public IntermediateField this[MoveFileSymbolFields index] => this.Fields[(int)index];
49
50 public string ComponentRef
51 {
52 get => (string)this.Fields[(int)MoveFileSymbolFields.ComponentRef];
53 set => this.Set((int)MoveFileSymbolFields.ComponentRef, value);
54 }
55
56 public string SourceName
57 {
58 get => (string)this.Fields[(int)MoveFileSymbolFields.SourceName];
59 set => this.Set((int)MoveFileSymbolFields.SourceName, value);
60 }
61
62 public string DestinationName
63 {
64 get => (string)this.Fields[(int)MoveFileSymbolFields.DestinationName];
65 set => this.Set((int)MoveFileSymbolFields.DestinationName, value);
66 }
67
68 public string DestinationShortName
69 {
70 get => (string)this.Fields[(int)MoveFileSymbolFields.DestinationShortName];
71 set => this.Set((int)MoveFileSymbolFields.DestinationShortName, value);
72 }
73
74 public string SourceFolder
75 {
76 get => (string)this.Fields[(int)MoveFileSymbolFields.SourceFolder];
77 set => this.Set((int)MoveFileSymbolFields.SourceFolder, value);
78 }
79
80 public string DestFolder
81 {
82 get => (string)this.Fields[(int)MoveFileSymbolFields.DestFolder];
83 set => this.Set((int)MoveFileSymbolFields.DestFolder, value);
84 }
85
86 public bool Delete
87 {
88 get => (bool)this.Fields[(int)MoveFileSymbolFields.Delete];
89 set => this.Set((int)MoveFileSymbolFields.Delete, value);
90 }
91 }
92 }