From 7b4a92fbe6dfb9c6a77737feff3486c5fc2afe74 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 7 Apr 2011 21:11:45 -0700 Subject: [PATCH] Removed IQuality provider Updated AutoMoq to support SetConstant --- NzbDrone.Core/CentralDispatch.cs | 6 +++--- NzbDrone.Web/Controllers/AddSeriesController.cs | 6 +++--- NzbDrone.Web/Controllers/SeriesController.cs | 16 +++++----------- NzbDrone.Web/Controllers/SettingsController.cs | 4 ++-- NzbDrone.sln | 1 + 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index d094f2503..663c42889 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -57,17 +57,17 @@ namespace NzbDrone.Core dbProvider.Log = new NlogWriter(); + _kernel.Bind().ToSelf(); + _kernel.Bind().ToSelf(); + _kernel.Bind().ToSelf(); _kernel.Bind().To().InSingletonScope(); _kernel.Bind().To().InSingletonScope(); _kernel.Bind().To(); _kernel.Bind().To(); _kernel.Bind().To(); _kernel.Bind().To(); - _kernel.Bind().To(); _kernel.Bind().To(); - _kernel.Bind().To(); _kernel.Bind().To(); - _kernel.Bind().To(); _kernel.Bind().To(); _kernel.Bind().To(); _kernel.Bind().To(); diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs index 7005f762d..8b3ad777b 100644 --- a/NzbDrone.Web/Controllers/AddSeriesController.cs +++ b/NzbDrone.Web/Controllers/AddSeriesController.cs @@ -16,12 +16,12 @@ namespace NzbDrone.Web.Controllers private readonly ISyncProvider _syncProvider; private readonly IRootDirProvider _rootFolderProvider; private readonly IConfigProvider _configProvider; - private readonly IQualityProvider _qualityProvider; - private readonly ITvDbProvider _tvDbProvider; + private readonly QualityProvider _qualityProvider; + private readonly TvDbProvider _tvDbProvider; private readonly ISeriesProvider _seriesProvider; public AddSeriesController(ISyncProvider syncProvider, IRootDirProvider rootFolderProvider, IConfigProvider configProvider, - IQualityProvider qualityProvider, ITvDbProvider tvDbProvider, ISeriesProvider seriesProvider) + QualityProvider qualityProvider, TvDbProvider tvDbProvider, ISeriesProvider seriesProvider) { ConfigProvider = configProvider; _syncProvider = syncProvider; diff --git a/NzbDrone.Web/Controllers/SeriesController.cs b/NzbDrone.Web/Controllers/SeriesController.cs index 07dfa4a7b..3ee7b1d0f 100644 --- a/NzbDrone.Web/Controllers/SeriesController.cs +++ b/NzbDrone.Web/Controllers/SeriesController.cs @@ -25,23 +25,19 @@ namespace NzbDrone.Web.Controllers private readonly IEpisodeProvider _episodeProvider; private readonly ISyncProvider _syncProvider; private readonly IRssSyncProvider _rssSyncProvider; - private readonly IQualityProvider _qualityProvider; + private readonly QualityProvider _qualityProvider; private readonly IMediaFileProvider _mediaFileProvider; private readonly IRenameProvider _renameProvider; private readonly IRootDirProvider _rootDirProvider; - private readonly ITvDbProvider _tvDbProvider; - private readonly IDiskProvider _diskProvider; - private readonly IConfigProvider _configProvider; - + private readonly TvDbProvider _tvDbProvider; // // GET: /Series/ public SeriesController(ISyncProvider syncProvider, ISeriesProvider seriesProvider, IEpisodeProvider episodeProvider, IRssSyncProvider rssSyncProvider, - IQualityProvider qualityProvider, IMediaFileProvider mediaFileProvider, + QualityProvider qualityProvider, IMediaFileProvider mediaFileProvider, IRenameProvider renameProvider, IRootDirProvider rootDirProvider, - ITvDbProvider tvDbProvider, IDiskProvider diskProvider, - IConfigProvider configProvider) + TvDbProvider tvDbProvider) { _seriesProvider = seriesProvider; _episodeProvider = episodeProvider; @@ -52,8 +48,6 @@ namespace NzbDrone.Web.Controllers _renameProvider = renameProvider; _rootDirProvider = rootDirProvider; _tvDbProvider = tvDbProvider; - _diskProvider = diskProvider; - _configProvider = configProvider; } public ActionResult Index() @@ -62,7 +56,7 @@ namespace NzbDrone.Web.Controllers return View(); } - + diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 4e6a9856e..e9cbc9348 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Web.Controllers { private IConfigProvider _configProvider; private IIndexerProvider _indexerProvider; - private IQualityProvider _qualityProvider; + private QualityProvider _qualityProvider; private IRootDirProvider _rootDirProvider; private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); @@ -29,7 +29,7 @@ namespace NzbDrone.Web.Controllers private const string SETTINGS_FAILED = "Error Saving Settings, please fix any errors"; public SettingsController(IConfigProvider configProvider, IIndexerProvider indexerProvider, - IQualityProvider qualityProvider, IRootDirProvider rootDirProvider) + QualityProvider qualityProvider, IRootDirProvider rootDirProvider) { _configProvider = configProvider; _indexerProvider = indexerProvider; diff --git a/NzbDrone.sln b/NzbDrone.sln index 4d14644d3..0cfcfbde7 100644 --- a/NzbDrone.sln +++ b/NzbDrone.sln @@ -55,6 +55,7 @@ Global {43BD3BBD-1531-4D8F-9C08-E1CD544AB2CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43BD3BBD-1531-4D8F-9C08-E1CD544AB2CD}.Debug|Any CPU.Build.0 = Debug|Any CPU {43BD3BBD-1531-4D8F-9C08-E1CD544AB2CD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {43BD3BBD-1531-4D8F-9C08-E1CD544AB2CD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {43BD3BBD-1531-4D8F-9C08-E1CD544AB2CD}.Debug|x64.ActiveCfg = Debug|Any CPU {43BD3BBD-1531-4D8F-9C08-E1CD544AB2CD}.Debug|x86.ActiveCfg = Debug|Any CPU {43BD3BBD-1531-4D8F-9C08-E1CD544AB2CD}.Debug|x86.Build.0 = Debug|Any CPU