summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Model/Menu/Help/HelpMenu.cs
blob: ace96969711dd3bfb81b889a3e3af8428c5a39b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System.Collections.Generic;
using Notepad.Domain.Repositories;
using Notepad.Infrastructure.Extensions;

namespace Notepad.Presentation.Model.Menu.Help {
    public class HelpMenu : ISubMenu {
        private readonly IRepository<IMenuItem> menuItems;

        public HelpMenu(IRepository<IMenuItem> repository) {
            menuItems = repository;
        }

        public IEnumerable<IMenuItem> AllMenuItems() {
            return menuItems.All().ThatSatisfy(m => m.BelongsTo(this));
        }

        public string Name() {
            return MenuNames.Help;
        }
    }
}