summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Core/ApplicationController.cs
blob: 497059316baf5e25988477816c75c21ff0cade20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
namespace Notepad.Presentation.Core {
    public class ApplicationController : IApplicationController {
        private readonly IPresenterRegistry registeredPresenters;

        public ApplicationController(IPresenterRegistry presenterRegistry) {
            registeredPresenters = presenterRegistry;
        }

        public void Run<Presenter>() where Presenter : IPresenter {
            registeredPresenters.FindAnImplementationOf<Presenter>().Initialize();
        }
    }
}