/// <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 + TextVerticalAlignment.GetHashCode(); hashCode = hashCode * 59 + TextHorizontalAlignment.GetHashCode(); if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (TextColor != null) { hashCode = hashCode * 59 + TextColor.GetHashCode(); } if (FontName != null) { hashCode = hashCode * 59 + FontName.GetHashCode(); } hashCode = hashCode * 59 + StandardFontName.GetHashCode(); hashCode = hashCode * 59 + FontStyle.GetHashCode(); hashCode = hashCode * 59 + FontSize.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { var hashCode = 679998008; hashCode = hashCode * -1521134295 + Data.GetHashCode(); hashCode = hashCode * -1521134295 + TextColor.GetHashCode(); hashCode = hashCode * -1521134295 + BackGroundColor.GetHashCode(); hashCode = hashCode * -1521134295 + RePaint.GetHashCode(); hashCode = hashCode * -1521134295 + Empty.GetHashCode(); return(hashCode); }
public override int GetHashCode() { unchecked { int hashCode = (TextColor != null ? TextColor.GetHashCode() : 0); hashCode = (hashCode * 397) ^ FontSize.GetHashCode(); hashCode = (hashCode * 397) ^ Bold.GetHashCode(); hashCode = (hashCode * 397) ^ Italic.GetHashCode(); hashCode = (hashCode * 397) ^ Alignment.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = TextSize.GetHashCode(); hashCode = (hashCode * 397) ^ (int)TextStyle; hashCode = (hashCode * 397) ^ TextColor.GetHashCode(); hashCode = (hashCode * 397) ^ BackgroundColor.GetHashCode(); hashCode = (hashCode * 397) ^ IsClickable.GetHashCode(); hashCode = (hashCode * 397) ^ (ClickValue != null ? ClickValue.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { var hash = base.GetHashCode(); if (Action != null) { hash = hash * 23 + Action.GetHashCode(); } hash = hash * 23 + TextColor.GetHashCode(); hash = hash * 23 + BackgroundColor.GetHashCode(); hash = hash * 23 + Underline.GetHashCode(); hash = hash * 23 + Strikethrough.GetHashCode(); return(hash); }
public int GetSettingsHashCode() { var hashes = new int[] { TextColor.GetHashCode(), OverrideTextColor.GetHashCode(), BackgroundColor.GetHashCode(), BackgroundColor2.GetHashCode(), GradientString.GetHashCode(), Display2Rows.GetHashCode(), ProbabilityText.GetHashCode(), Weight.GetHashCode(), CutoffTime.GetHashCode(), chkUsePb.Checked.GetHashCode(), dataGridSplits.Rows.GetHashCode() }; // Rough hashing algorithm thanks to https://stackoverflow.com/questions/3404715/ return(hashes.Aggregate(hashes.Length, (hash, element) => unchecked (314159 * hash + element))); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (textColor_ != null) { hash ^= TextColor.GetHashCode(); } if (Title.Length != 0) { hash ^= Title.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { return(FontFamily.GetHashCode() ^ FontDecoration.GetHashCode() ^ Size.GetHashCode() ^ TextColor.GetHashCode() ^ (HighlightGroup?.GetHashCode() ?? 0)); }