[XRegistry] Allow clients to use explicit registry roots - #4130
Open
marcschier wants to merge 10 commits into
Open
[XRegistry] Allow clients to use explicit registry roots#4130marcschier wants to merge 10 commits into
marcschier wants to merge 10 commits into
Conversation
Let the xRegistry client base accept an optional registry root NodeId and keep the well-known Object as the default for existing callers. This lets generic or derived clients bind to registries whose root Object was discovered separately without changing the proxy-based lifecycle helpers. Add a GenericXRegistryClient constructor for the explicit-root path and cover both the supplied-root and default-root behavior in the xRegistry client tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9e6a5abf-3299-4cd1-9855-010fedbf0ad8
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds support for constructing xRegistry clients with an explicit registry root NodeId, while preserving the existing well-known-root default.
Changes:
- Introduced a new
XRegistryClientprotected constructor overload that accepts an explicitregistryNodeIdand storesRegistryNodeIdas an initialized property. - Added a matching overload on
GenericXRegistryClientto expose explicit-root usage to callers. - Extended tests to cover explicit-root selection, null-root fallback, and lifecycle call routing to the supplied root.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Opc.Ua.XRegistry.Tests/XRegistryClientTests.cs | Adds coverage for explicit root selection/fallback and verifies lifecycle methods target the supplied root. |
| src/Opc.Ua.XRegistry.Client/XRegistryClient.cs | Adds constructor overload taking an explicit root NodeId and changes RegistryNodeId to be set at construction. |
| src/Opc.Ua.XRegistry.Client/GenericXRegistryClient.cs | Exposes the explicit-root constructor overload for the sealed generic client. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4130 +/- ##
==========================================
- Coverage 80.18% 79.92% -0.27%
==========================================
Files 1514 1515 +1
Lines 209245 209986 +741
Branches 36008 36214 +206
==========================================
+ Hits 167789 167829 +40
- Misses 28878 29561 +683
- Partials 12578 12596 +18
🚀 New features to boost your workflow:
|
Add an explicit captured-call count assertion before the test indexes the first call. This keeps regressions failing with a meaningful NUnit assertion instead of an ArgumentOutOfRangeException. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9e6a5abf-3299-4cd1-9855-010fedbf0ad8
…r/wot-09-xregistry-client
marcschier
changed the base branch from
master
to
marcschier/wot-07-subscription-transfer
August 1, 2026 11:55
…r/wot-09-xregistry-client
…ransfer' into marcschier/wot-09-xregistry-client
…ransfer' into marcschier/wot-09-xregistry-client
…ransfer' into marcschier/wot-09-xregistry-client
…ransfer' into marcschier/wot-09-xregistry-client
…ransfer' into marcschier/wot-09-xregistry-client
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.
This extracts the xRegistry client generalisation from #4093 as PR 9 of the stacked split into independently reviewable pieces.
The change lets the xRegistry client base accept an explicit registry root NodeId while preserving the existing well-known-root default. GenericXRegistryClient exposes the same explicit-root path so callers can drive registries whose root Object is discovered separately, and the tests cover the supplied-root and fallback behavior across the lifecycle helpers.
This PR is independent of the other stack PRs and contains no WoT registry implementation or Opc.Ua.WotCon.* references. A later PR adds the WoT registry client on top of this general xRegistry client surface.