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

            return
                ((
                     Calories == other.Calories ||
                     Calories != null &&
                     Calories.SequenceEqual(other.Calories)
                     ) &&
                 (
                     DailyValues == other.DailyValues ||
                     DailyValues != null &&
                     DailyValues.SequenceEqual(other.DailyValues)
                 ) &&
                 (
                     Fat == other.Fat ||
                     Fat != null &&
                     Fat.SequenceEqual(other.Fat)
                 ) &&
                 (
                     Carbs == other.Carbs ||
                     Carbs != null &&
                     Carbs.SequenceEqual(other.Carbs)
                 ) &&
                 (
                     Vitamins == other.Vitamins ||
                     Vitamins != null &&
                     Vitamins.SequenceEqual(other.Vitamins)
                 ));
        }