diff options
Diffstat (limited to '')
-rw-r--r-- | src/WixToolset.Data/Tuples/WixFileTuple.cs | 162 |
1 files changed, 0 insertions, 162 deletions
diff --git a/src/WixToolset.Data/Tuples/WixFileTuple.cs b/src/WixToolset.Data/Tuples/WixFileTuple.cs deleted file mode 100644 index 8f7cddc4..00000000 --- a/src/WixToolset.Data/Tuples/WixFileTuple.cs +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
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.Tuples; | ||
6 | |||
7 | public static partial class TupleDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateTupleDefinition WixFile = new IntermediateTupleDefinition( | ||
10 | TupleDefinitionType.WixFile, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyType), IntermediateFieldType.Number), | ||
14 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyManifestFileRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyApplicationFileRef), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.DirectoryRef), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.DiskId), IntermediateFieldType.Number), | ||
18 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.Source), IntermediateFieldType.Path), | ||
19 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.ProcessorArchitecture), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.PatchGroup), IntermediateFieldType.Number), | ||
21 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.Attributes), IntermediateFieldType.Number), | ||
22 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.PatchAttributes), IntermediateFieldType.Number), | ||
23 | new IntermediateFieldDefinition(nameof(WixFileTupleFields.DeltaPatchHeaderSource), IntermediateFieldType.String), | ||
24 | }, | ||
25 | typeof(WixFileTuple)); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | namespace WixToolset.Data.Tuples | ||
30 | { | ||
31 | using System; | ||
32 | |||
33 | public enum WixFileTupleFields | ||
34 | { | ||
35 | AssemblyType, | ||
36 | AssemblyManifestFileRef, | ||
37 | AssemblyApplicationFileRef, | ||
38 | DirectoryRef, | ||
39 | DiskId, | ||
40 | Source, | ||
41 | ProcessorArchitecture, | ||
42 | PatchGroup, | ||
43 | Attributes, | ||
44 | PatchAttributes, | ||
45 | DeltaPatchHeaderSource, | ||
46 | } | ||
47 | |||
48 | /// <summary> | ||
49 | /// Every file row has an assembly type. | ||
50 | /// </summary> | ||
51 | public enum FileAssemblyType | ||
52 | { | ||
53 | /// <summary>File is not an assembly.</summary> | ||
54 | NotAnAssembly, | ||
55 | |||
56 | /// <summary>File is a Common Language Runtime Assembly.</summary> | ||
57 | DotNetAssembly, | ||
58 | |||
59 | /// <summary>File is Win32 SxS assembly.</summary> | ||
60 | Win32Assembly, | ||
61 | } | ||
62 | |||
63 | /// <summary> | ||
64 | /// PatchAttribute values | ||
65 | /// </summary> | ||
66 | [Flags] | ||
67 | public enum PatchAttributeType | ||
68 | { | ||
69 | None = 0, | ||
70 | |||
71 | /// <summary>Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images.</summary> | ||
72 | Ignore = 1, | ||
73 | |||
74 | /// <summary>Set if the entire file should be installed rather than creating a binary patch.</summary> | ||
75 | IncludeWholeFile = 2, | ||
76 | |||
77 | /// <summary>Set to indicate that the patch is non-vital.</summary> | ||
78 | AllowIgnoreOnError = 4, | ||
79 | |||
80 | /// <summary>Allowed bits.</summary> | ||
81 | Defined = Ignore | IncludeWholeFile | AllowIgnoreOnError | ||
82 | } | ||
83 | |||
84 | public class WixFileTuple : IntermediateTuple | ||
85 | { | ||
86 | public WixFileTuple() : base(TupleDefinitions.WixFile, null, null) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | public WixFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixFile, sourceLineNumber, id) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | public IntermediateField this[WixFileTupleFields index] => this.Fields[(int)index]; | ||
95 | |||
96 | public FileAssemblyType AssemblyType | ||
97 | { | ||
98 | get => (FileAssemblyType)(int)this.Fields[(int)WixFileTupleFields.AssemblyType]; | ||
99 | set => this.Set((int)WixFileTupleFields.AssemblyType, (int)value); | ||
100 | } | ||
101 | |||
102 | public string AssemblyManifestFileRef | ||
103 | { | ||
104 | get => (string)this.Fields[(int)WixFileTupleFields.AssemblyManifestFileRef]; | ||
105 | set => this.Set((int)WixFileTupleFields.AssemblyManifestFileRef, value); | ||
106 | } | ||
107 | |||
108 | public string AssemblyApplicationFileRef | ||
109 | { | ||
110 | get => (string)this.Fields[(int)WixFileTupleFields.AssemblyApplicationFileRef]; | ||
111 | set => this.Set((int)WixFileTupleFields.AssemblyApplicationFileRef, value); | ||
112 | } | ||
113 | |||
114 | public string DirectoryRef | ||
115 | { | ||
116 | get => (string)this.Fields[(int)WixFileTupleFields.DirectoryRef]; | ||
117 | set => this.Set((int)WixFileTupleFields.DirectoryRef, value); | ||
118 | } | ||
119 | |||
120 | public int DiskId | ||
121 | { | ||
122 | get => (int)this.Fields[(int)WixFileTupleFields.DiskId]; | ||
123 | set => this.Set((int)WixFileTupleFields.DiskId, value); | ||
124 | } | ||
125 | |||
126 | public IntermediateFieldPathValue Source | ||
127 | { | ||
128 | get => this.Fields[(int)WixFileTupleFields.Source].AsPath(); | ||
129 | set => this.Set((int)WixFileTupleFields.Source, value); | ||
130 | } | ||
131 | |||
132 | public string ProcessorArchitecture | ||
133 | { | ||
134 | get => (string)this.Fields[(int)WixFileTupleFields.ProcessorArchitecture]; | ||
135 | set => this.Set((int)WixFileTupleFields.ProcessorArchitecture, value); | ||
136 | } | ||
137 | |||
138 | public int PatchGroup | ||
139 | { | ||
140 | get => (int)this.Fields[(int)WixFileTupleFields.PatchGroup]; | ||
141 | set => this.Set((int)WixFileTupleFields.PatchGroup, value); | ||
142 | } | ||
143 | |||
144 | public int Attributes | ||
145 | { | ||
146 | get => (int)this.Fields[(int)WixFileTupleFields.Attributes]; | ||
147 | set => this.Set((int)WixFileTupleFields.Attributes, value); | ||
148 | } | ||
149 | |||
150 | public PatchAttributeType? PatchAttributes | ||
151 | { | ||
152 | get => (PatchAttributeType?)this.Fields[(int)WixFileTupleFields.PatchAttributes].AsNullableNumber(); | ||
153 | set => this.Set((int)WixFileTupleFields.PatchAttributes, (int?)value); | ||
154 | } | ||
155 | |||
156 | public string DeltaPatchHeaderSource | ||
157 | { | ||
158 | get => (string)this.Fields[(int)WixFileTupleFields.DeltaPatchHeaderSource]; | ||
159 | set => this.Set((int)WixFileTupleFields.DeltaPatchHeaderSource, value); | ||
160 | } | ||
161 | } | ||
162 | } \ No newline at end of file | ||