The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

DependencyResolverMixins.

RegisterLazySingleton<T>(IMutableDependencyResolver, Func<T>, string) Method

Summary

Registers a lazy singleton value which will always return the specified object instance once created. The value is only generated once someone requests the service from the resolver.
Namespace
Splat
Containing Type
DependencyResolverMixins

Syntax

public static void RegisterLazySingleton<T>(this IMutableDependencyResolver resolver, Func<T> valueFactory, string contract = null)

Type Parameters

Name Description
T The service type to register for.

Parameters

Name Type Description
resolver IMutableDependencyResolver The resolver to register the service type with.
valueFactory Func<T> A factory method for generating a object of the specified type.
contract string A optional contract value which will indicates to only return the value if this contract is specified.

Return Value

Type Description
void