Exemple #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (PrepTime != null)
         {
             hashCode = hashCode * 59 + PrepTime.GetHashCode();
         }
         if (TotalTime != null)
         {
             hashCode = hashCode * 59 + TotalTime.GetHashCode();
         }
         if (Servings != null)
         {
             hashCode = hashCode * 59 + Servings.GetHashCode();
         }
         if (ServingSize != null)
         {
             hashCode = hashCode * 59 + ServingSize.GetHashCode();
         }
         return(hashCode);
     }
 }
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TotalTime?.GetHashCode() ?? 0);
            return(hashCode);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + TitleUnicode.GetHashCode();
         hash = hash * 23 + TitleRoman.GetHashCode();
         hash = hash * 23 + ArtistUnicode.GetHashCode();
         hash = hash * 23 + ArtistRoman.GetHashCode();
         hash = hash * 23 + Creator.GetHashCode();
         hash = hash * 23 + DiffName.GetHashCode();
         hash = hash * 23 + Mp3Name.GetHashCode();
         hash = hash * 23 + Md5.GetHashCode();
         hash = hash * 23 + OsuFileName.GetHashCode();
         hash = hash * 23 + Tags.GetHashCode();
         hash = hash * 23 + Somestuff.GetHashCode();
         hash = hash * 23 + _state.GetHashCode();
         hash = hash * 23 + Circles.GetHashCode();
         hash = hash * 23 + Sliders.GetHashCode();
         hash = hash * 23 + Spinners.GetHashCode();
         hash = hash * 23 + EditDate.GetHashCode();
         hash = hash * 23 + ApproachRate.GetHashCode();
         hash = hash * 23 + CircleSize.GetHashCode();
         hash = hash * 23 + HpDrainRate.GetHashCode();
         hash = hash * 23 + OverallDifficulty.GetHashCode();
         hash = hash * 23 + SliderVelocity.GetHashCode();
         hash = hash * 23 + DrainingTime.GetHashCode();
         hash = hash * 23 + TotalTime.GetHashCode();
         hash = hash * 23 + PreviewTime.GetHashCode();
         hash = hash * 23 + MapId.GetHashCode();
         hash = hash * 23 + MapSetId.GetHashCode();
         hash = hash * 23 + ThreadId.GetHashCode();
         hash = hash * 23 + OsuGrade.GetHashCode();
         hash = hash * 23 + TaikoGrade.GetHashCode();
         hash = hash * 23 + CatchGrade.GetHashCode();
         hash = hash * 23 + ManiaGrade.GetHashCode();
         hash = hash * 23 + Offset.GetHashCode();
         hash = hash * 23 + StackLeniency.GetHashCode();
         hash = hash * 23 + PlayMode.GetHashCode();
         hash = hash * 23 + Source.GetHashCode();
         hash = hash * 23 + AudioOffset.GetHashCode();
         hash = hash * 23 + LetterBox.GetHashCode();
         hash = hash * 23 + Played.GetHashCode();
         hash = hash * 23 + LastPlayed.GetHashCode();
         hash = hash * 23 + IsOsz2.GetHashCode();
         hash = hash * 23 + Dir.GetHashCode();
         //hash = hash * 23 + LastSync.GetHashCode(); //This value is updated by osu even if no changes were made to the actual data
         hash = hash * 23 + DisableHitsounds.GetHashCode();
         hash = hash * 23 + DisableSkin.GetHashCode();
         hash = hash * 23 + DisableSb.GetHashCode();
         hash = hash * 23 + BgDim.GetHashCode();
         hash = hash * 23 + ModPpStars.GetHashCode();
         hash = hash * 23 + MaxBpm.GetHashCode();
         hash = hash * 23 + MinBpm.GetHashCode();
         hash = hash * 23 + MainBpm.GetHashCode();
         return(hash);
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (TotalPathLength != 0D)
            {
                hash ^= TotalPathLength.GetHashCode();
            }
            if (TotalTime != 0D)
            {
                hash ^= TotalTime.GetHashCode();
            }
            if (PreferredAccel != 0D)
            {
                hash ^= PreferredAccel.GetHashCode();
            }
            if (PreferredDecel != 0D)
            {
                hash ^= PreferredDecel.GetHashCode();
            }
            if (MaxAccel != 0D)
            {
                hash ^= MaxAccel.GetHashCode();
            }
            if (MinDecel != 0D)
            {
                hash ^= MinDecel.GetHashCode();
            }
            if (SpeedLimitBuffer != 0D)
            {
                hash ^= SpeedLimitBuffer.GetHashCode();
            }
            if (SpeedWeight != 0D)
            {
                hash ^= SpeedWeight.GetHashCode();
            }
            if (JerkWeight != 0D)
            {
                hash ^= JerkWeight.GetHashCode();
            }
            if (ObstacleWeight != 0D)
            {
                hash ^= ObstacleWeight.GetHashCode();
            }
            if (UnblockingObstacleCost != 0D)
            {
                hash ^= UnblockingObstacleCost.GetHashCode();
            }
            if (stBoundaryConfig_ != null)
            {
                hash ^= StBoundaryConfig.GetHashCode();
            }
            return(hash);
        }
Exemple #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Vehicles;
         hashCode = (hashCode * 397) ^ SmallestRoundCategory;
         hashCode = (hashCode * 397) ^ LargestRoundCategory;
         hashCode = (hashCode * 397) ^ TotalTime.GetHashCode();
         hashCode = (hashCode * 397) ^ MinimumTime.GetHashCode();
         hashCode = (hashCode * 397) ^ MaximumTime.GetHashCode();
         hashCode = (hashCode * 397) ^ (LargestRoundCategories != null ? LargestRoundCategories.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SmallestRoundCategories != null ? SmallestRoundCategories.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Feasable.GetHashCode();
         return(hashCode);
     }
 }
Exemple #6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TotalPathLength != 0D)
            {
                hash ^= TotalPathLength.GetHashCode();
            }
            if (TotalTime != 0D)
            {
                hash ^= TotalTime.GetHashCode();
            }
            if (MatrixDimensionS != 0)
            {
                hash ^= MatrixDimensionS.GetHashCode();
            }
            if (MatrixDimensionT != 0)
            {
                hash ^= MatrixDimensionT.GetHashCode();
            }
            if (SpeedWeight != 0D)
            {
                hash ^= SpeedWeight.GetHashCode();
            }
            if (AccelWeight != 0D)
            {
                hash ^= AccelWeight.GetHashCode();
            }
            if (JerkWeight != 0D)
            {
                hash ^= JerkWeight.GetHashCode();
            }
            if (ObstacleWeight != 0D)
            {
                hash ^= ObstacleWeight.GetHashCode();
            }
            if (ReferenceWeight != 0D)
            {
                hash ^= ReferenceWeight.GetHashCode();
            }
            if (GoDownBuffer != 0D)
            {
                hash ^= GoDownBuffer.GetHashCode();
            }
            if (GoUpBuffer != 0D)
            {
                hash ^= GoUpBuffer.GetHashCode();
            }
            if (DefaultObstacleCost != 0D)
            {
                hash ^= DefaultObstacleCost.GetHashCode();
            }
            if (DefaultSpeedCost != 0D)
            {
                hash ^= DefaultSpeedCost.GetHashCode();
            }
            if (ExceedSpeedPenalty != 0D)
            {
                hash ^= ExceedSpeedPenalty.GetHashCode();
            }
            if (LowSpeedPenalty != 0D)
            {
                hash ^= LowSpeedPenalty.GetHashCode();
            }
            if (KeepClearLowSpeedPenalty != 0D)
            {
                hash ^= KeepClearLowSpeedPenalty.GetHashCode();
            }
            if (AccelPenalty != 0D)
            {
                hash ^= AccelPenalty.GetHashCode();
            }
            if (DecelPenalty != 0D)
            {
                hash ^= DecelPenalty.GetHashCode();
            }
            if (PositiveJerkCoeff != 0D)
            {
                hash ^= PositiveJerkCoeff.GetHashCode();
            }
            if (NegativeJerkCoeff != 0D)
            {
                hash ^= NegativeJerkCoeff.GetHashCode();
            }
            if (MaxAcceleration != 0D)
            {
                hash ^= MaxAcceleration.GetHashCode();
            }
            if (MaxDeceleration != 0D)
            {
                hash ^= MaxDeceleration.GetHashCode();
            }
            if (stBoundaryConfig_ != null)
            {
                hash ^= StBoundaryConfig.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (TotalTime != 0D)
            {
                hash ^= TotalTime.GetHashCode();
            }
            if (TotalS != 0D)
            {
                hash ^= TotalS.GetHashCode();
            }
            if (NumTLayers != 0)
            {
                hash ^= NumTLayers.GetHashCode();
            }
            if (OnlineNumVLayers != 0)
            {
                hash ^= OnlineNumVLayers.GetHashCode();
            }
            if (MatrixDimS != 0)
            {
                hash ^= MatrixDimS.GetHashCode();
            }
            if (OnlineMaxAcc != 0D)
            {
                hash ^= OnlineMaxAcc.GetHashCode();
            }
            if (OnlineMaxDec != 0D)
            {
                hash ^= OnlineMaxDec.GetHashCode();
            }
            if (OnlineMaxSpeed != 0D)
            {
                hash ^= OnlineMaxSpeed.GetHashCode();
            }
            if (OfflineNumVLayers != 0)
            {
                hash ^= OfflineNumVLayers.GetHashCode();
            }
            if (OfflineMaxAcc != 0D)
            {
                hash ^= OfflineMaxAcc.GetHashCode();
            }
            if (OfflineMaxDec != 0D)
            {
                hash ^= OfflineMaxDec.GetHashCode();
            }
            if (OfflineMaxSpeed != 0D)
            {
                hash ^= OfflineMaxSpeed.GetHashCode();
            }
            if (NumEvaluatedPoints != 0)
            {
                hash ^= NumEvaluatedPoints.GetHashCode();
            }
            if (SamplingUnitV != 0D)
            {
                hash ^= SamplingUnitV.GetHashCode();
            }
            if (MaxSamplingUnitV != 0D)
            {
                hash ^= MaxSamplingUnitV.GetHashCode();
            }
            if (stBoundaryConfig_ != null)
            {
                hash ^= StBoundaryConfig.GetHashCode();
            }
            return(hash);
        }