diff --git a/EduNetworkBuilder/NetworkCard.cs b/EduNetworkBuilder/NetworkCard.cs index b76b690..a50c60c 100644 --- a/EduNetworkBuilder/NetworkCard.cs +++ b/EduNetworkBuilder/NetworkCard.cs @@ -98,6 +98,25 @@ namespace EduNetworkBuilder SetIPForDHCP(); } + public bool Equals(NetworkCard compareWith) + { + if (MAC != compareWith.MAC) return false; + + //List interfaces = new List(); + 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.