コード例 #1
0
ファイル: Util.cs プロジェクト: rpete4130/clojure-clr
        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.HashInt(s.GetHashCode()));
            }

            return(o.GetHashCode());
        }
コード例 #2
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));
            }

            return(o.GetHashCode());
        }
コード例 #3
0
ファイル: Util.cs プロジェクト: chrisortman/clojure-clr
 private static int dohasheq(IHashEq ihe)
 {
     return ihe.hasheq();
 }
コード例 #4
0
ファイル: Util.cs プロジェクト: rpete4130/clojure-clr
 private static int dohasheq(IHashEq ihe)
 {
     return(ihe.hasheq());
 }