public bool Equals(IssueLinkType other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.Id == Id && Equals(other.Name, Name) && Equals(other.OutwardLinksName, OutwardLinksName) && Equals(other.InwardLinksName, InwardLinksName) && PlvsUtils.compareLists(other.OutwardLinks, OutwardLinks) && PlvsUtils.compareLists(other.InwardLinks, InwardLinks)); }
private void getIssueLinks(XPathNavigator nav) { XPathExpression expr = nav.Compile("issuelinktype"); XPathNodeIterator it = nav.Select(expr); if (!nav.MoveToFirstChild()) { return; } while (it.MoveNext()) { int id = XPathUtils.getAttributeSafely(it.Current, "id", 0); string linkTypeName = null; string outwardLinksName = null; string inwardLinksName = null; List <JiraNamedEntity> outwardIdsAndKeys = null; List <JiraNamedEntity> inwardIdsAndKeys = null; if (it.Current.MoveToFirstChild()) { do { switch (it.Current.Name) { case "name": linkTypeName = it.Current.Value; break; case "outwardlinks": outwardLinksName = XPathUtils.getAttributeSafely(it.Current, "description", null); outwardIdsAndKeys = getLinks(it.Current); break; case "inwardlinks": inwardLinksName = XPathUtils.getAttributeSafely(it.Current, "description", null); inwardIdsAndKeys = getLinks(it.Current); break; } } while (it.Current.MoveToNext()); if (id == 0 || linkTypeName == null) { continue; } IssueLinkType ilt = new IssueLinkType(id, linkTypeName, outwardLinksName, inwardLinksName); if (outwardIdsAndKeys != null) { foreach (JiraNamedEntity entity in outwardIdsAndKeys) { ilt.OutwardLinks.Add(entity.Name); } } if (inwardIdsAndKeys != null) { foreach (JiraNamedEntity entity in inwardIdsAndKeys) { ilt.InwardLinks.Add(entity.Name); } } issueLinks.Add(ilt); } it.Current.MoveToParent(); } nav.MoveToParent(); }