Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((NodeType != null ? NodeType.GetHashCode() : 0) * 397) ^ (NodeValue != null ? NodeValue.GetHashCode() : 0));
     }
 }
Esempio n. 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((NodeType != null ? NodeType.GetHashCode() : 0) * 397)
                ^ (Parts != null ? DictionaryEqualityComparer.GetHashCode(Parts) : 0));
     }
 }
        public override int GetHashCode()
        {
            int result = 17;

            result = 31 * result + nodeState.GetHashCode();
            result = 31 * result + coordinates.GetHashCode();
            result = 31 * result + GScore.GetHashCode();
            result = 31 * result + HScore.GetHashCode();
            return(result);
        }
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            var hc = NodeType.GetHashCode() ^ Name.GetHashCode();

            foreach (var arg in Arguments)
            {
                hc = (hc * 13) ^ arg.GetHashCode();
            }
            return(hc);
        }
Esempio n. 5
0
 public override int GetHashCode()
 {
     if (IsNode())
     {
         return(node.GetHashCode());
     }
     if (IsObj())
     {
         return(obj.GetHashCode());
     }
     return(0);
 }
Esempio n. 6
0
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + StartLine.GetHashCode();
         hash = hash * 23 + EndLine.GetHashCode();
         hash = hash * 23 + (Alias ?? string.Empty).GetHashCode();
         hash = hash * 23 + (Comment ?? string.Empty).GetHashCode();
         hash = hash * 23 + NodeType.GetHashCode();
         return(hash);
     }
 }
 public override int GetHashCode()
 {
     return(_type.GetHashCode()
            ^ _document.GetHashCode()
            ^ _itemBase.GetHashCode());
 }
Esempio n. 8
0
 int ComputeHashCode()
 {
     return(HashCode.Compute(
                NodeType.GetHashCode(),
                Regex.GetHashCode()));
 }
Esempio n. 9
0
 private int ComputeHashCode()
 {
     return(HashCode.Compute(NodeType.GetHashCode(), Value.GetHashCode()));
 }
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode() => NodeType.GetHashCode() ^ Literal.GetHashCode();
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode() => NodeType.GetHashCode() ^ Condition.GetHashCode() ^ (IfTrue.GetHashCode() * 13) ^ (IfFalse.GetHashCode() * 13 * 13);
Esempio n. 12
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode() => NodeType.GetHashCode() ^ Argument.GetHashCode();
Esempio n. 13
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode() => NodeType.GetHashCode() ^ Name.GetHashCode() ^ (PropertyName.GetHashCode() * 13);
Esempio n. 14
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode() => NodeType.GetHashCode() ^ Name.GetHashCode();
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode() => NodeType.GetHashCode() ^ Left.GetHashCode() ^ (Right.GetHashCode() * 13);