/// <summary> /// Visits the first <paramref name="hashCodeExpressionDepth"/> layers of the expression tree and calculates a hash code based on the <see cref="ExpressionType"/>s there. /// </summary> /// <param name="tree"></param> /// <param name="hashCodeExpressionDepth"></param> /// <returns></returns> public static int GetNodeTypeStructureHashCode(this Expression tree, bool ignoreConstantsValues = false, int?hashCodeExpressionDepth = null) { var visitor = new HashCodeVisitor(ignoreConstantsValues, hashCodeExpressionDepth); visitor.Visit(tree); return(visitor.ResultHash); }
public int GetHashCode(DbaseFieldValue instance) { var visitor = new HashCodeVisitor(); instance.Accept(visitor); return(instance.Field.GetHashCode() ^ visitor.HashCode); }
public bool GetHashCode(IDictionaryAdapter adapter, out int hashCode) { hashCode = new HashCodeVisitor().CalculateHashCode(adapter); return(true); }