示例#1
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = TrackerId;
         hashCode = (hashCode * 397) ^ (TrackerName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Position?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Speed?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Orientation?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Acceleration?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (TargetPosition?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Validity.GetHashCode();
         return(hashCode);
     }
 }
示例#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);
            }
        }