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

DependencyResolverMixins Class

Summary

A set of extension methods that assist with the IDependencyResolver and IMutableDependencyResolver interfaces.
Namespace
Splat
Base Types
  • object
graph BT Type-->Base0["object"] Type["DependencyResolverMixins"] class Type type-node

Syntax

public static class DependencyResolverMixins

Methods

Name Value Summary
GetService<T>(IReadonlyDependencyResolver, string) T
Gets an instance of the given T. Must return null if the service is not available (must not throw).
static
GetServices<T>(IReadonlyDependencyResolver, string) IEnumerable<T>
Gets all instances of the given T. Must return an empty collection if the service is not available (must not return null or throw).
static
Register<T>(IMutableDependencyResolver, Func<T>, string) void
Registers a factory for the the given T.
static
RegisterConstant(IMutableDependencyResolver, object, Type, string) void
Registers a constant value which will always return the specified object instance.
static
RegisterConstant<T>(IMutableDependencyResolver, T, string) void
Registers a constant value which will always return the specified object instance.
static
RegisterLazySingleton(IMutableDependencyResolver, Func<object>, Type, string) void
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.
static
RegisterLazySingleton<T>(IMutableDependencyResolver, Func<T>, string) void
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.
static
ServiceRegistrationCallback(IMutableDependencyResolver, Type, Action<IDisposable>) IDisposable
Registers a new callback that occurs when a new service with the specified type is registered.
static
UnregisterAll<T>(IMutableDependencyResolver, string) void
Unregisters the all the values for the specified type and the optional contract.
static
UnregisterCurrent<T>(IMutableDependencyResolver, string) void
Unregisters the current the value for the specified type and the optional contract.
static
WithResolver(IDependencyResolver, bool) IDisposable
Override the default Dependency Resolver until the object returned is disposed.
static

Extension Methods

Name Value Summary
InvokeViewModelAction<T>(Action<T>) object
This is a thing I lifted from Prism.