diff options
Diffstat (limited to 'src/ext/Firewall/wixext/FirewallErrors.cs')
-rw-r--r-- | src/ext/Firewall/wixext/FirewallErrors.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/ext/Firewall/wixext/FirewallErrors.cs b/src/ext/Firewall/wixext/FirewallErrors.cs new file mode 100644 index 00000000..b2dac782 --- /dev/null +++ b/src/ext/Firewall/wixext/FirewallErrors.cs | |||
@@ -0,0 +1,36 @@ | |||
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 System.Resources; | ||
6 | using WixToolset.Data; | ||
7 | |||
8 | public static class FirewallErrors | ||
9 | { | ||
10 | public static Message IllegalRemoteAddressWithScopeAttribute(SourceLineNumber sourceLineNumbers) | ||
11 | { | ||
12 | return Message(sourceLineNumbers, Ids.IllegalRemoteAddressWithScopeAttribute, "The RemoteAddress element cannot be specified because its parent FirewallException already specified the Scope attribute. To use RemoteAddress elements, omit the Scope attribute."); | ||
13 | } | ||
14 | |||
15 | public static Message NoExceptionSpecified(SourceLineNumber sourceLineNumbers) | ||
16 | { | ||
17 | return Message(sourceLineNumbers, Ids.NoExceptionSpecified, "The FirewallException element doesn't identify the target of the firewall exception. To create an application exception, nest the FirewallException element under a File element or provide a value for the File or Program attributes. To create a port exception, provide a value for the Port attribute."); | ||
18 | } | ||
19 | |||
20 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
21 | { | ||
22 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); | ||
23 | } | ||
24 | |||
25 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
26 | { | ||
27 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args); | ||
28 | } | ||
29 | |||
30 | public enum Ids | ||
31 | { | ||
32 | IllegalRemoteAddressWithScopeAttribute = 6401, | ||
33 | NoExceptionSpecified = 6403, | ||
34 | } | ||
35 | } | ||
36 | } | ||