IReactiveUIBuilder interface¶
Defined in
Namespace: ReactiveUI.Reactive.Builder
Assembly: ReactiveUI.Reactive.dll
Full name: ReactiveUI.Reactive.Builder.IReactiveUIBuilder
Modifiers: public abstract
Summary¶
Fluent builder that configures ReactiveUI platform services, registrations, and schedulers before building an application instance.
Applies to
net10.0, net10.0-ios26.0, net10.0-android36.0, net10.0-maccatalyst26.0, net10.0-macos26.0, net10.0-tvos26.0, net9.0, net8.0, net462, net481
Class hierarchy
classDiagram
class IReactiveUIBuilder
class IAppBuilder {
<>
}
IAppBuilder <|.. IReactiveUIBuilder
Implements: IAppBuilder
Remarks¶
The builder wraps Builder primitives so apps can register views, view models, and platform modules using
a single fluent API. Most hosts call UseReactiveUI (MAUI) or services.AddReactiveUI() (generic host) internally, which
creates an IReactiveUIBuilder and then applies platform-specific extensions.
Examples¶
<![CDATA[
builder.UseReactiveUI(config =>
config
.WithPlatformServices()
.RegisterView<LoginView, LoginViewModel>()
.RegisterSingletonViewModel<AppShellViewModel>()
.WithRegistration(resolver =>
{
resolver.RegisterLazySingleton<IApiClient>(() => new ApiClient());
})
.BuildApp());
]]>
Methods¶
| Name | Summary |
|---|---|
| WithMessageBus | Configures the message bus. |
| ConfigureSuspensionDriver | Configures the suspension driver. |
| ConfigureViewLocator | Configures the view locator. |
| ForCustomPlatform | Fors the custom platform. |
| ForPlatforms | Fors the platforms. |
| RegisterSingletonView | Registers the singleton view. |
| RegisterSingletonViewModel | Registers the singleton view model. |
| RegisterView | Registers the view. |
| RegisterViewModel | Registers the view model. |
| RegisterConstantViewModel | Registers a constant instance of the specified view model type for use in the reactive UI builder. |
| WithMainThreadScheduler | Withes the main thread scheduler. |
| WithPlatformModule | Withes the platform module. |
| WithPlatformServices | Withes the platform services. |
| WithRegistration | Withes the registration. |
| WithRegistrationOnBuild | Withes the registration on build. |
| WithTaskPoolScheduler | Withes the task pool scheduler. |
| WithExceptionHandler | Configures a custom exception handler for unhandled errors in ReactiveUI observables. If not configured, ReactiveUI uses a default handler that breaks the debugger and throws... |
| WithSuspensionHost | Configures the non-generic suspension host for application lifecycle management. Creates a default [ISuspensionHost](# instance if not explicitly provided. |
| WithCacheSizes | Configures custom cache size limits for ReactiveUI's internal memoizing caches. If not configured, platform-specific defaults are used (32/64 for mobile, 64/256 for desktop). |
| WithConverter | Registers a typed binding converter using the concrete type. |
| WithFallbackConverter | Registers a fallback binding converter. |
| WithSetMethodConverter | Registers a set-method binding converter. |
| WithConvertersFrom | Imports all converters from a Splat dependency resolver into the builder. |
| WithViewsFromAssembly | Withes the views from assembly. |
| UsingSplatModule | Using the splat module. |
| Build | Builds the application and returns the ReactiveUI instance wrapper. |
| BuildApp | Builds the application and returns the ReactiveUI instance wrapper. |
| WithInstance | Resolves a single instance and passes it to the action. |
Extension members¶
AppBuilderExtensions.WithAvaloniaAndroidXReactiveUIBuilderExtensions.WithAndroidXAndroidXReactiveUIBuilderExtensions.WithAndroidXSchedulerBlazorReactiveUIBuilderExtensions.WithBlazorBlazorReactiveUIBuilderExtensions.WithBlazorWasmBlazorReactiveUIBuilderExtensions.WithBlazorSchedulerBlazorReactiveUIBuilderExtensions.WithBlazorWasmSchedulerBuilderMixins.RegisterViewsBuilderMixins.WithViewModule- [
BuilderMixins.WithConverters][M:ReactiveUI.Reactive.Builder.BuilderMixins.WithConverters(ReactiveUI.Reactive.Builder.IReactiveUIBuilder,ReactiveUI.Binding.Reactive.IBindingTypeConverter[])] BuilderMixins.UsingSplatBuilderMauiReactiveUIBuilderExtensions.WithMauiMauiReactiveUIBuilderExtensions.WithMauiMauiReactiveUIBuilderExtensions.WithMauiSchedulerMauiReactiveUIBuilderExtensions.WithMauiSchedulerMauiReactiveUIBuilderExtensions.WithMauiConvertersReactiveUIBuilderDrawingExtensions.WithDrawingWinFormsReactiveUIBuilderExtensions.WithWinFormsWinFormsReactiveUIBuilderExtensions.WithWinFormsSchedulerWinUIReactiveUIBuilderExtensions.WithWinUIWinUIReactiveUIBuilderExtensions.WithWinUISchedulerWinUIReactiveUIBuilderExtensions.WithWinUIConvertersWpfReactiveUIBuilderExtensions.WithWpfWpfReactiveUIBuilderExtensions.WithWpfSchedulerWpfReactiveUIBuilderExtensions.WithWpfConverters