aboutsummaryrefslogtreecommitdiff
path: root/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs
diff options
context:
space:
mode:
authorchris_bednarski <Chris.Bednarski@minfos.com.au>2023-08-20 19:49:21 +1000
committerBob Arnson <github@bobs.org>2023-08-23 23:11:39 -0400
commit537e79d3c8b99e1576db48b19c8071c0922342f2 (patch)
treea3a21f66c55edf08def75bfa2c05c297886ad18b /src/test/burn/WixTestTools/Firewall/UniqueCheck.cs
parentfebb9c943d6c6c0db3a660de6f96b7d9f5941b1a (diff)
downloadwix-537e79d3c8b99e1576db48b19c8071c0922342f2.tar.gz
wix-537e79d3c8b99e1576db48b19c8071c0922342f2.tar.bz2
wix-537e79d3c8b99e1576db48b19c8071c0922342f2.zip
use WcaGetRecordFormattedString to get firewall rule description
Diffstat (limited to 'src/test/burn/WixTestTools/Firewall/UniqueCheck.cs')
-rw-r--r--src/test/burn/WixTestTools/Firewall/UniqueCheck.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs b/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs
index 83a1e57a..598350f9 100644
--- a/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs
+++ b/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs
@@ -6,7 +6,7 @@ namespace WixTestTools.Firewall
6 6
7 /// <summary> 7 /// <summary>
8 /// A lot of firewall rules don't follow the Microsoft recommendation of using unique names.<br/> 8 /// A lot of firewall rules don't follow the Microsoft recommendation of using unique names.<br/>
9 /// This class helps to disambiguate the rules based on Name, Direction, Profile, Protocol, ApplicationName and the LocalUserOwner. 9 /// This class helps to disambiguate the rules based on Name, Direction, Profile, Protocol, ApplicationName, LocalUserOwner and RemoteAddresses.
10 /// </summary> 10 /// </summary>
11 public class UniqueCheck 11 public class UniqueCheck
12 { 12 {
@@ -22,6 +22,7 @@ namespace WixTestTools.Firewall
22 this.Protocol = details.Protocol; 22 this.Protocol = details.Protocol;
23 this.ApplicationName = details.ApplicationName; 23 this.ApplicationName = details.ApplicationName;
24 this.LocalUserOwner = details.LocalUserOwner; 24 this.LocalUserOwner = details.LocalUserOwner;
25 this.RemoteAddresses = details.RemoteAddresses;
25 } 26 }
26 27
27 28
@@ -37,6 +38,7 @@ namespace WixTestTools.Firewall
37 38
38 public string LocalUserOwner { get; set; } 39 public string LocalUserOwner { get; set; }
39 40
41 public string RemoteAddresses { get; set; }
40 42
41 public bool FirewallRuleIsUnique(INetFwRule3 rule) 43 public bool FirewallRuleIsUnique(INetFwRule3 rule)
42 { 44 {
@@ -70,6 +72,11 @@ namespace WixTestTools.Firewall
70 return false; 72 return false;
71 } 73 }
72 74
75 if (this.RemoteAddresses != null && rule.RemoteAddresses != this.RemoteAddresses)
76 {
77 return false;
78 }
79
73 return true; 80 return true;
74 } 81 }
75 } 82 }