1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-28 10:51:48 +00:00
Radarr/NzbDrone.Core/Instrumentation/LogService.cs
2013-06-04 17:49:53 -07:00

37 lines
No EOL
794 B
C#

using System.Linq;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.Instrumentation
{
public interface ILogService
{
void DeleteAll();
void Trim();
PagingSpec<Log> Paged(PagingSpec<Log> pagingSpec);
}
public class LogService : ILogService
{
private readonly ILogRepository _logRepository;
public LogService(ILogRepository logRepository)
{
_logRepository = logRepository;
}
public void DeleteAll()
{
_logRepository.Purge();
}
public void Trim()
{
_logRepository.Trim();
}
public PagingSpec<Log> Paged(PagingSpec<Log> pagingSpec)
{
return _logRepository.GetPaged(pagingSpec);
}
}
}