示例#1
0
        public override int GetHashCode()
        {
            unchecked
            {
                const int HashingBase       = (int)2166136261;
                const int HashingMultiplier = 16777619;

                int hash = HashingBase;
                hash = (hash * HashingMultiplier) ^ Id.GetHashCode();
                hash = (hash * HashingMultiplier) ^ ((DateFrom != null) ? DateFrom.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^ ((DateTo != null) ? DateTo.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^ CustomerName.GetHashCode();
                hash = (hash * HashingMultiplier) ^ VehicleType.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Address.GetHashCode();
                hash = (hash * HashingMultiplier) ^ ProjectNo.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Distance.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Status.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Leader.GetHashCode();
                return(hash);
            }
        }
示例#2
0
        public override int GetHashCode()
        {
            unchecked
            {
                const int HashingBase       = (int)2166136261;
                const int HashingMultiplier = 16777619;

                int hash = HashingBase;
                hash = (hash * HashingMultiplier) ^ OrderNo.GetHashCode();
                hash = (hash * HashingMultiplier) ^ ((DateFrom != null) ? DateFrom.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^ ((DateTo != null) ? DateTo.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^ CustomerName.GetHashCode();
                hash = (hash * HashingMultiplier) ^ VehicleType.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Address.GetHashCode();
                hash = (hash * HashingMultiplier) ^ ProjectNo.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Imei.GetHashCode();
                hash = (hash * HashingMultiplier) ^ TrackerName.GetHashCode();
                hash = (hash * HashingMultiplier) ^ AddressLatitude.GetHashCode();
                hash = (hash * HashingMultiplier) ^ AddressLongitude.GetHashCode();
                return(hash);
            }
        }