summaryrefslogtreecommitdiff
path: root/src/ext/Firewall/wixext/FirewallErrors.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-05-04 22:46:07 -0700
committerRob Mensching <rob@firegiant.com>2021-05-04 22:46:07 -0700
commitba00d844a2e2716a6aa07df89dd9318608bd1909 (patch)
tree0738ebcbcea51a9e4736efbbc19c68d17202ecad /src/ext/Firewall/wixext/FirewallErrors.cs
parentbfabd9f718af70e59f24ac70046fa3141daf06e8 (diff)
downloadwix-ba00d844a2e2716a6aa07df89dd9318608bd1909.tar.gz
wix-ba00d844a2e2716a6aa07df89dd9318608bd1909.tar.bz2
wix-ba00d844a2e2716a6aa07df89dd9318608bd1909.zip
Move Firewall.wixext into ext
Diffstat (limited to 'src/ext/Firewall/wixext/FirewallErrors.cs')
-rw-r--r--src/ext/Firewall/wixext/FirewallErrors.cs36
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
3namespace 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}