Firewall Rule Equals func

This commit is contained in:
Tim Young 2018-03-16 16:19:36 -05:00
parent 0a189ec949
commit ae04d818be
1 changed files with 16 additions and 0 deletions

View File

@ -209,6 +209,14 @@ namespace EduNetworkBuilder
IPAddr = ip;
NicOnWhichItIsFound = thenic;
}
public bool Equals(ArpEntry toCompare)
{
if (MACAddress != toCompare.MACAddress) return false;
if (IPAddr != toCompare.IPAddr) return false;
if (!NicOnWhichItIsFound.Equals(toCompare.NicOnWhichItIsFound)) return false;
return true;
}
}
[Serializable]
@ -311,6 +319,14 @@ namespace EduNetworkBuilder
}
}
public bool Equals(FirewallRule toCompare)
{
if (Source != toCompare.Source) return false;
if (Destination != toCompare.Destination) return false;
if (Action != toCompare.Action) return false;
return true;
}
public void Save(XmlWriter writer, string tag)
{
writer.WriteStartElement(tag);