示例#1
0
        public override int GetHashCode()
        {
            var guid = ChildNode.GetOptionalStringAttribute("guid", string.Empty);

            return((guid == string.Empty)
                                ? base.GetHashCode()
                                : guid.ToLowerInvariant().GetHashCode());
        }
示例#2
0
        public override bool Equals(object obj)
        {
            var otherReport = obj as XmlTextAddedReport;

            if (otherReport == null)
            {
                return(false);
            }

            var guid      = ChildNode.GetOptionalStringAttribute("guid", string.Empty);
            var otherGuid = otherReport.ChildNode.GetOptionalStringAttribute("guid", string.Empty);

            if (guid == string.Empty || otherGuid == string.Empty)
            {
                return(base.Equals(obj));
            }

            return(String.Equals(guid, otherGuid, StringComparison.OrdinalIgnoreCase));
        }