post grab notification and updates are now using the new EventAggregator

This commit is contained in:
kay.one
2013-02-24 11:18:48 -08:00
parent 13658e3c6d
commit 554924a522
40 changed files with 670 additions and 482 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ namespace NzbDrone.Common.Eventing
_handlers = handlers;
}
public void Publish<TEvent>(TEvent message)
public void Publish<TEvent>(TEvent message) where TEvent : IEvent
{
_logger.Trace("Publishing {0}", message.GetType().Name);
+8
View File
@@ -0,0 +1,8 @@
using System.Linq;
namespace NzbDrone.Common.Eventing
{
public interface IEvent
{
}
}
+1 -1
View File
@@ -8,6 +8,6 @@ namespace NzbDrone.Common.Eventing
/// </summary>
public interface IEventAggregator
{
void Publish<TEvent>(TEvent message);
void Publish<TEvent>(TEvent message) where TEvent : IEvent;
}
}
+3 -3
View File
@@ -5,14 +5,14 @@ namespace NzbDrone.Common.Eventing
/// <summary>
/// Denotes a class which can handle a particular type of message.
/// </summary>
/// <typeparam name = "TMessage">The type of message to handle.</typeparam>
public interface IHandle<TMessage> : IHandle
/// <typeparam name = "TEvent">The type of message to handle.</typeparam>
public interface IHandle<TEvent> : IHandle where TEvent : IEvent
{
/// <summary>
/// Handles the message.
/// </summary>
/// <param name = "message">The message.</param>
void Handle(TMessage message);
void Handle(TEvent message);
}
/// <summary>
+1
View File
@@ -111,6 +111,7 @@
<Compile Include="EnsureThat\StringExtensions.cs" />
<Compile Include="EnsureThat\TypeParam.cs" />
<Compile Include="Eventing\EventAggregator.cs" />
<Compile Include="Eventing\IEvent.cs" />
<Compile Include="Eventing\IEventAggregator.cs" />
<Compile Include="Eventing\IHandle.cs" />
<Compile Include="HostController.cs" />