diff --git a/EduNetworkBuilder/NetworkLink.cs b/EduNetworkBuilder/NetworkLink.cs index f0b1bbf..52b950b 100644 --- a/EduNetworkBuilder/NetworkLink.cs +++ b/EduNetworkBuilder/NetworkLink.cs @@ -87,6 +87,23 @@ namespace EduNetworkBuilder SrcNic = src; DstNic = dst; } + + public override bool Equals(NetworkComponent toCompare) + { + if (!(toCompare is NetworkLink)) return false; //comparing a link to a device + NetworkLink CompareLink = (NetworkLink)toCompare; + if (!SrcNic.Equals(CompareLink.SrcNic)) return false; + if (!DstNic.Equals(CompareLink.DstNic)) return false; + if (theLinkType != CompareLink.theLinkType) return false; + if (isInvisible != CompareLink.isInvisible) return false; + if (IsDirty != CompareLink.IsDirty) return false; + if (UniqueIdentifier != CompareLink.UniqueIdentifier) return false; + if (hostname != CompareLink.hostname) return false; + if (isInvisible != CompareLink.isInvisible) return false; + + return true; + } + public override void Load(XmlNode theNode) { foreach (XmlNode Individual in theNode.ChildNodes)