SingletonDescriptor<T> class
Singleton descriptor
Use this type for service definition if you don't want someone rewrite your service to another life-time service.
Example:
SingletonDescriptor<String> mySingletonService = SingletonDescriptor<String>(factory: _createStringFactory);
- Inheritance
-
- Object
- ServiceDescriptor<
T> - SingletonDescriptor
- Implementers
Constructors
-
SingletonDescriptor.new(ServiceFactory<
T> factory) - SingletonDescriptor.from(T instance)
Properties
-
factory
↔ ServiceFactory<
T> -
The factory method of the service
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- lifeTime → ServiceLifeTime
-
The life-time of the service
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceType → Type
-
The type of the service
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited