Skip to content

Support reading selected fields from DOM instances - #60

Merged
TomW-Skyline merged 7 commits into
mainfrom
feature/read-selected-fields
Sep 8, 2026
Merged

TomW-Skyline merged 7 commits into
mainfrom
feature/read-selected-fields

Conversation

@TomW-Skyline

@TomW-Skyline TomW-Skyline commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

AB#46696

Add support for the DataMiner 10.6.0/10.6.1 'reading selected fields' API, which reads only a subset of fields from DomInstance objects instead of the full instances.

  • Bump Skyline.DataMiner.Dev.Common to 10.6.1
  • Handle ManagerStoreSelectReadRequest, ManagerStoreSelectStartPagingRequest and ManagerStoreSelectNextPagingRequest in DomSLNetMessageHandler, so partial reads can be mocked in unit tests
  • Add SelectedFieldsEvaluator which executes the selected exposers on the in-memory instances and builds the PartialObjectData results
  • Add ReadPaged extension methods for ISelectHelperComponent
  • Document the feature in the README

Add support for the DataMiner 10.6.0/10.6.1 'reading selected fields'
API, which reads only a subset of fields from DomInstance objects
instead of the full instances.

- Bump Skyline.DataMiner.Dev.Common to 10.6.1
- Handle ManagerStoreSelectReadRequest, ManagerStoreSelectStartPagingRequest
  and ManagerStoreSelectNextPagingRequest in DomSLNetMessageHandler, so
  partial reads can be mocked in unit tests
- Add SelectedFieldsEvaluator which executes the selected exposers on the
  in-memory instances and builds the PartialObjectData results
- Add ReadPaged extension methods for ISelectHelperComponent
- Document the feature in the README

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TomW-Skyline TomW-Skyline self-assigned this Sep 7, 2026
TomW-Skyline and others added 5 commits September 7, 2026 10:04
Cover additional cases for reading selected fields from DOM instances:
FieldValues exposer rejection, list-typed base exposers, explicit Id
selection, an empty SelectedFields collection, sorted queries and
filtering on a field value combined with a selection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mirror the fail-safe behavior of a real DataMiner Agent and of
CoercingFilterEvaluator: a selected field that cannot be read from an
instance is reported as having no value instead of failing the read.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bind a generic factory method once per value type instead of creating the
instance and setting its properties through reflection on every call.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…dAll

Also strengthen the selected fields tests: assert that the sort order of a
query is applied, that a definition filter is applied and that fields that
weren't selected are not returned.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Updated MSTest.Sdk from 3.9.1 to 4.4.0.
Updated FluentAssertions from 7.2.0 to 7.2.2.
Updated Moq from 4.18.4 to 4.20.72.
@TomW-Skyline
TomW-Skyline marked this pull request as ready for review September 7, 2026 10:08
@TomW-Skyline
TomW-Skyline requested a lite review from Copilot September 7, 2026 10:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There is at least one confirmed compile-time issue in the new GetByID(..., SelectedFields<DomInstance>) overload (Guid compared to null) that must be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds support for DataMiner 10.6.x “reading selected fields” for DOM instance reads, including unit-test mocking behavior and new helper extensions for paged partial reads.

Changes:

  • Bumps Skyline.DataMiner.Dev.Common to 10.6.1 and updates test dependencies.
  • Extends the unit-testing SLNet handler to support select-read and select-paging messages, backed by an in-memory selected-fields evaluator.
  • Adds new extensions and documentation for selected-fields reads (including paged reads) plus new test coverage.
File summaries
File Description
Utils.DOM/Utils.DOM.csproj Updates dependency version to enable the 10.6.x selected-fields API surface.
Utils.DOM/UnitTesting/Querying/SelectedFieldsEvaluator.cs New evaluator to produce PartialObjectData from in-memory DomInstance objects based on selected exposers.
Utils.DOM/UnitTesting/DomSLNetMessageHandler.cs Adds handling for select-read and select-paging SLNet messages for unit-test mocking.
Utils.DOM/Extensions/DomInstanceExtensions.cs Adds overloads to read partial DOM instances by ID and by definition.
Utils.DOM/Extensions/CrudHelperComponentExtensions.cs Adds ReadPaged/ReadAllPaged overloads for ISelectHelperComponent to return partial objects.
Utils.DOM.Tests/Utils.DOM.Tests.csproj Updates test SDK and package references.
Utils.DOM.Tests/DomInstanceSelectedFieldsTests.cs Adds tests validating selected-fields reads and paging behavior.
README.md Documents the selected-fields feature and usage patterns.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Utils.DOM/Extensions/DomInstanceExtensions.cs Outdated
Comment thread Utils.DOM/Extensions/CrudHelperComponentExtensions.cs Outdated
Updated entity retrieval methods to check for Guid.Empty instead of null in DomDefinitionExtensions.cs, DomInstanceExtensions.cs, and SectionDefinitionExtensions.cs. Also applied minor formatting changes to the ReadPagedIterator method signature in CrudHelperComponentExtensions.cs.
@TomW-Skyline
TomW-Skyline requested a review from a team September 7, 2026 12:26
@TomW-Skyline TomW-Skyline removed their assignment Sep 7, 2026
@TomW-Skyline
TomW-Skyline merged commit a39e291 into main Sep 8, 2026
@TomW-Skyline
TomW-Skyline deleted the feature/read-selected-fields branch September 8, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants