Пример #1
0
        /// <summary>
        /// Returns true if MenuDetails instances are equal
        /// </summary>
        /// <param name="input">Instance of MenuDetails to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MenuDetails input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     MenuId == input.MenuId ||
                     MenuId != null &&
                     MenuId.Equals(input.MenuId)
                     ) &&
                 (
                     Name == input.Name ||
                     Name != null &&
                     Name.Equals(input.Name)
                 ) &&
                 (
                     Subtitle == input.Subtitle ||
                     Subtitle != null &&
                     Subtitle.Equals(input.Subtitle)
                 ) &&
                 (
                     IsActive == input.IsActive ||
                     IsActive != null &&
                     IsActive.Equals(input.IsActive)
                 ) &&
                 (
                     IsPosMenu == input.IsPosMenu ||
                     IsPosMenu != null &&
                     IsPosMenu.Equals(input.IsPosMenu)
                 ) &&
                 (
                     LatestMenuUpdate == input.LatestMenuUpdate ||
                     LatestMenuUpdate != null &&
                     LatestMenuUpdate.Equals(input.LatestMenuUpdate)
                 ) &&
                 (
                     LastSuccessfulMenuUpdateAt == input.LastSuccessfulMenuUpdateAt ||
                     LastSuccessfulMenuUpdateAt != null &&
                     LastSuccessfulMenuUpdateAt.Equals(input.LastSuccessfulMenuUpdateAt)
                 ) &&
                 (
                     Url == input.Url ||
                     Url != null &&
                     Url.Equals(input.Url)
                 ) &&
                 (
                     OpenHours == input.OpenHours ||
                     OpenHours != null &&
                     OpenHours.SequenceEqual(input.OpenHours)
                 ) &&
                 (
                     SpecialHours == input.SpecialHours ||
                     SpecialHours != null &&
                     SpecialHours.SequenceEqual(input.SpecialHours)
                 ));
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (false == (obj is Menus))
            {
                return(false);
            }

            var menu = (Menus)obj;

            return(MenuId.Equals(menu.MenuId));
        }