master
 1using Notepad.Presentation.Model.Menu;
 2using Notepad.Presentation.Views.Menu.Mappers;
 3using Notepad.Presentation.Views.Shell;
 4
 5namespace Notepad.Presentation.Views.Menu {
 6    public interface IMainMenuView {
 7        void Add(ISubMenu menuToAddToTheMainMenu);
 8    }
 9
10    public class MainMenuView : IMainMenuView {
11        private readonly ISubMenuToToolStripMenuItemMapper mapper;
12        private readonly WindowShell mainShell;
13
14        public MainMenuView(WindowShell mainShell, ISubMenuToToolStripMenuItemMapper mapper) {
15            this.mapper = mapper;
16            this.mainShell = mainShell;
17        }
18
19        public void Add(ISubMenu menuToAddToTheMainMenu) {
20            mainShell.MenuStrip().Items.Add(mapper.MapFrom(menuToAddToTheMainMenu));
21        }
22    }
23}