Esempio n. 1
0
 public bool Equals(AggregatedIngredientsDetails other)
 {
     return(Calories.Equals(other.Calories) && Allergens == other.Allergens &&
            Requirements == other.Requirements && Equals(MacroNutrientQuantity, other.MacroNutrientQuantity));
 }
Esempio n. 2
0
        /// <summary>
        /// Returns true if DetailedActivity instances are equal
        /// </summary>
        /// <param name="other">Instance of DetailedActivity to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DetailedActivity other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                     ) &&
                 (
                     Photos == other.Photos ||
                     Photos != null &&
                     Photos.Equals(other.Photos)
                 ) &&
                 (
                     Gear == other.Gear ||
                     Gear != null &&
                     Gear.Equals(other.Gear)
                 ) &&
                 (
                     Calories == other.Calories ||
                     Calories != null &&
                     Calories.Equals(other.Calories)
                 ) &&
                 (
                     SegmentEfforts == other.SegmentEfforts ||
                     SegmentEfforts != null &&
                     SegmentEfforts.SequenceEqual(other.SegmentEfforts)
                 ) &&
                 (
                     DeviceName == other.DeviceName ||
                     DeviceName != null &&
                     DeviceName.Equals(other.DeviceName)
                 ) &&
                 (
                     EmbedToken == other.EmbedToken ||
                     EmbedToken != null &&
                     EmbedToken.Equals(other.EmbedToken)
                 ) &&
                 (
                     SplitsMetric == other.SplitsMetric ||
                     SplitsMetric != null &&
                     SplitsMetric.SequenceEqual(other.SplitsMetric)
                 ) &&
                 (
                     SplitsStandard == other.SplitsStandard ||
                     SplitsStandard != null &&
                     SplitsStandard.SequenceEqual(other.SplitsStandard)
                 ) &&
                 (
                     Laps == other.Laps ||
                     Laps != null &&
                     Laps.SequenceEqual(other.Laps)
                 ) &&
                 (
                     BestEfforts == other.BestEfforts ||
                     BestEfforts != null &&
                     BestEfforts.SequenceEqual(other.BestEfforts)
                 ));
        }