From 4cbf1b010ec21576e82a99158e7f34d9e93fdd75 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 cbdb687bd..7f33b4777 100644 --- a/src/Moryx.Resources.Management/ModuleController/ModuleController.cs +++ b/src/Moryx.Resources.Management/ModuleController/ModuleController.cs @@ -68,6 +68,8 @@ protected override void OnInitialize() /// protected override void OnStart() { + ActivateFacade(_notificationSourceFacade); + // Start type controller for resource and proxy creation Container.Resolve().Start(); @@ -80,7 +82,6 @@ protected override void OnStart() // Activate external facade to register events ActivateFacade(_resourceTypeTreeFacade); - ActivateFacade(_notificationSourceFacade); ActivateFacade(_resourceManagementFacade); } @@ -91,11 +92,12 @@ protected override void OnStart() protected override void OnStop() { // Tear down facades - DeactivateFacade(_notificationSourceFacade); DeactivateFacade(_resourceManagementFacade); DeactivateFacade(_resourceTypeTreeFacade); var resourceManager = Container.Resolve(); resourceManager.Stop(); + + DeactivateFacade(_notificationSourceFacade); } private readonly ResourceManagementFacade _resourceManagementFacade = new ResourceManagementFacade();