summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Core/ApplicationController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Notepad/Presentation/Core/ApplicationController.cs')
-rw-r--r--src/Notepad/Presentation/Core/ApplicationController.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Core/ApplicationController.cs b/src/Notepad/Presentation/Core/ApplicationController.cs
new file mode 100644
index 0000000..4970593
--- /dev/null
+++ b/src/Notepad/Presentation/Core/ApplicationController.cs
@@ -0,0 +1,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();
+ }
+ }
+} \ No newline at end of file