aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs')
-rw-r--r--src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs b/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs
new file mode 100644
index 00000000..6e50d07f
--- /dev/null
+++ b/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs
@@ -0,0 +1,75 @@
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
3using System;
4
5namespace WixToolset.Data
6{
7 using WixToolset.Data.Symbols;
8
9 public static partial class SymbolDefinitions
10 {
11 public static readonly IntermediateSymbolDefinition WixDeltaPatchSymbolPaths = new IntermediateSymbolDefinition(
12 SymbolDefinitionType.WixDeltaPatchSymbolPaths,
13 new[]
14 {
15 new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsSymbolFields.SymbolType), IntermediateFieldType.Number),
16 new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsSymbolFields.SymbolId), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsSymbolFields.SymbolPaths), IntermediateFieldType.String),
18 },
19 typeof(WixDeltaPatchSymbolPathsSymbol));
20 }
21}
22
23namespace WixToolset.Data.Symbols
24{
25 public enum WixDeltaPatchSymbolPathsSymbolFields
26 {
27 SymbolType,
28 SymbolId,
29 SymbolPaths,
30 }
31
32 /// <summary>
33 /// The types that the WixDeltaPatchSymbolPaths table can hold.
34 /// </summary>
35 /// <remarks>The order of these values is important since WixDeltaPatchSymbolPaths are sorted by this type.</remarks>
36 public enum SymbolPathType
37 {
38 File,
39 Component,
40 Directory,
41 Media,
42 Product
43 };
44
45 public class WixDeltaPatchSymbolPathsSymbol : IntermediateSymbol
46 {
47 public WixDeltaPatchSymbolPathsSymbol() : base(SymbolDefinitions.WixDeltaPatchSymbolPaths, null, null)
48 {
49 }
50
51 public WixDeltaPatchSymbolPathsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixDeltaPatchSymbolPaths, sourceLineNumber, id)
52 {
53 }
54
55 public IntermediateField this[WixDeltaPatchSymbolPathsSymbolFields index] => this.Fields[(int)index];
56
57 public SymbolPathType SymbolType
58 {
59 get => (SymbolPathType)this.Fields[(int)WixDeltaPatchSymbolPathsSymbolFields.SymbolType].AsNumber();
60 set => this.Set((int)WixDeltaPatchSymbolPathsSymbolFields.SymbolType, (int)value);
61 }
62
63 public string SymbolId
64 {
65 get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsSymbolFields.SymbolId];
66 set => this.Set((int)WixDeltaPatchSymbolPathsSymbolFields.SymbolId, value);
67 }
68
69 public string SymbolPaths
70 {
71 get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsSymbolFields.SymbolPaths];
72 set => this.Set((int)WixDeltaPatchSymbolPathsSymbolFields.SymbolPaths, value);
73 }
74 }
75} \ No newline at end of file