示例#1
0
        public override int GetHashCode()
        {
            var aSChd = ShardKey <TRecord> .GetValueBytes(this._greatGrandChildId);

            var aResult = new byte[4];

            if (!(aSChd is null))
            {
                if (aSChd.Length > 0)
                {
                    aResult[0] = aSChd[0];
                }
                if (aSChd.Length > 1)
                {
                    aResult[1] = aSChd[1];
                }
                if (aSChd.Length > 2)
                {
                    aResult[2] = aSChd[2];
                }
                if (aSChd.Length > 3)
                {
                    aResult[3] = aSChd[3];
                }
            }

            return(_key.GetHashCode() | BitConverter.ToInt32(aResult, 0));
        }