/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Inline != null) { hashCode = hashCode * 59 + Inline.GetHashCode(); } if (Moveable != null) { hashCode = hashCode * 59 + Moveable.GetHashCode(); } if (Disabled != null) { hashCode = hashCode * 59 + Disabled.GetHashCode(); } if (Deletable != null) { hashCode = hashCode * 59 + Deletable.GetHashCode(); } if (Editable != null) { hashCode = hashCode * 59 + Editable.GetHashCode(); } if (Comment != null) { hashCode = hashCode * 59 + Comment.GetHashCode(); } if (Mutation != null) { hashCode = hashCode * 59 + Mutation.GetHashCode(); } if (Children != null) { hashCode = hashCode * 59 + Children.GetHashCode(); } if (Fields != null) { hashCode = hashCode * 59 + Fields.GetHashCode(); } if (Next != null) { hashCode = hashCode * 59 + Next.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (ShowIcon != false) { hash ^= ShowIcon.GetHashCode(); } if (ShowLabel != false) { hash ^= ShowLabel.GetHashCode(); } if (ShowGauge != false) { hash ^= ShowGauge.GetHashCode(); } if (Style.Length != 0) { hash ^= Style.GetHashCode(); } if (Min != 0D) { hash ^= Min.GetHashCode(); } if (Max != 0D) { hash ^= Max.GetHashCode(); } if (Label.Length != 0) { hash ^= Label.GetHashCode(); } if (CustomLabel.Length != 0) { hash ^= CustomLabel.GetHashCode(); } if (Inline != false) { hash ^= Inline.GetHashCode(); } if (Zoom.Length != 0) { hash ^= Zoom.GetHashCode(); } return(hash); }
public void FormatInline(FlowDocument doc, Inline inline, StringBuilder buf, int indent) { // indent buf.Append(' ', indent); buf.AppendFormat( "{0} {1} to {2}", inline.GetType().Name + inline.GetHashCode(), inline.ContentStart.CompareTo(doc.ContentStart), inline.ContentEnd.CompareTo(doc.ContentStart)); if (inline is Run) { buf.Append(" \"" + ((Run)inline).Text + "\""); } buf.AppendLine(); if (inline is Underline) { FormatInlines(doc, ((Underline)inline).Inlines, buf, indent + 3); } if (inline is Italic) { FormatInlines(doc, ((Italic)inline).Inlines, buf, indent + 3); } }