aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-11-01 10:56:09 -0700
committerRob Mensching <rob@firegiant.com>2017-11-01 10:56:09 -0700
commit69b15d96cebdbb7201b1849b4f62786633d70b8d (patch)
tree4b65de8679e4b4ab81b69edcccbac1ae9f55a16d /src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs
parenta8656a87887d6cb2c54f4bbeacee37f7074f1032 (diff)
downloadwix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.gz
wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.bz2
wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.zip
Introduce WiX Intermediate Representation
Diffstat (limited to 'src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs')
-rw-r--r--src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs b/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs
new file mode 100644
index 00000000..39747be5
--- /dev/null
+++ b/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.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.Tuples;
8
9 public static partial class TupleDefinitions
10 {
11 public static readonly IntermediateTupleDefinition WixDeltaPatchSymbolPaths = new IntermediateTupleDefinition(
12 TupleDefinitionType.WixDeltaPatchSymbolPaths,
13 new[]
14 {
15 new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.Id), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.Type), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.SymbolPaths), IntermediateFieldType.String),
18 },
19 typeof(WixDeltaPatchSymbolPathsTuple));
20 }
21}
22
23namespace WixToolset.Data.Tuples
24{
25 public enum WixDeltaPatchSymbolPathsTupleFields
26 {
27 Id,
28 Type,
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 WixDeltaPatchSymbolPathsTuple : IntermediateTuple
46 {
47 public WixDeltaPatchSymbolPathsTuple() : base(TupleDefinitions.WixDeltaPatchSymbolPaths, null, null)
48 {
49 }
50
51 public WixDeltaPatchSymbolPathsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDeltaPatchSymbolPaths, sourceLineNumber, id)
52 {
53 }
54
55 public IntermediateField this[WixDeltaPatchSymbolPathsTupleFields index] => this.Fields[(int)index];
56
57 public string Id
58 {
59 get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.Id]?.Value;
60 set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.Id, value);
61 }
62
63 public SymbolPathType Type
64 {
65 get => (SymbolPathType)Enum.Parse(typeof(SymbolPathType), (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.Type]?.Value, true);
66 set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.Type, value.ToString());
67 }
68
69 public string SymbolPaths
70 {
71 get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.SymbolPaths]?.Value;
72 set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.SymbolPaths, value);
73 }
74 }
75} \ No newline at end of file