Network card "Equals" function (started)

This commit is contained in:
Tim Young 2018-03-16 14:17:57 -05:00
parent 40ee554e95
commit ff81afba45

View File

@ -98,6 +98,25 @@ namespace EduNetworkBuilder
SetIPForDHCP();
}
public bool Equals(NetworkCard compareWith)
{
if (MAC != compareWith.MAC) return false;
//List<NetworkInterface> interfaces = new List<NetworkInterface>();
if (UsesDHCP != compareWith.UsesDHCP) return false;
if (CanUseDHCP != compareWith.CanUseDHCP) return false;
if (MustUseDHCP != compareWith.MustUseDHCP) return false;
if (myNicType != compareWith.myNicType) return false;
if (myID.HostID != compareWith.myID.HostID) return false;
if (ConnectedLink != compareWith.ConnectedLink) return false;
if (UniqueIdentifier != compareWith.UniqueIdentifier) return false;
if (_nic_name != compareWith._nic_name) return false;
if (TunnelEndpoint != compareWith.TunnelEndpoint) return false;
if (EncryptionKey != compareWith.EncryptionKey) return false;
if (SSID != compareWith.SSID) return false;
return true;
}
private void ApplyNicRules()
{
//These are the defaults for the various nic types. They can be overridden by the device.