public void AddMenuItem(MenuItemBase parent, params MenuItemBase[] displayMenuItem)
 {
     foreach (var menuItemDefinition in displayMenuItem)
     {
         if (MenuItemNameList.Contains(menuItemDefinition.Name))
         {
             throw new Exception("Menu item name duplicated");
         }
         parent.Children.Add(menuItemDefinition);
         MenuItemNameList.Add(menuItemDefinition.Name);
     }
 }
 public void AddMenu(params Menu[] menu)
 {
     foreach (var menuDefinition in menu)
     {
         if (MenuItemNameList.Contains(menuDefinition.Name))
         {
             throw new Exception("Menu item name duplicated");
         }
         Items.Add(menuDefinition);
         MenuItemNameList.Add(menuDefinition.Name);
     }
 }