added commands.

they can be triggered using the api

api/command/
This commit is contained in:
Keivan Beigi 2013-04-26 19:03:34 -07:00
commit 182192e0ba
31 changed files with 265 additions and 74 deletions

View file

@ -30,7 +30,7 @@ namespace NzbDrone.Api
AutomapperBootstraper.InitializeAutomapper();
RegisterReporting(container);
container.Resolve<IMessageAggregator>().Publish(new ApplicationStartedEvent());
container.Resolve<IMessageAggregator>().PublishEvent(new ApplicationStartedEvent());
ApplicationPipelines.OnError.AddItemToEndOfPipeline(container.Resolve<ErrorPipeline>().HandleException);
}
@ -73,7 +73,7 @@ namespace NzbDrone.Api
public void Shutdown()
{
ApplicationContainer.Resolve<IMessageAggregator>().Publish(new ApplicationShutdownRequested());
ApplicationContainer.Resolve<IMessageAggregator>().PublishEvent(new ApplicationShutdownRequested());
}
}
}