replaced IInitializable interface with ApplicationStartedEvent

This commit is contained in:
Keivan Beigi
2013-04-09 17:47:04 -07:00
parent 5d1026ded2
commit a8a64a42b5
14 changed files with 92 additions and 90 deletions
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Net;
using NLog;
using NzbDrone.Common.Eventing;
using NzbDrone.Core.Lifecycle;
namespace NzbDrone.Core.Indexers.Newznab
@@ -15,7 +16,7 @@ namespace NzbDrone.Core.Indexers.Newznab
void Update(NewznabDefinition definition);
}
public class NewznabService : INewznabService, IInitializable
public class NewznabService : INewznabService, IHandle<ApplicationStartedEvent>
{
private readonly INewznabRepository _newznabRepository;
private readonly Logger _logger;
@@ -74,7 +75,7 @@ namespace NzbDrone.Core.Indexers.Newznab
}
public void Init()
public void Handle(ApplicationStartedEvent message)
{
var newznabIndexers = new List<NewznabDefinition>
{