Example #1
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = 0;
#if NETSTANDARD2_0
                if (NamespaceURI != null)
                {
                    hashCode = NamespaceURI.GetHashCode();
                }
                if (LocalName != null)
                {
                    hashCode = (hashCode * 397) ^ LocalName.GetHashCode();
                }
#else
                if (NamespaceURI != null)
                {
                    hashCode = NamespaceURI.GetHashCode(StringComparison.Ordinal);
                }
                if (LocalName != null)
                {
                    hashCode = (hashCode * 397) ^ LocalName.GetHashCode(StringComparison.Ordinal);
                }
#endif
                return(hashCode);
            }
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = 0;
         if (NamespaceURI != null)
         {
             hashCode = NamespaceURI.GetHashCode();
         }
         if (LocalName != null)
         {
             hashCode = (hashCode * 397) ^ LocalName.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #3
0
 public override int GetHashCode()
 {
     return((NamespaceURI?.GetHashCode() ?? 0) + (LocalName?.GetHashCode() ?? 0));
 }