From 0f5085d58875917d81b52f28691afb9a24d9e02f Mon Sep 17 00:00:00 2001 From: Simon G Date: Fri, 9 Apr 2021 16:00:29 +0200 Subject: [PATCH] - add driver installer --- Mystify/Bootstrapper.cs | 7 ++++--- Mystify/Installers/DriverInstaller.cs | 23 +++++++++++++++++++++++ Mystify/Mystify.csproj | 1 + 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 Mystify/Installers/DriverInstaller.cs diff --git a/Mystify/Bootstrapper.cs b/Mystify/Bootstrapper.cs index 6827b22..7d36272 100644 --- a/Mystify/Bootstrapper.cs +++ b/Mystify/Bootstrapper.cs @@ -10,11 +10,12 @@ namespace Mystify { public class Bootstrapper { - public IIocContainer BootstrapKernel() => + public IIocContainer BootstrapKernel() => new IocContainer().Install( new MainInstaller(), - new NotifyIconInstaller(), new AudioInstaller(), - new MidiInstaller()); + new DriverInstaller(), + new MidiInstaller(), + new NotifyIconInstaller()); } } \ No newline at end of file diff --git a/Mystify/Installers/DriverInstaller.cs b/Mystify/Installers/DriverInstaller.cs new file mode 100644 index 0000000..8c1201e --- /dev/null +++ b/Mystify/Installers/DriverInstaller.cs @@ -0,0 +1,23 @@ +// Author: Gockner, Simon +// Created: 2021-04-09 +// Copyright(c) 2021 SimonG. All Rights Reserved. + +using Lib.Driver; +using Lib.Driver.Factories; +using Lib.Driver.Interfaces; +using LightweightIocContainer.Interfaces; +using LightweightIocContainer.Interfaces.Installers; + +namespace Mystify.Installers +{ + public class DriverInstaller : IIocInstaller + { + public void Install(IIocContainer container) + { + container.Register(); + + //factories + container.RegisterFactory(); + } + } +} \ No newline at end of file diff --git a/Mystify/Mystify.csproj b/Mystify/Mystify.csproj index aaf17a2..631c53e 100644 --- a/Mystify/Mystify.csproj +++ b/Mystify/Mystify.csproj @@ -16,6 +16,7 @@ +