Removed IRootDirProvider.

pull/6/head
Mark McDowall 14 years ago
parent 6e5328a877
commit d63fe6ad56

@ -68,7 +68,7 @@ namespace NzbDrone.Core
_kernel.Bind<IDiskProvider>().To<DiskProvider>();
_kernel.Bind<IDownloadProvider>().To<SabProvider>();
_kernel.Bind<IHistoryProvider>().To<HistoryProvider>();
_kernel.Bind<IRootDirProvider>().To<RootDirProvider>();
_kernel.Bind<RootDirProvider>().To<RootDirProvider>();
_kernel.Bind<IExtenalNotificationProvider>().To<ExternalNotificationProvider>();
_kernel.Bind<IXbmcProvider>().To<XbmcProvider>();
_kernel.Bind<IConfigProvider>().To<ConfigProvider>().InSingletonScope();

@ -189,7 +189,6 @@
<Compile Include="Providers\IndexerProvider.cs" />
<Compile Include="Providers\IPostProcessingProvider.cs" />
<Compile Include="Providers\IRenameProvider.cs" />
<Compile Include="Providers\IRootDirProvider.cs" />
<Compile Include="Providers\IRssSyncProvider.cs" />
<Compile Include="Providers\ITimerProvider.cs" />
<Compile Include="Providers\IUpcomingEpisodesProvider.cs" />

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Providers
{
public interface IRootDirProvider
{
List<RootDir> GetAll();
void Add(RootDir rootDir);
void Remove(int rootDirId);
void Update(RootDir rootDir);
RootDir GetRootDir(int rootDirId);
}
}

@ -7,7 +7,7 @@ using SubSonic.Repository;
namespace NzbDrone.Core.Providers
{
public class RootDirProvider : IRootDirProvider
public class RootDirProvider
{
private readonly IRepository _sonioRepo;
@ -18,27 +18,27 @@ namespace NzbDrone.Core.Providers
#region IRootDirProvider
public List<RootDir> GetAll()
public virtual List<RootDir> GetAll()
{
return _sonioRepo.All<RootDir>().ToList();
}
public void Add(RootDir rootDir)
public virtual void Add(RootDir rootDir)
{
_sonioRepo.Add(rootDir);
}
public void Remove(int rootDirId)
public virtual void Remove(int rootDirId)
{
_sonioRepo.Delete<RootDir>(rootDirId);
}
public void Update(RootDir rootDir)
public virtual void Update(RootDir rootDir)
{
_sonioRepo.Update(rootDir);
}
public RootDir GetRootDir(int rootDirId)
public virtual RootDir GetRootDir(int rootDirId)
{
return _sonioRepo.Single<RootDir>(rootDirId);
}

@ -14,13 +14,13 @@ namespace NzbDrone.Web.Controllers
{
public IConfigProvider ConfigProvider { get; set; }
private readonly ISyncProvider _syncProvider;
private readonly IRootDirProvider _rootFolderProvider;
private readonly RootDirProvider _rootFolderProvider;
private readonly IConfigProvider _configProvider;
private readonly QualityProvider _qualityProvider;
private readonly TvDbProvider _tvDbProvider;
private readonly ISeriesProvider _seriesProvider;
public AddSeriesController(ISyncProvider syncProvider, IRootDirProvider rootFolderProvider, IConfigProvider configProvider,
public AddSeriesController(ISyncProvider syncProvider, RootDirProvider rootFolderProvider, IConfigProvider configProvider,
QualityProvider qualityProvider, TvDbProvider tvDbProvider, ISeriesProvider seriesProvider)
{
ConfigProvider = configProvider;

@ -28,7 +28,7 @@ namespace NzbDrone.Web.Controllers
private readonly QualityProvider _qualityProvider;
private readonly IMediaFileProvider _mediaFileProvider;
private readonly IRenameProvider _renameProvider;
private readonly IRootDirProvider _rootDirProvider;
private readonly RootDirProvider _rootDirProvider;
private readonly TvDbProvider _tvDbProvider;
//
// GET: /Series/
@ -36,7 +36,7 @@ namespace NzbDrone.Web.Controllers
public SeriesController(ISyncProvider syncProvider, ISeriesProvider seriesProvider,
IEpisodeProvider episodeProvider, IRssSyncProvider rssSyncProvider,
QualityProvider qualityProvider, IMediaFileProvider mediaFileProvider,
IRenameProvider renameProvider, IRootDirProvider rootDirProvider,
IRenameProvider renameProvider, RootDirProvider rootDirProvider,
TvDbProvider tvDbProvider)
{
_seriesProvider = seriesProvider;

@ -22,14 +22,14 @@ namespace NzbDrone.Web.Controllers
private IConfigProvider _configProvider;
private IIndexerProvider _indexerProvider;
private QualityProvider _qualityProvider;
private IRootDirProvider _rootDirProvider;
private RootDirProvider _rootDirProvider;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private const string SETTINGS_SAVED = "Settings Saved.";
private const string SETTINGS_FAILED = "Error Saving Settings, please fix any errors";
public SettingsController(IConfigProvider configProvider, IIndexerProvider indexerProvider,
QualityProvider qualityProvider, IRootDirProvider rootDirProvider)
QualityProvider qualityProvider, RootDirProvider rootDirProvider)
{
_configProvider = configProvider;
_indexerProvider = indexerProvider;

Loading…
Cancel
Save