diff options
Diffstat (limited to 'src/ext/Firewall/wixext/Symbols/WixFirewallExceptionSymbol.cs')
-rw-r--r-- | src/ext/Firewall/wixext/Symbols/WixFirewallExceptionSymbol.cs | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/src/ext/Firewall/wixext/Symbols/WixFirewallExceptionSymbol.cs b/src/ext/Firewall/wixext/Symbols/WixFirewallExceptionSymbol.cs new file mode 100644 index 00000000..620de969 --- /dev/null +++ b/src/ext/Firewall/wixext/Symbols/WixFirewallExceptionSymbol.cs | |||
@@ -0,0 +1,119 @@ | |||
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 | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Firewall.Symbols; | ||
7 | |||
8 | public static partial class FirewallSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixFirewallException = new IntermediateSymbolDefinition( | ||
11 | FirewallSymbolDefinitionType.WixFirewallException.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Name), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.RemoteAddresses), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Port), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Protocol), IntermediateFieldType.Number), | ||
18 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Program), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Attributes), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Profile), IntermediateFieldType.Number), | ||
21 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
22 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Description), IntermediateFieldType.String), | ||
23 | new IntermediateFieldDefinition(nameof(WixFirewallExceptionSymbolFields.Direction), IntermediateFieldType.Number), | ||
24 | }, | ||
25 | typeof(WixFirewallExceptionSymbol)); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | namespace WixToolset.Firewall.Symbols | ||
30 | { | ||
31 | using WixToolset.Data; | ||
32 | |||
33 | public enum WixFirewallExceptionSymbolFields | ||
34 | { | ||
35 | Name, | ||
36 | RemoteAddresses, | ||
37 | Port, | ||
38 | Protocol, | ||
39 | Program, | ||
40 | Attributes, | ||
41 | Profile, | ||
42 | ComponentRef, | ||
43 | Description, | ||
44 | Direction, | ||
45 | } | ||
46 | |||
47 | public class WixFirewallExceptionSymbol : IntermediateSymbol | ||
48 | { | ||
49 | public WixFirewallExceptionSymbol() : base(FirewallSymbolDefinitions.WixFirewallException, null, null) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | public WixFirewallExceptionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(FirewallSymbolDefinitions.WixFirewallException, sourceLineNumber, id) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | public IntermediateField this[WixFirewallExceptionSymbolFields index] => this.Fields[(int)index]; | ||
58 | |||
59 | public string Name | ||
60 | { | ||
61 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Name].AsString(); | ||
62 | set => this.Set((int)WixFirewallExceptionSymbolFields.Name, value); | ||
63 | } | ||
64 | |||
65 | public string RemoteAddresses | ||
66 | { | ||
67 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.RemoteAddresses].AsString(); | ||
68 | set => this.Set((int)WixFirewallExceptionSymbolFields.RemoteAddresses, value); | ||
69 | } | ||
70 | |||
71 | public string Port | ||
72 | { | ||
73 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Port].AsString(); | ||
74 | set => this.Set((int)WixFirewallExceptionSymbolFields.Port, value); | ||
75 | } | ||
76 | |||
77 | public int? Protocol | ||
78 | { | ||
79 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Protocol].AsNullableNumber(); | ||
80 | set => this.Set((int)WixFirewallExceptionSymbolFields.Protocol, value); | ||
81 | } | ||
82 | |||
83 | public string Program | ||
84 | { | ||
85 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Program].AsString(); | ||
86 | set => this.Set((int)WixFirewallExceptionSymbolFields.Program, value); | ||
87 | } | ||
88 | |||
89 | public int Attributes | ||
90 | { | ||
91 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Attributes].AsNumber(); | ||
92 | set => this.Set((int)WixFirewallExceptionSymbolFields.Attributes, value); | ||
93 | } | ||
94 | |||
95 | public int Profile | ||
96 | { | ||
97 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Profile].AsNumber(); | ||
98 | set => this.Set((int)WixFirewallExceptionSymbolFields.Profile, value); | ||
99 | } | ||
100 | |||
101 | public string ComponentRef | ||
102 | { | ||
103 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.ComponentRef].AsString(); | ||
104 | set => this.Set((int)WixFirewallExceptionSymbolFields.ComponentRef, value); | ||
105 | } | ||
106 | |||
107 | public string Description | ||
108 | { | ||
109 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Description].AsString(); | ||
110 | set => this.Set((int)WixFirewallExceptionSymbolFields.Description, value); | ||
111 | } | ||
112 | |||
113 | public int Direction | ||
114 | { | ||
115 | get => this.Fields[(int)WixFirewallExceptionSymbolFields.Direction].AsNumber(); | ||
116 | set => this.Set((int)WixFirewallExceptionSymbolFields.Direction, value); | ||
117 | } | ||
118 | } | ||
119 | } \ No newline at end of file | ||