ContainerOperations extension
Extension on App providing syntactic sugar for dependency resolution and binding.
- on
Methods
-
bind<
T> (T instance) → void -
Available on App, provided by the ContainerOperations extension
Binds a concreteinstanceto typeTin the container. -
bindInstance<
T> (T instance) → void -
Available on App, provided by the ContainerOperations extension
Registers a singletoninstanceof typeT. -
make<
T> () → T -
Available on App, provided by the ContainerOperations extension
Alias for resolve. Resolves a registered instance. -
resolve<
T> () → T -
Available on App, provided by the ContainerOperations extension
Resolves a registered instance of typeT. -
resolveInstance<
T> () → T -
Available on App, provided by the ContainerOperations extension
Resolves an instance of typeTfrom the container. -
tryMake<
T> () → T? -
Available on App, provided by the ContainerOperations extension
Alias for tryResolve. -
tryResolve<
T> () → T? -
Available on App, provided by the ContainerOperations extension
Attempts to resolve an instance of typeT. Returnsnullif not found. -
tryResolveInstance<
T> () → T? -
Available on App, provided by the ContainerOperations extension
Safely attempts to resolve an instance. Returnsnullon failure.