Removed INotificationProvider

pull/2/head
Mark McDowall 14 years ago
parent 4426072232
commit bd0a7a58dd

@ -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();

@ -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" />

@ -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>();

@ -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);
}
}

@ -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>();

@ -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;

@ -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;
}

Loading…
Cancel
Save