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

DependencyResolverMixins.

RegisterLazySingleton(IMutableDependencyResolver, Func<object>, Type, 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(this IMutableDependencyResolver resolver, Func<object> valueFactory, Type serviceType, string contract = null)

Parameters

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

Return Value

Type Description
void