ServiceDescriptor class
Describes a service with its service type, implementation, and lifetime.
Constructors
- ServiceDescriptor.new(Type serviceType, ServiceLifetime lifetime)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- implementationFactory → Function?
-
no setter
- implementationInstance → Object?
-
no setter
- lifetime → ServiceLifetime
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceType → Type
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
scoped<
TService> (ImplementationFactory implementationFactory) → ServiceDescriptor -
Creates an instance of ServiceDescriptor with the specified
TService
,implementationFactory
and the ServiceLifetime.scoped. -
singleton<
TService> (ImplementationFactory implementationFactory) → ServiceDescriptor -
Creates an instance of ServiceDescriptor with the specified
TService
,implementationFactory
and the ServiceLifetime.singleton. -
singletonInstance<
TService> (Object implementationInstance) → ServiceDescriptor -
transient<
TService> (ImplementationFactory implementationFactory) → ServiceDescriptor -
Creates an instance of ServiceDescriptor with the specified
TService
,implementationFactory
and the ServiceLifetime.transient.