refactor: consolidate duplicated reactive plumbing#4418
Merged
Conversation
- Share notification, view-contract, and WinUI host subscription mechanics. - Reuse expression validation and command-binding construction paths.
glennawatson
marked this pull request as ready for review
July 25, 2026 23:47
ChrisPulman
approved these changes
Jul 25, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4418 +/- ##
==========================================
+ Coverage 93.15% 93.35% +0.19%
==========================================
Files 345 347 +2
Lines 14965 14921 -44
Branches 1568 1553 -15
==========================================
- Hits 13941 13929 -12
+ Misses 752 731 -21
+ Partials 272 261 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Centralize WinUI host initialization to remove duplicate blocks. - Cover view contracts, expression validation, and command overloads.
|
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.



What kind of change does this PR introduce?
Refactor.
What is the new behavior?
Reactive notification initialization, view-contract streams, WinUI host subscriptions, command-binding validation, and observable-property expression validation now reuse shared helpers. Runtime behavior and the public API remain unchanged.
What is the current behavior?
Equivalent implementation blocks are repeated across reactive objects, WPF and WinUI hosts, command-binding overloads, and observable-property helpers. SonarCloud reports those blocks as duplicated new code.
What might this PR break?
None expected. The shared source remains linked into the same WPF and WinUI target-framework paths.
Checklist
mainbranchAdditional information
Verification:
dotnet build reactiveui.slnx -c Release --no-restore(0 warnings, 0 errors)dotnet test --solution reactiveui.slnx -c Release --no-build(33,404 passed, 0 failed, 0 skipped)