Skip to content

Add BuildApp and WithInstance methods to builder#4124

Merged
glennawatson merged 12 commits into
mainfrom
CP_ExtendBuilderMethods
Sep 23, 2025
Merged

Add BuildApp and WithInstance methods to builder#4124
glennawatson merged 12 commits into
mainfrom
CP_ExtendBuilderMethods

Conversation

@ChrisPulman

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

feature update

What is the new behavior?

Introduces BuildApp for building and returning a ReactiveUI instance, and adds a set of WithInstance methods supporting up to 16 generic parameters to resolve and pass services to actions for chaining. These additions improve the flexibility and usability of the ReactiveUIBuilder API.

What might this PR break?

None

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

Introduces BuildApp for building and returning a ReactiveUI instance, and adds a set of WithInstance methods supporting up to 16 generic parameters to resolve and pass services to actions for chaining. These additions improve the flexibility and usability of the ReactiveUIBuilder API.
Copilot AI review requested due to automatic review settings September 8, 2025 07:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a BuildApp method to the ReactiveUI builder that builds and returns a ReactiveUIInstance wrapper, along with a comprehensive set of WithInstance methods supporting 1-16 generic parameters for dependency injection chaining. This enhances the builder API's flexibility by allowing fluent method chaining with resolved services.

Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs Outdated
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs
Comment thread src/ReactiveUI/Builder/ReactiveUIBuilder.cs
ChrisPulman and others added 11 commits September 8, 2025 09:45
Corrects the usage of GetService<T>() in ReactiveUIBuilder to remove unnecessary nullable type arguments, ensuring proper service resolution. Also updates Splat to 16.2.1 and Reactive.Wasm to 3.0.1 in Directory.Packages.props.
Eliminated unnecessary <exception cref="System.ArgumentNullException"> documentation from WithInstance method overloads and BuildApp in ReactiveUIBuilder.cs to reduce clutter and improve code readability.
Introduces the BuildApp method for building the application and returning an IReactiveUIInstance. Adds overloaded WithInstance methods supporting up to 16 generic parameters, allowing resolution of multiple instances and passing them to actions for chaining.
@codecov

codecov Bot commented Sep 23, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.89286% with 222 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.85%. Comparing base (20528f1) to head (110950a).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/ReactiveUI/Builder/ReactiveUIBuilder.cs 0.45% 219 Missing ⚠️
...lazor/Builder/BlazorReactiveUIBuilderExtensions.cs 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4124      +/-   ##
==========================================
- Coverage   38.03%   35.85%   -2.19%     
==========================================
  Files         132      138       +6     
  Lines        5489     5887     +398     
  Branches      825      885      +60     
==========================================
+ Hits         2088     2111      +23     
- Misses       3188     3614     +426     
+ Partials      213      162      -51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glennawatson glennawatson merged commit a9fa39c into main Sep 23, 2025
4 of 6 checks passed
@glennawatson glennawatson deleted the CP_ExtendBuilderMethods branch September 23, 2025 05:59
@github-actions

github-actions Bot commented Oct 8, 2025

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants