diff options
author | Rob Mensching <rob@firegiant.com> | 2018-01-01 10:30:42 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2018-01-01 22:47:02 -0800 |
commit | 60d7baefb4e87bf0ddaae58a653faee0be0429f6 (patch) | |
tree | e520865fd6da2368c5d33a4c98cca457bd8a8343 /src/wixext/Tuples | |
parent | 9c66865ab3e4b3c4cbcb721e22fd668dd4350afa (diff) | |
download | wix-60d7baefb4e87bf0ddaae58a653faee0be0429f6.tar.gz wix-60d7baefb4e87bf0ddaae58a653faee0be0429f6.tar.bz2 wix-60d7baefb4e87bf0ddaae58a653faee0be0429f6.zip |
Initial code commit
Diffstat (limited to 'src/wixext/Tuples')
-rw-r--r-- | src/wixext/Tuples/NetFxNativeImageTuple.cs | 65 | ||||
-rw-r--r-- | src/wixext/Tuples/NetfxTupleDefinitions.cs | 27 |
2 files changed, 92 insertions, 0 deletions
diff --git a/src/wixext/Tuples/NetFxNativeImageTuple.cs b/src/wixext/Tuples/NetFxNativeImageTuple.cs new file mode 100644 index 00000000..af507137 --- /dev/null +++ b/src/wixext/Tuples/NetFxNativeImageTuple.cs | |||
@@ -0,0 +1,65 @@ | |||
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.Netfx.Tuples | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | |||
7 | public enum NetFxNativeImageTupleFields | ||
8 | { | ||
9 | NetFxNativeImage, | ||
10 | File_, | ||
11 | Priority, | ||
12 | Attributes, | ||
13 | File_Application, | ||
14 | Directory_ApplicationBase, | ||
15 | } | ||
16 | |||
17 | public class NetFxNativeImageTuple : IntermediateTuple | ||
18 | { | ||
19 | public NetFxNativeImageTuple() : base(NetfxTupleDefinitions.NetFxNativeImage, null, null) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | public NetFxNativeImageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxTupleDefinitions.NetFxNativeImage, sourceLineNumber, id) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index]; | ||
28 | |||
29 | public string NetFxNativeImage | ||
30 | { | ||
31 | get => this.Fields[(int)NetFxNativeImageTupleFields.NetFxNativeImage].AsString(); | ||
32 | set => this.Set((int)NetFxNativeImageTupleFields.NetFxNativeImage, value); | ||
33 | } | ||
34 | |||
35 | public string File_ | ||
36 | { | ||
37 | get => this.Fields[(int)NetFxNativeImageTupleFields.File_].AsString(); | ||
38 | set => this.Set((int)NetFxNativeImageTupleFields.File_, value); | ||
39 | } | ||
40 | |||
41 | public int Priority | ||
42 | { | ||
43 | get => this.Fields[(int)NetFxNativeImageTupleFields.Priority].AsNumber(); | ||
44 | set => this.Set((int)NetFxNativeImageTupleFields.Priority, value); | ||
45 | } | ||
46 | |||
47 | public int Attributes | ||
48 | { | ||
49 | get => this.Fields[(int)NetFxNativeImageTupleFields.Attributes].AsNumber(); | ||
50 | set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value); | ||
51 | } | ||
52 | |||
53 | public string File_Application | ||
54 | { | ||
55 | get => this.Fields[(int)NetFxNativeImageTupleFields.File_Application].AsString(); | ||
56 | set => this.Set((int)NetFxNativeImageTupleFields.File_Application, value); | ||
57 | } | ||
58 | |||
59 | public string Directory_ApplicationBase | ||
60 | { | ||
61 | get => this.Fields[(int)NetFxNativeImageTupleFields.Directory_ApplicationBase].AsString(); | ||
62 | set => this.Set((int)NetFxNativeImageTupleFields.Directory_ApplicationBase, value); | ||
63 | } | ||
64 | } | ||
65 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/NetfxTupleDefinitions.cs b/src/wixext/Tuples/NetfxTupleDefinitions.cs new file mode 100644 index 00000000..aa584b38 --- /dev/null +++ b/src/wixext/Tuples/NetfxTupleDefinitions.cs | |||
@@ -0,0 +1,27 @@ | |||
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.Netfx.Tuples | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | |||
7 | public static class NetfxTupleDefinitionNames | ||
8 | { | ||
9 | public static string NetFxNativeImage { get; } = "NetFxNativeImage"; | ||
10 | } | ||
11 | |||
12 | public static class NetfxTupleDefinitions | ||
13 | { | ||
14 | public static readonly IntermediateTupleDefinition NetFxNativeImage = new IntermediateTupleDefinition( | ||
15 | NetfxTupleDefinitionNames.NetFxNativeImage, | ||
16 | new[] | ||
17 | { | ||
18 | new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.NetFxNativeImage), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number), | ||
21 | new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number), | ||
22 | new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_Application), IntermediateFieldType.String), | ||
23 | new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Directory_ApplicationBase), IntermediateFieldType.String), | ||
24 | }, | ||
25 | typeof(NetFxNativeImageTuple)); | ||
26 | } | ||
27 | } | ||