ResolverBackend class abstract interface

Backend contract used by Runtime to register and resolve services.

Applications normally use AutoInjectorBackend, the default implementation. A custom backend can be supplied to Module.start or Module.run.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activate() FutureOr<void>
Eagerly initialize bindings declared with Lifetime.singleton.
close() FutureOr<void>
Release all backend-owned state.
commit() → void
Finish the registration phase so services can be resolved.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register<T extends Object>(Function constructor, {required Lifetime lifetime, String? key}) → void
Register a constructor-backed service.
registerInstance<T extends Object>(T instance, {String? key}) → void
Register an already-created service instance.
resolve<T extends Object>({String? key}) → T
Resolve a service by type or by an optional backend key.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited