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

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.SequenceEqual(other.Id)
                     ) &&
                 (
                     Time == other.Time ||
                     Time != null &&
                     Time.SequenceEqual(other.Time)
                 ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.SequenceEqual(other.Color)
                 ) &&
                 (
                     Text == other.Text ||
                     Text != null &&
                     Text.SequenceEqual(other.Text)
                 ) &&
                 (
                     Label == other.Label ||
                     Label != null &&
                     Label.SequenceEqual(other.Label)
                 ) &&
                 (
                     LabelFontColor == other.LabelFontColor ||
                     LabelFontColor != null &&
                     LabelFontColor.SequenceEqual(other.LabelFontColor)
                 ) &&
                 (
                     MinSize == other.MinSize ||
                     MinSize != null &&
                     MinSize.SequenceEqual(other.MinSize)
                 ));
        }
Exemplo n.º 2
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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Time != null)
         {
             hashCode = hashCode * 59 + Time.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (Text != null)
         {
             hashCode = hashCode * 59 + Text.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (LabelFontColor != null)
         {
             hashCode = hashCode * 59 + LabelFontColor.GetHashCode();
         }
         if (MinSize != null)
         {
             hashCode = hashCode * 59 + MinSize.GetHashCode();
         }
         return(hashCode);
     }
 }