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

            return
                ((
                     PrepTime == other.PrepTime ||
                     PrepTime != null &&
                     PrepTime.Equals(other.PrepTime)
                     ) &&
                 (
                     TotalTime == other.TotalTime ||
                     TotalTime != null &&
                     TotalTime.Equals(other.TotalTime)
                 ) &&
                 (
                     Servings == other.Servings ||
                     Servings != null &&
                     Servings.Equals(other.Servings)
                 ) &&
                 (
                     ServingSize == other.ServingSize ||
                     ServingSize != null &&
                     ServingSize.Equals(other.ServingSize)
                 ));
        }
コード例 #2
0
ファイル: Fitness.cs プロジェクト: yousoftvn/OsmSharp
 protected bool Equals(Fitness other)
 {
     return(Vehicles == other.Vehicles && SmallestRoundCategory == other.SmallestRoundCategory && LargestRoundCategory == other.LargestRoundCategory && TotalTime.Equals(other.TotalTime) && MinimumTime.Equals(other.MinimumTime) && MaximumTime.Equals(other.MaximumTime) && Equals(LargestRoundCategories, other.LargestRoundCategories) && Equals(SmallestRoundCategories, other.SmallestRoundCategories) && Feasable.Equals(other.Feasable));
 }