Example #1
0
        public static int hasheq(object o)
        {
            if (o == null)
            {
                return(0);
            }

            IHashEq ihe = o as IHashEq;

            if (ihe != null)
            {
                return(dohasheq(ihe));
            }

            if (Util.IsNumeric(o))
            {
                return(Numbers.hasheq(o));
            }

            String s = o as string;

            if (s != null)
            {
                return(Murmur3.HashString(s));
            }

            return(o.GetHashCode());
        }
Example #2
0
 public int hasheq()
 {
     if (_hasheq == 0)
     {
         _hasheq = Util.hashCombine(Murmur3.HashString(_name), Util.hasheq(_ns));
     }
     return(_hasheq);
 }