mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-29 02:55:38 +00:00
44 lines
897 B
C#
44 lines
897 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using NzbDrone.Core.Repository;
|
|||
|
using SubSonic.Repository;
|
|||
|
|
|||
|
namespace NzbDrone.Core.Providers
|
|||
|
{
|
|||
|
public class RootDirProvider : IRootDirProvider
|
|||
|
{
|
|||
|
private readonly IRepository _sonioRepo;
|
|||
|
|
|||
|
public RootDirProvider(IRepository sonicRepo)
|
|||
|
{
|
|||
|
_sonioRepo = sonicRepo;
|
|||
|
}
|
|||
|
|
|||
|
#region IRootDirProvider
|
|||
|
|
|||
|
public List<RootDir> GetAll()
|
|||
|
{
|
|||
|
return _sonioRepo.All<RootDir>().ToList();
|
|||
|
}
|
|||
|
|
|||
|
public void Add(RootDir rootDir)
|
|||
|
{
|
|||
|
_sonioRepo.Add(rootDir);
|
|||
|
}
|
|||
|
|
|||
|
public void Remove(int rootDirId)
|
|||
|
{
|
|||
|
_sonioRepo.Delete<RootDir>(rootDirId);
|
|||
|
}
|
|||
|
|
|||
|
public void Update(RootDir rootDir)
|
|||
|
{
|
|||
|
_sonioRepo.Update(rootDir);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|