Ensure Splat initialization in builder and tests #4110
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?
update
What is the new behavior?
This pull request refactors platform-specific builder extension methods for Blazor and AndroidX, consolidating them under the
ReactiveUI.Builder
namespace and updating their APIs for consistency and improved scheduler configuration. It also updates related tests to use the new builder creation method, streamlining service registration and test setup. Minor dependency and warning suppression updates are included.Platform Extension Refactor and Consolidation:
BlazorReactiveUIBuilderExtensions
andAndroidXReactiveUIBuilderExtensions
in theReactiveUI.Builder
namespace, providing consistent APIs for configuring platform schedulers and modules. These replace the older extension files and introduce properties for main thread schedulers.ReactiveUIBuilderBlazorExtensions.cs
andReactiveUIBuilderAndroidXExtensions.cs
from platform-specific namespaces, migrating their functionality to the new consolidated location.Test Suite Modernization:
locator.CreateReactiveUIBuilder()
instead of the previouslocator.CreateBuilder()
method, and replaced direct calls toAppBuilder.ResetBuilderStateForTests()
withSplat.Builder.AppBuilder.ResetBuilderStateForTests()
. This change ensures tests use the new builder API and maintain proper isolation.Dependency and Warning Updates:
SplatVersion
property inDirectory.Packages.props
from15.5.3
to16.0.1
to use the latest version.CA1510
to theNoWarn
property inDirectory.build.props
to suppress a new code analysis warning.AOT Test Initialization:
RxApp.EnsureInitialized()
is called in the constructor ofViewLocatorAOTMappingTests
to guarantee ReactiveUI is initialized for AOT mapping tests.What might this PR break?
N/A new unreleased feature
Please check if the PR fulfills these requirements
Other information: