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);
            }
        }
Example #2
0
 protected bool Equals(LinkedPage other)
 {
     return(string.Equals(Id, other.Id) && string.Equals(Title, other.Title) &&
            string.Equals(Icon, other.Icon) && string.Equals(Link, other.Link) && Leaf == other.Leaf &&
            Equals(Widgets, other.Widgets));
 }