diff options
Diffstat (limited to 'src/wixext/Tuples/WixDependencyTuple.cs')
-rw-r--r-- | src/wixext/Tuples/WixDependencyTuple.cs | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/wixext/Tuples/WixDependencyTuple.cs b/src/wixext/Tuples/WixDependencyTuple.cs new file mode 100644 index 00000000..81e05ad1 --- /dev/null +++ b/src/wixext/Tuples/WixDependencyTuple.cs | |||
@@ -0,0 +1,79 @@ | |||
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.Dependency | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Dependency.Tuples; | ||
7 | |||
8 | public static partial class DependencyTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition WixDependency = new IntermediateTupleDefinition( | ||
11 | DependencyTupleDefinitionType.WixDependency.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.WixDependency), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.ProviderKey), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MinVersion), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MaxVersion), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.Attributes), IntermediateFieldType.Number), | ||
19 | }, | ||
20 | typeof(WixDependencyTuple)); | ||
21 | } | ||
22 | } | ||
23 | |||
24 | namespace WixToolset.Dependency.Tuples | ||
25 | { | ||
26 | using WixToolset.Data; | ||
27 | |||
28 | public enum WixDependencyTupleFields | ||
29 | { | ||
30 | WixDependency, | ||
31 | ProviderKey, | ||
32 | MinVersion, | ||
33 | MaxVersion, | ||
34 | Attributes, | ||
35 | } | ||
36 | |||
37 | public class WixDependencyTuple : IntermediateTuple | ||
38 | { | ||
39 | public WixDependencyTuple() : base(DependencyTupleDefinitions.WixDependency, null, null) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public WixDependencyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependency, sourceLineNumber, id) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | public IntermediateField this[WixDependencyTupleFields index] => this.Fields[(int)index]; | ||
48 | |||
49 | public string WixDependency | ||
50 | { | ||
51 | get => this.Fields[(int)WixDependencyTupleFields.WixDependency].AsString(); | ||
52 | set => this.Set((int)WixDependencyTupleFields.WixDependency, value); | ||
53 | } | ||
54 | |||
55 | public string ProviderKey | ||
56 | { | ||
57 | get => this.Fields[(int)WixDependencyTupleFields.ProviderKey].AsString(); | ||
58 | set => this.Set((int)WixDependencyTupleFields.ProviderKey, value); | ||
59 | } | ||
60 | |||
61 | public string MinVersion | ||
62 | { | ||
63 | get => this.Fields[(int)WixDependencyTupleFields.MinVersion].AsString(); | ||
64 | set => this.Set((int)WixDependencyTupleFields.MinVersion, value); | ||
65 | } | ||
66 | |||
67 | public string MaxVersion | ||
68 | { | ||
69 | get => this.Fields[(int)WixDependencyTupleFields.MaxVersion].AsString(); | ||
70 | set => this.Set((int)WixDependencyTupleFields.MaxVersion, value); | ||
71 | } | ||
72 | |||
73 | public int Attributes | ||
74 | { | ||
75 | get => this.Fields[(int)WixDependencyTupleFields.Attributes].AsNumber(); | ||
76 | set => this.Set((int)WixDependencyTupleFields.Attributes, value); | ||
77 | } | ||
78 | } | ||
79 | } \ No newline at end of file | ||