Skip to content

Commit

Permalink
Merge pull request #503 from PHOENIXCONTACT/feature/implement-lifecyc…
Browse files Browse the repository at this point in the history
…lebound

Allow Resource Management facade to notify when module is available (running)
  • Loading branch information
Toxantron authored Dec 6, 2024
2 parents 84fb9f2 + 7c24221 commit e3f3f44
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Moryx.Resources.Management
{
internal class ResourceManagementFacade : IResourceManagement, IFacadeControl
internal class ResourceManagementFacade : FacadeBase, IResourceManagement
{
#region Dependency Injection

Expand All @@ -22,19 +22,17 @@ internal class ResourceManagementFacade : IResourceManagement, IFacadeControl
#endregion

#region IFacadeControl
/// <see cref="IFacadeControl.ValidateHealthState"/>
public Action ValidateHealthState { get; set; }

/// <seealso cref="IFacadeControl"/>
public void Activate()
public override void Activate()
{
Manager.ResourceAdded += OnResourceAdded;
Manager.CapabilitiesChanged += OnCapabilitiesChanged;
Manager.ResourceRemoved += OnResourceRemoved;
}

/// <seealso cref="IFacadeControl"/>
public void Deactivate()
public override void Deactivate()
{
Manager.ResourceAdded -= OnResourceAdded;
Manager.CapabilitiesChanged -= OnCapabilitiesChanged;
Expand Down

0 comments on commit e3f3f44

Please # to comment.