[Server] Add several interfaces to improve testability & prepare for Dependency Injection#3448
Merged
marcschier merged 4 commits intomasterfrom Jan 12, 2026
Merged
Conversation
…nager, IStandardServer, IApplicationInstance interfaces to Server. Add IMainNodeManagerFactory to create Diagnostics & MainNodeManager
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds several interfaces to improve testability and prepare for Dependency Injection in the OPC UA .NET Standard Server implementation. The changes introduce interface abstractions for key server components including StandardServer, MasterNodeManager, and various NodeManager types.
Changes:
- Added six new interfaces: IStandardServer, IMasterNodeManager, IMainNodeManagerFactory, ICoreNodeManager, IDiagnosticsNodeManager, and IConfigurationNodeManager
- Modified existing classes to implement these new interfaces
- Changed return types from concrete classes to interfaces in multiple methods
- Added IApplicationInstance interface for ApplicationInstance class
- Introduced MainNodeManagerFactory to support factory-based instantiation
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 29 comments.
Show a summary per file
| File | Description |
|---|---|
| Libraries/Opc.Ua.Server/Server/IStandardServer.cs | New interface defining the standard server contract |
| Libraries/Opc.Ua.Server/Server/StandardServer.cs | Implements IStandardServer, adds factory creation pattern for node managers |
| Libraries/Opc.Ua.Server/NodeManager/IMasterNodeManager.cs | New interface for master node manager with comprehensive API surface |
| Libraries/Opc.Ua.Server/NodeManager/MasterNodeManager.cs | Implements IMasterNodeManager, uses factory for creating core node managers |
| Libraries/Opc.Ua.Server/NodeManager/IMainNodeManagerFactory.cs | New factory interface for creating main node managers |
| Libraries/Opc.Ua.Server/NodeManager/MainNodeManagerFactory.cs | Factory implementation for creating ConfigurationNodeManager and CoreNodeManager |
| Libraries/Opc.Ua.Server/NodeManager/ICoreNodeManager.cs | New interface for core node manager |
| Libraries/Opc.Ua.Server/NodeManager/CoreNodeManager.cs | Implements ICoreNodeManager, fixes lock usage, makes ImportNodes public |
| Libraries/Opc.Ua.Server/Diagnostics/IDiagnosticsNodeManager.cs | New interface for diagnostics node manager |
| Libraries/Opc.Ua.Server/Diagnostics/DiagnosticsNodeManager.cs | Implements IDiagnosticsNodeManager, changes method visibility |
| Libraries/Opc.Ua.Server/Configuration/IConfigurationNodeManager.cs | New interface for configuration node manager |
| Libraries/Opc.Ua.Server/Configuration/ConfigurationNodeManager.cs | Implements IConfigurationNodeManager |
| Libraries/Opc.Ua.Server/Server/IServerInternal.cs | Adds MainNodeManagerFactory and ConfigurationNodeManager properties, uses interface types |
| Libraries/Opc.Ua.Server/Server/ServerInternalData.cs | Uses interface types, adds MainNodeManagerFactory support |
| Libraries/Opc.Ua.Configuration/IApplicationInstance.cs | New interface for application instance |
| Libraries/Opc.Ua.Configuration/ApplicationInstance.cs | Implements IApplicationInstance, uses IServerBase |
| Tests/Opc.Ua.Client.Tests/ReferenceServerWithLimits.cs | Updates CreateMasterNodeManager to return interface type |
| Libraries/Opc.Ua.Gds.Server.Common/GlobalDiscoverySampleServer.cs | Updates CreateMasterNodeManager to return interface type |
| Applications/Quickstarts.Servers/Utils.cs | Updates method signatures to use IStandardServer |
| Applications/Quickstarts.Servers/ReferenceServer/ReferenceServer.cs | Updates CreateMasterNodeManager to return interface type |
13 tasks
marcschier
approved these changes
Jan 12, 2026
This was referenced Jan 29, 2026
Open
This was referenced Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Add IConfigurationNodeManager, IDiagnosticsNodeManager, IMasterNodeManager, IStandardServer, IApplicationInstance interfaces to Server. Add IMainNodeManagerFactory to create ConfigurationNodeManager & CoreNodeManager.
Types of changes
Checklist