Skip to content

Conversation

@ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

update

What is the new behavior?

Updated all usages of Locator.Current and Locator.CurrentMutable to AppLocator.Current and AppLocator.CurrentMutable across the codebase. This change standardizes dependency resolution and improves clarity regarding the application's service locator.

What might this PR break?

Locator usage replaced with underlying AppLocator, not expecting breaking change

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:

Updated all usages of Locator.Current and Locator.CurrentMutable to AppLocator.Current and AppLocator.CurrentMutable across the codebase. This change standardizes dependency resolution and improves clarity regarding the application's service locator.
Copy link

Copilot AI left a comment

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 refactors the ReactiveUI codebase to replace Locator.Current and Locator.CurrentMutable with AppLocator.Current and AppLocator.CurrentMutable from the Splat dependency injection library. This standardizes dependency resolution throughout the framework. However, the PR also includes several unrelated changes to project files and documentation that should ideally be in separate PRs.

Key Changes

  • Consistent replacement of Locator with AppLocator across all ReactiveUI core, WPF, Winforms, and MAUI platform implementations
  • Removal of Windows 10.0.17763.0 platform support from project files (unrelated change)
  • Removal of several PackageReference elements for netstandard (unrelated change)
  • Documentation updates to DispatcherScheduler.cs (unrelated change)

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/ReactiveUI/View/ViewLocator.cs Updated to use AppLocator.Current for resolving IViewLocator
src/ReactiveUI/View/DefaultViewLocator.cs Updated to use AppLocator.Current for service resolution
src/ReactiveUI/Suspension/SuspensionHostExtensions.cs Updated to use AppLocator.Current for resolving ISuspensionDriver
src/ReactiveUI/ReactiveUI.csproj Removed Windows 10.0.17763.0 support and netstandard PackageReferences (unrelated to main PR purpose)
src/ReactiveUI/Mixins/ReactiveNotifyPropertyChangedMixin.cs Updated to use AppLocator.Current for resolving ICreatesObservableForProperty services
src/ReactiveUI/Mixins/DependencyResolverMixins.cs Updated comments and code references from Locator to AppLocator
src/ReactiveUI/Bindings/Property/PropertyBinderImplementation.cs Updated to use AppLocator.Current for resolving binding converters and hooks
src/ReactiveUI/Bindings/Command/CreatesCommandBinding.cs Updated to use AppLocator.Current for resolving ICreatesCommandBinding services
src/ReactiveUI/Bindings/Command/CommandBinder.cs Updated to use AppLocator.Current for resolving ICommandBinderImplementation
src/ReactiveUI/Activation/ViewForMixins.cs Updated to use AppLocator.Current for resolving IActivationForViewFetcher services
src/ReactiveUI.Wpf/Rx/Concurrency/DispatcherScheduler.cs Changed class documentation format (unrelated to main PR purpose)
src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj Removed Windows 10.0.17763.0 conditional compilation (unrelated to main PR purpose)
src/ReactiveUI.Wpf/Common/ViewModelViewHost.cs Updated to use AppLocator.Current for resolving IPlatformOperations
src/ReactiveUI.Wpf/Common/RoutedViewHost.cs Updated to use AppLocator.Current for resolving IPlatformOperations
src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj Removed Windows 10.0.17763.0 conditional compilation (unrelated to main PR purpose)
src/ReactiveUI.Maui/RoutedViewHost.cs Updated to use AppLocator.Current for resolving IScreen
src/ReactiveUI.Maui/ReactiveShellContent.cs Updated to use AppLocator.Current for view resolution and null checks
src/ReactiveUI.Maui/Common/ViewModelViewHost.cs Updated to use AppLocator.Current for resolving IPlatformOperations
src/ReactiveUI.Maui/Common/RoutedViewHost.cs Updated to use AppLocator.Current for resolving IPlatformOperations

@ChrisPulman ChrisPulman enabled auto-merge (squash) December 4, 2025 23:03
@ChrisPulman ChrisPulman merged commit 8451c8c into main Dec 5, 2025
13 of 14 checks passed
@ChrisPulman ChrisPulman deleted the UpdateSplat branch December 5, 2025 19:07
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 38.88889% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.94%. Comparing base (3bfb979) to head (dbf97dd).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/ReactiveUI.Maui/ReactiveShellContent.cs 0.00% 4 Missing ⚠️
...activeUI/Bindings/Command/CreatesCommandBinding.cs 0.00% 2 Missing ⚠️
src/ReactiveUI.Maui/RoutedViewHost.cs 0.00% 1 Missing ⚠️
src/ReactiveUI/Bindings/Command/CommandBinder.cs 0.00% 1 Missing ⚠️
src/ReactiveUI/Mixins/DependencyResolverMixins.cs 0.00% 0 Missing and 1 partial ⚠️
.../ReactiveUI/Suspension/SuspensionHostExtensions.cs 50.00% 1 Missing ⚠️
src/ReactiveUI/View/ViewLocator.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4217   +/-   ##
=======================================
  Coverage   33.94%   33.94%           
=======================================
  Files         145      145           
  Lines        6269     6269           
  Branches      945      945           
=======================================
  Hits         2128     2128           
  Misses       3973     3973           
  Partials      168      168           

☔ 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.

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