コード例 #1
0
            public bool Equals(Expression <Func <TExpression, TValue> > x, Expression <Func <TExpression, TValue> > y)
            {
                string propertyPathX = ReflectionExtensions.BuildPropertyPath(x);
                string propertyPathY = ReflectionExtensions.BuildPropertyPath(y);

                return(propertyPathX == propertyPathY);
            }
コード例 #2
0
            public int GetHashCode(Expression <Func <TExpression, TValue> > obj)
            {
                string propertyPath = ReflectionExtensions.BuildPropertyPath(obj);

                if (propertyPath == null)
                {
                    return(-1);
                }
                return(propertyPath.GetHashCode());
            }