コード例 #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         hashCode = hashCode * 59 + LineStartX.GetHashCode();
         hashCode = hashCode * 59 + LineStartY.GetHashCode();
         hashCode = hashCode * 59 + LineEndX.GetHashCode();
         hashCode = hashCode * 59 + LineEndY.GetHashCode();
         if (Title != null)
         {
             hashCode = hashCode * 59 + Title.GetHashCode();
         }
         if (Content != null)
         {
             hashCode = hashCode * 59 + Content.GetHashCode();
         }
         hashCode = hashCode * 59 + LineStartStyle.GetHashCode();
         hashCode = hashCode * 59 + LineEndStyle.GetHashCode();
         hashCode = hashCode * 59 + ShowContent.GetHashCode();
         hashCode = hashCode * 59 + LineWidth.GetHashCode();
         hashCode = hashCode * 59 + AbsoluteAnnotationLineWidth.GetHashCode();
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         return(hashCode);
     }
 }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (AnnotationLayout != null)
         {
             hashCode = hashCode * 59 + AnnotationLayout.GetHashCode();
         }
         if (Title != null)
         {
             hashCode = hashCode * 59 + Title.GetHashCode();
         }
         if (Content != null)
         {
             hashCode = hashCode * 59 + Content.GetHashCode();
         }
         hashCode = hashCode * 59 + LineWidth.GetHashCode();
         hashCode = hashCode * 59 + AbsoluteAnnotationLineWidth.GetHashCode();
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #3
0
        /// <summary>
        /// Returns true if LineAnnotationParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of LineAnnotationParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(LineAnnotationParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     LineStartX == input.LineStartX ||
                     LineStartX.Equals(input.LineStartX)
                     ) &&
                 (
                     LineStartY == input.LineStartY ||
                     LineStartY.Equals(input.LineStartY)
                 ) &&
                 (
                     LineEndX == input.LineEndX ||
                     LineEndX.Equals(input.LineEndX)
                 ) &&
                 (
                     LineEndY == input.LineEndY ||
                     LineEndY.Equals(input.LineEndY)
                 ) &&
                 (
                     Title == input.Title ||
                     (Title != null &&
                      Title.Equals(input.Title))
                 ) &&
                 (
                     Content == input.Content ||
                     (Content != null &&
                      Content.Equals(input.Content))
                 ) &&
                 (
                     LineStartStyle == input.LineStartStyle ||
                     LineStartStyle.Equals(input.LineStartStyle)
                 ) &&
                 (
                     LineEndStyle == input.LineEndStyle ||
                     LineEndStyle.Equals(input.LineEndStyle)
                 ) &&
                 (
                     ShowContent == input.ShowContent ||
                     ShowContent.Equals(input.ShowContent)
                 ) &&
                 (
                     LineWidth == input.LineWidth ||
                     LineWidth.Equals(input.LineWidth)
                 ) &&
                 (
                     AbsoluteAnnotationLineWidth == input.AbsoluteAnnotationLineWidth ||
                     AbsoluteAnnotationLineWidth.Equals(input.AbsoluteAnnotationLineWidth)
                 ) &&
                 (
                     Color == input.Color ||
                     (Color != null &&
                      Color.Equals(input.Color))
                 ));
        }
        /// <summary>
        /// Returns true if SquareAndCircleAnnotationParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of SquareAndCircleAnnotationParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SquareAndCircleAnnotationParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     AnnotationLayout == input.AnnotationLayout ||
                     (AnnotationLayout != null &&
                      AnnotationLayout.Equals(input.AnnotationLayout))
                     ) &&
                 (
                     Title == input.Title ||
                     (Title != null &&
                      Title.Equals(input.Title))
                 ) &&
                 (
                     Content == input.Content ||
                     (Content != null &&
                      Content.Equals(input.Content))
                 ) &&
                 (
                     LineWidth == input.LineWidth ||
                     LineWidth.Equals(input.LineWidth)
                 ) &&
                 (
                     AbsoluteAnnotationLineWidth == input.AbsoluteAnnotationLineWidth ||
                     AbsoluteAnnotationLineWidth.Equals(input.AbsoluteAnnotationLineWidth)
                 ) &&
                 (
                     Color == input.Color ||
                     (Color != null &&
                      Color.Equals(input.Color))
                 ));
        }