public bool Equals(JiraAttachment other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.Id == Id && Equals(other.Name, Name) && other.Created.Equals(Created) && Equals(other.Author, Author) && other.Size == Size); }
private void getAttachments(XPathNavigator nav) { XPathExpression expr = nav.Compile("attachment"); XPathNodeIterator it = nav.Select(expr); if (!nav.MoveToFirstChild()) { return; } while (it.MoveNext()) { JiraAttachment a = new JiraAttachment( int.Parse(XPathUtils.getAttributeSafely(it.Current, "id", "0")), XPathUtils.getAttributeSafely(it.Current, "name", "none"), JiraIssueUtils.getDateTimeFromJiraTimeString(XPathUtils.getAttributeSafely(it.Current, "created", "none")), XPathUtils.getAttributeSafely(it.Current, "author", "none"), int.Parse(XPathUtils.getAttributeSafely(it.Current, "size", "0"))); attachments.Add(a); } nav.MoveToParent(); }