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

Locator Class

Summary

A Locator which will host the container for dependency injection based operations.
Namespace
Splat
Base Types
  • object
graph BT Type-->Base0["object"] Type["Locator"] class Type type-node

Syntax

public static class Locator

Properties

Name Value Summary
Current IReadonlyDependencyResolver
Gets the read only dependency resolver. This class is used throughout libraries for many internal operations as well as for general use by applications. If this isn't assigned on startup, a default, highly capable implementation will be used, and it is advised for most people to simply use the default implementation.
static
CurrentMutable IMutableDependencyResolver
Gets the mutable dependency resolver. The default resolver is also a mutable resolver, so this will be non-null. Use this to register new types on startup if you are using the default resolver.
static

Methods

Name Value Summary
AreResolverCallbackChangedNotificationsEnabled() bool
Indicates if the we are notifying external classes of updates to the resolver being changed.
static
GetLocator() IDependencyResolver
Gets the full locator. Note you should use Current or CurrentMutable in most situations.
static
RegisterResolverCallbackChanged(Action) IDisposable
This method allows libraries to register themselves to be set up whenever the dependency resolver changes. Applications should avoid this method, it is usually used for libraries that depend on service location.
static
SetLocator(IDependencyResolver) void
Allows setting the dependency resolver.
static
SuppressResolverCallbackChangedNotifications() IDisposable
This method will prevent resolver changed notifications from happening until the returned IDisposable is disposed.
static

Extension Methods

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