コード例 #1
0
        /// <summary>
        /// Returns true if DetailedSegment instances are equal
        /// </summary>
        /// <param name="other">Instance of DetailedSegment to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DetailedSegment other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CreatedAt == other.CreatedAt ||
                     CreatedAt != null &&
                     CreatedAt.Equals(other.CreatedAt)
                     ) &&
                 (
                     UpdatedAt == other.UpdatedAt ||
                     UpdatedAt != null &&
                     UpdatedAt.Equals(other.UpdatedAt)
                 ) &&
                 (
                     TotalElevationGain == other.TotalElevationGain ||
                     TotalElevationGain != null &&
                     TotalElevationGain.Equals(other.TotalElevationGain)
                 ) &&
                 (
                     Map == other.Map ||
                     Map != null &&
                     Map.Equals(other.Map)
                 ) &&
                 (
                     EffortCount == other.EffortCount ||
                     EffortCount != null &&
                     EffortCount.Equals(other.EffortCount)
                 ) &&
                 (
                     AthleteCount == other.AthleteCount ||
                     AthleteCount != null &&
                     AthleteCount.Equals(other.AthleteCount)
                 ) &&
                 (
                     Hazardous == other.Hazardous ||
                     Hazardous != null &&
                     Hazardous.Equals(other.Hazardous)
                 ) &&
                 (
                     StarCount == other.StarCount ||
                     StarCount != null &&
                     StarCount.Equals(other.StarCount)
                 ));
        }