示例#1
0
        int IEqualityComparer <T> .GetHashCode(T obj)
        {
            WeakObject wobj = obj as WeakObject;

            if (wobj != null)
            {
                return(wobj.GetHashCode());
            }

            return((obj == null) ? 0 : ReferenceEqualityComparer <object> .Instance.GetHashCode(obj));
        }
示例#2
0
        int IEqualityComparer <T> .GetHashCode(T obj)
        {
            WeakObject wobj = obj as WeakObject;

            if (wobj != null)
            {
                return(wobj.GetHashCode());
            }

            return((obj == null) ? 0 : RuntimeHelpers.GetHashCode(obj));
        }
示例#3
0
        int IEqualityComparer <T> .GetHashCode(T obj)
        {
            WeakObject <T> wobj = obj as WeakObject <T>;

            if (wobj != null)
            {
                return(wobj.GetHashCode());
            }

            return((obj == null) ? 0 : obj.GetHashCode());
        }