1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 01:37:07 +00:00

Removed INotificationProvider

This commit is contained in:
Mark McDowall 2011-04-08 16:48:47 -07:00
parent 4426072232
commit bd0a7a58dd
7 changed files with 7 additions and 30 deletions

View file

@ -76,7 +76,7 @@ namespace NzbDrone.Core
_kernel.Bind<ISyncProvider>().To<SyncProvider>().InSingletonScope();
_kernel.Bind<IIndexerProvider>().To<IndexerProvider>().InSingletonScope();
_kernel.Bind<IRenameProvider>().To<RenameProvider>().InSingletonScope();
_kernel.Bind<INotificationProvider>().To<NotificationProvider>().InSingletonScope();
_kernel.Bind<NotificationProvider>().To<NotificationProvider>().InSingletonScope();
_kernel.Bind<ILogProvider>().To<LogProvider>().InSingletonScope();
_kernel.Bind<IMediaFileProvider>().To<MediaFileProvider>().InSingletonScope();
_kernel.Bind<TimerProvider>().To<TimerProvider>().InSingletonScope();

View file

@ -203,7 +203,6 @@
<Compile Include="Parser.cs" />
<Compile Include="Providers\Fakes\FakeNotificationProvider.cs" />
<Compile Include="Providers\IMediaFileProvider.cs" />
<Compile Include="Providers\INotificationProvider.cs" />
<Compile Include="Providers\ISyncProvider.cs" />
<Compile Include="Providers\MediaFileProvider.cs" />
<Compile Include="Providers\SyncProvider.cs" />

View file

@ -4,7 +4,7 @@ using NzbDrone.Core.Model.Notification;
namespace NzbDrone.Core.Providers.Fakes
{
class FakeNotificationProvider : INotificationProvider
class FakeNotificationProvider
{
private readonly Dictionary<Guid, BasicNotification> _basicNotifications = new Dictionary<Guid, BasicNotification>();
private readonly Dictionary<Guid, ProgressNotification> _progressNotification = new Dictionary<Guid, ProgressNotification>();

View file

@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using NzbDrone.Core.Model.Notification;
namespace NzbDrone.Core.Providers
{
public interface INotificationProvider
{
void Register(ProgressNotification notification);
void Register(BasicNotification notification);
List<BasicNotification> BasicNotifications { get; }
List<ProgressNotification> GetProgressNotifications { get; }
/// <summary>
/// Dismisses a notification based on its ID.
/// </summary>
/// <param name="notificationId">notification id.</param>
void Dismiss(Guid notificationId);
}
}

View file

@ -5,7 +5,7 @@ using NzbDrone.Core.Model.Notification;
namespace NzbDrone.Core.Providers
{
class NotificationProvider : INotificationProvider
public class NotificationProvider
{
private readonly Dictionary<Guid, BasicNotification> _basicNotifications = new Dictionary<Guid, BasicNotification>();
private Dictionary<Guid, ProgressNotification> _progressNotification = new Dictionary<Guid, ProgressNotification>();

View file

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Providers
private readonly ISeriesProvider _seriesProvider;
private readonly IEpisodeProvider _episodeProvider;
private readonly IMediaFileProvider _mediaFileProvider;
private readonly INotificationProvider _notificationProvider;
private readonly NotificationProvider _notificationProvider;
private readonly IDiskProvider _diskProvider;
private ProgressNotification _seriesSyncNotification;
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Providers
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public SyncProvider(ISeriesProvider seriesProvider, IEpisodeProvider episodeProvider,
IMediaFileProvider mediaFileProvider, INotificationProvider notificationProvider,
IMediaFileProvider mediaFileProvider, NotificationProvider notificationProvider,
IDiskProvider diskProvider)
{
_seriesProvider = seriesProvider;

View file

@ -9,11 +9,11 @@ namespace NzbDrone.Web.Controllers
{
public class NotificationController : Controller
{
private readonly INotificationProvider _notifications;
private readonly NotificationProvider _notifications;
//
// GET: /Notification/
public NotificationController(INotificationProvider notificationProvider)
public NotificationController(NotificationProvider notificationProvider)
{
_notifications = notificationProvider;
}