public override int GetHashCode()
 {
     unchecked
     {
         return((Key1.GetHashCode() * 397) ^ Key2.GetHashCode());
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            var hashCode = -2131266610;

            hashCode = hashCode * -1521134295 + Key1.GetHashCode();
            hashCode = hashCode * -1521134295 + Key2.GetHashCode();
            hashCode = hashCode * -1521134295 + Key3.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = Key1.GetHashCode();
         result = (result * 397) ^ Key2.GetHashCode();
         result = (result * 397) ^ Value.GetHashCode();
         return(result);
     }
 }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Key1 != null ? Key1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Key2 != null ? Key2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ HasShiftModifier.GetHashCode();
         hashCode = (hashCode * 397) ^ HasCtrlModifier.GetHashCode();
         hashCode = (hashCode * 397) ^ HasAltModifier.GetHashCode();
         hashCode = (hashCode * 397) ^ IsEnabled.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 5
0
            /// <summary>
            /// 等待数据初始化完成
            /// </summary>
            public static void WaitSqlLoaded()
            {
                if (!isSqlLoaded)
                {
                    sqlTable /**/.WaitLoad();
                    isSqlLoaded = true;
                }
            }
        }
    }
} namespace AutoCSer.Example.OrmModel
{
    public partial class ComparablePrimaryKey
    {
        /// <summary>
        /// 关键字
        /// </summary>
        [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Auto)]
        public struct DataPrimaryKey : IEquatable <DataPrimaryKey>, IComparable <DataPrimaryKey>
        {
            /// <summary>
            /// 关键字 1
            /// </summary>
            public int Key1;
            /// <summary>
            /// 关键字 2
            /// </summary>
            public int Key2;
            /// <summary>
            /// 关键字比较
            /// </summary>
            /// <param name="other">关键字</param>
            /// <returns>是否相等</returns>
            public bool Equals(DataPrimaryKey other)
            {
                return(Key1 /**/.Equals(other.Key1) && Key2 /**/.Equals(other.Key2));
            }

            /// <summary>
            /// 哈希编码
            /// </summary>
            /// <returns></returns>
            public override int GetHashCode()
            {
                return(Key1.GetHashCode() ^ Key2 /**/.GetHashCode());
            }
Ejemplo n.º 6
0
 /// <summary>
 /// オブジェクトのハッシュ値を計算します。
 /// </summary>
 /// <returns>
 /// 計算されたハッシュ値です。
 /// </returns>
 public override int GetHashCode()
 {
     return(Key1.GetHashCode() ^ Key2.GetHashCode() ^ Key3.GetHashCode() ^ Key4.GetHashCode() ^ Key5.GetHashCode() ^ Key6.GetHashCode() ^ Key7.GetHashCode());
 }
Ejemplo n.º 7
0
 public override int GetHashCode()
 {
     return(firstKey.GetHashCode() + secondKey.GetHashCode());
 }
Ejemplo n.º 8
0
 /// <summary>
 /// オブジェクトのハッシュ値を計算します。
 /// </summary>
 /// <returns>
 /// 計算されたハッシュ値です。
 /// </returns>
 public override int GetHashCode()
 {
     return(Key1.GetHashCode() ^ Key2.GetHashCode());
 }