From 053fdc8c2db6af95f1aa504c07011b917fd89a82 Mon Sep 17 00:00:00 2001 From: Sascha Priefer Date: Tue, 30 Apr 2024 13:05:55 +0200 Subject: [PATCH] Change order of activation of the notification facade. Facade must be ready before resources are starting to allow publish notification during OnStart(). --- .../ModuleController/ModuleController.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Moryx.Resources.Management/ModuleController/ModuleController.cs b/src/Moryx.Resources.Management/ModuleController/ModuleController.cs index 8b210a28..86e04937 100644 --- a/src/Moryx.Resources.Management/ModuleController/ModuleController.cs +++ b/src/Moryx.Resources.Management/ModuleController/ModuleController.cs @@ -95,6 +95,8 @@ protected override void OnInitialize() /// protected override void OnStart() { + ActivateFacade(_notificationSourceFacade); + // Start type controller for resource and proxy creation Container.Resolve().Start(); @@ -106,7 +108,6 @@ protected override void OnStart() resourceManager.Start(); // Activate external facade to register events - ActivateFacade(_notificationSourceFacade); ActivateFacade(_resourceManagementFacade); } @@ -116,11 +117,12 @@ protected override void OnStart() protected override void OnStop() { // Tear down facades - DeactivateFacade(_notificationSourceFacade); DeactivateFacade(_resourceManagementFacade); var resourceManager = Container.Resolve(); resourceManager.Stop(); + + DeactivateFacade(_notificationSourceFacade); } private readonly ResourceManagementFacade _resourceManagementFacade = new ResourceManagementFacade();