diff options
author | Rob Mensching <rob@firegiant.com> | 2018-01-02 23:14:58 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2018-01-02 23:14:58 -0800 |
commit | 97b80191048b23f2e870c9d6a27e368ebaaf594d (patch) | |
tree | abe72531843285feb9f6e4502b5896a165219e3e /src/wixext/Tuples | |
parent | 3fbfb758d90a52c54fc75669d9029badcbeaf251 (diff) | |
download | wix-97b80191048b23f2e870c9d6a27e368ebaaf594d.tar.gz wix-97b80191048b23f2e870c9d6a27e368ebaaf594d.tar.bz2 wix-97b80191048b23f2e870c9d6a27e368ebaaf594d.zip |
Initial code commit
Diffstat (limited to 'src/wixext/Tuples')
-rw-r--r-- | src/wixext/Tuples/FirewallTupleDefinitions.cs | 31 | ||||
-rw-r--r-- | src/wixext/Tuples/WixFirewallExceptionTuple.cs | 93 |
2 files changed, 124 insertions, 0 deletions
diff --git a/src/wixext/Tuples/FirewallTupleDefinitions.cs b/src/wixext/Tuples/FirewallTupleDefinitions.cs new file mode 100644 index 00000000..79fc28cf --- /dev/null +++ b/src/wixext/Tuples/FirewallTupleDefinitions.cs | |||
@@ -0,0 +1,31 @@ | |||
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.Firewall.Tuples | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | |||
7 | public static class FirewallTupleDefinitionNames | ||
8 | { | ||
9 | public static string WixFirewallException { get; } = "WixFirewallException"; | ||
10 | } | ||
11 | |||
12 | public static partial class FirewallTupleDefinitions | ||
13 | { | ||
14 | public static readonly IntermediateTupleDefinition WixFirewallException = new IntermediateTupleDefinition( | ||
15 | FirewallTupleDefinitionNames.WixFirewallException, | ||
16 | new[] | ||
17 | { | ||
18 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.WixFirewallException), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Name), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.RemoteAddresses), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Port), IntermediateFieldType.String), | ||
22 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Protocol), IntermediateFieldType.Number), | ||
23 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Program), IntermediateFieldType.String), | ||
24 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Attributes), IntermediateFieldType.Number), | ||
25 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Profile), IntermediateFieldType.Number), | ||
26 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Component_), IntermediateFieldType.String), | ||
27 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionTupleFields.Description), IntermediateFieldType.String), | ||
28 | }, | ||
29 | typeof(WixFirewallExceptionTuple)); | ||
30 | } | ||
31 | } | ||
diff --git a/src/wixext/Tuples/WixFirewallExceptionTuple.cs b/src/wixext/Tuples/WixFirewallExceptionTuple.cs new file mode 100644 index 00000000..715a4b9b --- /dev/null +++ b/src/wixext/Tuples/WixFirewallExceptionTuple.cs | |||
@@ -0,0 +1,93 @@ | |||
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.Firewall.Tuples | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | |||
7 | public enum WixFirewallExceptionTupleFields | ||
8 | { | ||
9 | WixFirewallException, | ||
10 | Name, | ||
11 | RemoteAddresses, | ||
12 | Port, | ||
13 | Protocol, | ||
14 | Program, | ||
15 | Attributes, | ||
16 | Profile, | ||
17 | Component_, | ||
18 | Description, | ||
19 | } | ||
20 | |||
21 | public class WixFirewallExceptionTuple : IntermediateTuple | ||
22 | { | ||
23 | public WixFirewallExceptionTuple() : base(FirewallTupleDefinitions.WixFirewallException, null, null) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | public WixFirewallExceptionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(FirewallTupleDefinitions.WixFirewallException, sourceLineNumber, id) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | public IntermediateField this[WixFirewallExceptionTupleFields index] => this.Fields[(int)index]; | ||
32 | |||
33 | public string WixFirewallException | ||
34 | { | ||
35 | get => this.Fields[(int)WixFirewallExceptionTupleFields.WixFirewallException].AsString(); | ||
36 | set => this.Set((int)WixFirewallExceptionTupleFields.WixFirewallException, value); | ||
37 | } | ||
38 | |||
39 | public string Name | ||
40 | { | ||
41 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Name].AsString(); | ||
42 | set => this.Set((int)WixFirewallExceptionTupleFields.Name, value); | ||
43 | } | ||
44 | |||
45 | public string RemoteAddresses | ||
46 | { | ||
47 | get => this.Fields[(int)WixFirewallExceptionTupleFields.RemoteAddresses].AsString(); | ||
48 | set => this.Set((int)WixFirewallExceptionTupleFields.RemoteAddresses, value); | ||
49 | } | ||
50 | |||
51 | public string Port | ||
52 | { | ||
53 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Port].AsString(); | ||
54 | set => this.Set((int)WixFirewallExceptionTupleFields.Port, value); | ||
55 | } | ||
56 | |||
57 | public int Protocol | ||
58 | { | ||
59 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Protocol].AsNumber(); | ||
60 | set => this.Set((int)WixFirewallExceptionTupleFields.Protocol, value); | ||
61 | } | ||
62 | |||
63 | public string Program | ||
64 | { | ||
65 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Program].AsString(); | ||
66 | set => this.Set((int)WixFirewallExceptionTupleFields.Program, value); | ||
67 | } | ||
68 | |||
69 | public int Attributes | ||
70 | { | ||
71 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Attributes].AsNumber(); | ||
72 | set => this.Set((int)WixFirewallExceptionTupleFields.Attributes, value); | ||
73 | } | ||
74 | |||
75 | public int Profile | ||
76 | { | ||
77 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Profile].AsNumber(); | ||
78 | set => this.Set((int)WixFirewallExceptionTupleFields.Profile, value); | ||
79 | } | ||
80 | |||
81 | public string Component_ | ||
82 | { | ||
83 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Component_].AsString(); | ||
84 | set => this.Set((int)WixFirewallExceptionTupleFields.Component_, value); | ||
85 | } | ||
86 | |||
87 | public string Description | ||
88 | { | ||
89 | get => this.Fields[(int)WixFirewallExceptionTupleFields.Description].AsString(); | ||
90 | set => this.Set((int)WixFirewallExceptionTupleFields.Description, value); | ||
91 | } | ||
92 | } | ||
93 | } \ No newline at end of file | ||