Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((LeftOperand != null ? LeftOperand.GetHashCode() : 0) * 397) ^ (RightOperand != null ? RightOperand.GetHashCode() : 0));
     }
 }
        public sealed override int GetHashCode()
        {
            var left  = LeftOperand.GetHashCode();
            var right = RightOperand.GetHashCode();

            return(GetHashCodeMinMaxOrdered(left, right, GetType().GetHashCode()));
        }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            var hash = 19;

            hash = hash * 31 + GetType().GetHashCode();
            hash = hash * 31 + LeftOperand.GetHashCode();
            hash = hash * 31 + RightOperand.GetHashCode();
            return(hash);
        }
Ejemplo n.º 4
0
        public override int GetHashCode()
        {
            const int Prime  = 31;
            int       result = 1;

            result = Prime * result + ((LeftOperand == null) ? 0 : LeftOperand.GetHashCode());
            result = Prime * result + ((RightOperand == null) ? 0 : RightOperand.GetHashCode());
            return(result);
        }
Ejemplo n.º 5
0
        public override int GetHashCode()
        {
            const int prime  = 31;
            int       result = 1;

            result = prime * result + (LeftOperand?.GetHashCode() ?? 0);
            result = prime * result + (RightOperand?.GetHashCode() ?? 0);
            return(result);
        }
Ejemplo n.º 6
0
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = 397;
         hashCode = (hashCode * 397) ^ (LeftOperand != null ? LeftOperand.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Operator != null ? Operator.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RightOperand != null ? RightOperand.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 7
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = LeftOperand.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Operator;
         hashCode = (hashCode * 397) ^ RightOperand.GetHashCode();
         return(hashCode);
     }
 }
        protected NotEqualsRelationship(SymbolicValue leftOperand, SymbolicValue rightOperand)
            : base(leftOperand, rightOperand)
        {
            this.hash = new Lazy <int>(() =>
            {
                var left  = LeftOperand.GetHashCode();
                var right = RightOperand.GetHashCode();

                return(EqualsRelationship.GetHashCodeMinMaxOrdered(left, right, GetType().GetHashCode()));
            });
        }
Ejemplo n.º 9
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (LeftOperand != null ? LeftOperand.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RightOperand != null ? RightOperand.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Operation != null ? Operation.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Type;
         return(hashCode);
     }
 }
Ejemplo n.º 10
0
 /// <summary>Serves as the default hash function.</summary>
 /// <returns>Type: <see cref="System.Int32" />
 /// A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     return(typeof(BinaryOperator).FullName.GetHashCode() ^ (LeftOperand != null ? LeftOperand.GetHashCode() : 0) ^ (RightOperand != null ? RightOperand.GetHashCode() : 0));
 }