コード例 #1
0
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + FromType.GetHashCode();
         hash = hash * 23 + ToType.GetHashCode();
         return(hash);
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (FromType != null)
            {
                hashCode ^= FromType.GetHashCode();
            }
            if (EdgeInfo != null)
            {
                hashCode ^= EdgeInfo.GetHashCode();
            }

            return(hashCode);
        }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ StartDate.GetHashCode();
         hashCode = (hashCode * 397) ^ EndDate.GetHashCode();
         hashCode = (hashCode * 397) ^ FromType.GetHashCode();
         hashCode = (hashCode * 397) ^ ToType.GetHashCode();
         hashCode = (hashCode * 397) ^ (FromValue != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(FromValue) : 0);
         hashCode = (hashCode * 397) ^ (ToValue != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(ToValue) : 0);
         hashCode = (hashCode * 397) ^ (TimeAndDows != null ? TimeAndDows.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #4
0
ファイル: SquareMessage.cs プロジェクト: shesheshe/linethrift
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.message)
            {
                hashcode = (hashcode * 397) + Message.GetHashCode();
            }
            if (__isset.fromType)
            {
                hashcode = (hashcode * 397) + FromType.GetHashCode();
            }
            if (__isset.squareMessageRevision)
            {
                hashcode = (hashcode * 397) + SquareMessageRevision.GetHashCode();
            }
        }
        return(hashcode);
    }
コード例 #5
0
 public override int GetHashCode()
 {
     return
         ((FromType.GetHashCode() * 17) +
          ToType.GetHashCode());
 }