Skip to content

Commit

Permalink
Merge pull request #224 from dacky179/PrepareNotificationFacadeEarlier
Browse files Browse the repository at this point in the history
Fix problem while publishing notifications during OnStart
  • Loading branch information
Toxantron authored May 6, 2024
2 parents 38d8975 + 053fdc8 commit db3eeb4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ protected override void OnInitialize()
/// </summary>
protected override void OnStart()
{
ActivateFacade(_notificationSourceFacade);

// Start type controller for resource and proxy creation
Container.Resolve<IResourceTypeController>().Start();

Expand All @@ -106,7 +108,6 @@ protected override void OnStart()
resourceManager.Start();

// Activate external facade to register events
ActivateFacade(_notificationSourceFacade);
ActivateFacade(_resourceManagementFacade);
}

Expand All @@ -116,11 +117,12 @@ protected override void OnStart()
protected override void OnStop()
{
// Tear down facades
DeactivateFacade(_notificationSourceFacade);
DeactivateFacade(_resourceManagementFacade);

var resourceManager = Container.Resolve<IResourceManager>();
resourceManager.Stop();

DeactivateFacade(_notificationSourceFacade);
}

private readonly ResourceManagementFacade _resourceManagementFacade = new ResourceManagementFacade();
Expand Down

0 comments on commit db3eeb4

Please sign in to comment.