Describe the bug
Currently the facades are created by new within the ModuleController. When the facades requires dependencies they must be declared by public properties which are filled by the ServerModuleBase. This is no typicall DI because the facade is life-cycle independed. Whenn using #nullable' these public properties must be declard which the required` keyword, but then you get an issue in the ModuleController where the properties must be filled.
Ideas:
- Create facades by reflection to ignore compile-time issues of the propertiee. Maybe provide a
CreateFacade method in the module controller.
- ...
See here:
https://github.com/PHOENIXCONTACT/MORYX-Framework/blob/dev/src/Moryx.Operators.Management/Facade/OperatorManagementFacade.cs
Describe the bug
Currently the facades are created by
newwithin the ModuleController. When the facades requires dependencies they must be declared by public properties which are filled by theServerModuleBase. This is no typicall DI because the facade is life-cycle independed. Whenn using#nullable' these public properties must be declard which therequired` keyword, but then you get an issue in the ModuleController where the properties must be filled.Ideas:
CreateFacademethod in the module controller.See here:
https://github.com/PHOENIXCONTACT/MORYX-Framework/blob/dev/src/Moryx.Operators.Management/Facade/OperatorManagementFacade.cs