Table of Contents

Class AppBuilder

Namespace
Splat.Builder
Assembly
Splat.Builder.dll

A builder class for configuring ReactiveUI without using reflection. This provides an AOT-compatible alternative to the reflection-based InitializeReactiveUI method.

public class AppBuilder : IAppBuilder, IAppInstance
Inheritance
AppBuilder
Implements
Derived
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>, bool)

Constructors

AppBuilder(IMutableDependencyResolver, IReadonlyDependencyResolver?)

Initializes a new instance of the AppBuilder class.

public AppBuilder(IMutableDependencyResolver resolver, IReadonlyDependencyResolver? current = null)

Parameters

resolver IMutableDependencyResolver

The dependency resolver to configure.

current IReadonlyDependencyResolver

The configured services.

Exceptions

ArgumentNullException

resolver.

Properties

Current

Gets the current services.

public IReadonlyDependencyResolver? Current { get; }

Property Value

IReadonlyDependencyResolver

The services.

CurrentMutable

Gets the mutable service registrar.

public IMutableDependencyResolver CurrentMutable { get; }

Property Value

IMutableDependencyResolver

The current mutable.

HasBeenBuilt

Gets a value indicating whether this instance has been built.

public static bool HasBeenBuilt { get; }

Property Value

bool

true if this instance has been built; otherwise, false.

UsingBuilder

Gets a value indicating whether the application builder is being used.

public static bool UsingBuilder { get; }

Property Value

bool

true if using the application builder; otherwise, false.

Methods

Build()

Builds and applies all registrations to the dependency resolver.

public IAppInstance Build()

Returns

IAppInstance

An App Instance.

CreateSplatBuilder()

Creates a Splat builder with the Splat Locator instance using the current mutable resolver.

public static AppBuilder CreateSplatBuilder()

Returns

AppBuilder

The builder instance for chaining.

ResetBuilderStateForTests()

Resets the builder state for tests, ONLY if the builder is being used in a unit test environment.

public static void ResetBuilderStateForTests()

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.

public IAppBuilder UseCurrentSplatLocator()

Returns

IAppBuilder

The builder instance for chaining.

UsingModule<T>(T)

Using the splat module.

public IAppBuilder UsingModule<T>(T registrationModule) where T : IModule

Parameters

registrationModule T

The registration module to add.

Returns

IAppBuilder

The builder instance for method chaining.

Type Parameters

T

The Splat Module Type.

WithCoreServices()

Registers the core ReactiveUI services.

public virtual IAppBuilder WithCoreServices()

Returns

IAppBuilder

The builder instance for method chaining.

WithCustomRegistration(Action<IMutableDependencyResolver>)

Registers a custom registration action.

public IAppBuilder WithCustomRegistration(Action<IMutableDependencyResolver> configureAction)

Parameters

configureAction Action<IMutableDependencyResolver>

The configuration action to add.

Returns

IAppBuilder

The builder instance for method chaining.