Exemple #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Price;
         hashCode = (hashCode * 397) ^ (LinkUri != null ? LinkUri.GetHashCode() : 0);
         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();
         }
         hashCode = hashCode * 59 + LinkType.GetHashCode();
         hashCode = hashCode * 59 + LinkPage.GetHashCode();
         if (LinkUri != null)
         {
             hashCode = hashCode * 59 + LinkUri.GetHashCode();
         }
         hashCode = hashCode * 59 + ShowBorder.GetHashCode();
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if LinkAnnotationParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of LinkAnnotationParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(LinkAnnotationParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     AnnotationLayout == input.AnnotationLayout ||
                     (AnnotationLayout != null &&
                      AnnotationLayout.Equals(input.AnnotationLayout))
                     ) &&
                 (
                     LinkType == input.LinkType ||
                     LinkType.Equals(input.LinkType)
                 ) &&
                 (
                     LinkPage == input.LinkPage ||
                     LinkPage.Equals(input.LinkPage)
                 ) &&
                 (
                     LinkUri == input.LinkUri ||
                     (LinkUri != null &&
                      LinkUri.Equals(input.LinkUri))
                 ) &&
                 (
                     ShowBorder == input.ShowBorder ||
                     ShowBorder.Equals(input.ShowBorder)
                 ) &&
                 (
                     Color == input.Color ||
                     (Color != null &&
                      Color.Equals(input.Color))
                 ));
        }