public override int GetHashCode() { unchecked { var hashCode = WidgetId != null?WidgetId.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Icon != null ? Icon.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Mappings != null ? Mappings.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Item != null ? Item.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LinkedPage != null ? LinkedPage.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Widgets != null ? Widgets.GetHashCode() : 0); hashCode = (hashCode * 397) ^ SwitchSupport.GetHashCode(); hashCode = (hashCode * 397) ^ SendFrequency.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 (WidgetId != null) { hashCode = hashCode * 59 + WidgetId.GetHashCode(); } if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Visibility != null) { hashCode = hashCode * 59 + Visibility.GetHashCode(); } if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Icon != null) { hashCode = hashCode * 59 + Icon.GetHashCode(); } if (Labelcolor != null) { hashCode = hashCode * 59 + Labelcolor.GetHashCode(); } if (Valuecolor != null) { hashCode = hashCode * 59 + Valuecolor.GetHashCode(); } if (Mappings != null) { hashCode = hashCode * 59 + Mappings.GetHashCode(); } if (SwitchSupport != null) { hashCode = hashCode * 59 + SwitchSupport.GetHashCode(); } if (SendFrequency != null) { hashCode = hashCode * 59 + SendFrequency.GetHashCode(); } if (Separator != null) { hashCode = hashCode * 59 + Separator.GetHashCode(); } if (Refresh != null) { hashCode = hashCode * 59 + Refresh.GetHashCode(); } if (Height != null) { hashCode = hashCode * 59 + Height.GetHashCode(); } if (MinValue != null) { hashCode = hashCode * 59 + MinValue.GetHashCode(); } if (MaxValue != null) { hashCode = hashCode * 59 + MaxValue.GetHashCode(); } if (Step != null) { hashCode = hashCode * 59 + Step.GetHashCode(); } if (Url != null) { hashCode = hashCode * 59 + Url.GetHashCode(); } if (Encoding != null) { hashCode = hashCode * 59 + Encoding.GetHashCode(); } if (Service != null) { hashCode = hashCode * 59 + Service.GetHashCode(); } if (Period != null) { hashCode = hashCode * 59 + Period.GetHashCode(); } if (Legend != null) { hashCode = hashCode * 59 + Legend.GetHashCode(); } if (State != null) { hashCode = hashCode * 59 + State.GetHashCode(); } if (Item != null) { hashCode = hashCode * 59 + Item.GetHashCode(); } if (LinkedPage != null) { hashCode = hashCode * 59 + LinkedPage.GetHashCode(); } if (Widgets != null) { hashCode = hashCode * 59 + Widgets.GetHashCode(); } return(hashCode); } }