Class AppBuilder
A builder class for configuring ReactiveUI without using reflection. This provides an AOT-compatible alternative to the reflection-based InitializeReactiveUI method.
- Inheritance
-
App
Builder
- Implements
- Derived
- Extension Methods
Constructors
AppBuilder(IMutableDependencyResolver, IReadonlyDependencyResolver?)
Initializes a new instance of the App
Parameters
resolverIMutableDependency Resolver The dependency resolver to configure.
currentIReadonlyDependency Resolver The configured services.
Exceptions
- Argument
Null Exception resolver.
Properties
Current
Gets the current services.
Property Value
- IReadonly
Dependency Resolver The services.
CurrentMutable
Gets the mutable service registrar.
Property Value
- IMutable
Dependency Resolver The current mutable.
HasBeenBuilt
Gets a value indicating whether this instance has been built.
Property Value
- bool
trueif this instance has been built; otherwise,false.
UsingBuilder
Gets a value indicating whether the application builder is being used.
Property Value
- bool
trueif using the application builder; otherwise,false.
Methods
Build()
Builds and applies all registrations to the dependency resolver.
Returns
- IApp
Instance An App Instance.
CreateSplatBuilder()
Creates a Splat builder with the Splat Locator instance using the current mutable resolver.
Returns
- App
Builder The builder instance for chaining.
ResetBuilderStateForTests()
Resets the builder state for tests, ONLY if the builder is being used in a unit test environment.
UseCurrentSplatLocator()
Direct the builder to use the current Splat Locator (Locator.CurrentMutable) for subsequent registrations. This is useful when configuring an external container (e.g., Autofac, DryIoc, Microsoft.Extensions.DependencyInjection) as the Splat dependency resolver prior to applying ReactiveUI registrations.
Returns
- IApp
Builder The builder instance for chaining.
UsingModule<T>(T)
Using the splat module.
Parameters
registrationModuleTThe registration module to add.
Returns
- IApp
Builder The builder instance for method chaining.
Type Parameters
TThe Splat Module Type.
WithCoreServices()
Registers the core ReactiveUI services.
Returns
- IApp
Builder The builder instance for method chaining.
WithCustomRegistration(Action<IMutableDependencyResolver>)
Registers a custom registration action.
Parameters
configureActionAction<IMutableDependency >Resolver The configuration action to add.
Returns
- IApp
Builder The builder instance for method chaining.