Filtration/Filtration/WindsorInstallers/ServicesInstaller.cs
Ben Wallis 25c25c2a1d * Removed incorrect use of async method in MainWindowViewModel constructor
* Moved script/theme loading code to new ScriptLoadingService class
2018-11-27 21:48:36 +00:00

64 lines
2.2 KiB
C#

using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Filtration.Services;
namespace Filtration.WindsorInstallers
{
public class ServicesInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(
Component.For<IItemFilterPersistenceService>()
.ImplementedBy<ItemFilterPersistenceService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IItemFilterScriptDirectoryService>()
.ImplementedBy<ItemFilterScriptDirectoryService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IScriptLoadingService>()
.ImplementedBy<ScriptLoadingService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IStaticDataService>()
.ImplementedBy<StaticDataService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IHTTPService>()
.ImplementedBy<HTTPService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IUpdateService>()
.ImplementedBy<UpdateService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IClipboardService>()
.ImplementedBy<ClipboardService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IBootstrapper>()
.ImplementedBy<Bootstrapper>()
.LifeStyle.Singleton);
container.Register(
Component.For<ISettingsService>()
.ImplementedBy<SettingsService>()
.LifeStyle.Singleton);
container.Register(
Component.For<IDialogService>()
.ImplementedBy<DialogService>()
.LifeStyle.Singleton);
}
}
}