mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Initial Commit
This commit is contained in:
commit
74ac3bb599
106 changed files with 118079 additions and 0 deletions
34
NzbDrone.Core/Main.cs
Normal file
34
NzbDrone.Core/Main.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using log4net;
|
||||
using Ninject;
|
||||
using NzbDrone.Core.Controllers;
|
||||
using SubSonic.DataProviders;
|
||||
using SubSonic.Repository;
|
||||
|
||||
namespace NzbDrone.Core
|
||||
{
|
||||
public static class Main
|
||||
{
|
||||
|
||||
public static void BindKernel(IKernel kernel)
|
||||
{
|
||||
var provider = ProviderFactory.GetProvider("Data Source=filename;Version=3;", "System.Data.SQLite");
|
||||
|
||||
|
||||
kernel.Bind<ISeriesController>().To<SeriesController>();
|
||||
kernel.Bind<IDiskController>().To<DiskController>();
|
||||
kernel.Bind<ITvDbController>().To<TvDbController>();
|
||||
kernel.Bind<IConfigController>().To<DbConfigController>();
|
||||
kernel.Bind<ILog>().ToMethod(c => LogManager.GetLogger("logger-name"));
|
||||
kernel.Bind<IRepository>().ToMethod(c => new SimpleRepository(provider, SimpleRepositoryOptions.RunMigrations));
|
||||
}
|
||||
|
||||
|
||||
public static String AppPath
|
||||
{
|
||||
get { throw new ApplicationException(); }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue