DependencyContainer class

Constructors

DependencyContainer({bool silent})

Properties

collaborators ↔ List<DependencyContainer>
read / write
definitions → Map<String, Map<Type, Definition<Object>>>
final
silent → bool
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

assertRegisterMessage<T>(String word, String tag, [Type _as]) → String
call<T>([String tag]) → T
Resolve an instance of requested type. Same as resolve.
clear() → void
collaborate(List<DependencyContainer> containers) → void
Adds collaborating containers.
has<T>([String tag]) → bool
Check for a definition of an instance of requested type.
register<S, T extends S>(Factory<S> factory, {String tag, Type as}) → void
Registers a factory into the container. [...]
registerInstance<S, T extends S>(S instance, {String tag, Type as}) → void
Registers an instance into the container. [...]
registerSingleton<S, T extends S>(Factory<S> factory, {String tag, Type as}) → void
Registers a factory that will be called only only when accessing it for the first time, into the container. [...]
resolve<T>([String tag]) → T
Resolve an instance of requested type.
setDefinition<T>(String tag, Definition<T> definition, [Type _as]) → void
Use a tag in case you need to register multiple factories fo the same type, to differentiate them.
unregister<T>([String tag]) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited