FactoryKey
A ServiceKey that creates a new instance of a service every time one is requested.
This key is useful for services that are lightweight and should not be shared, or for services whose creation depends on parameters that are only available at runtime. When registering a FactoryKey, you provide a factory lambda. This lambda is executed on every get() call.
Parameters
The type of object to be produced by the factory.
The type of parameters to be passed to the factory lambda during retrieval. Use Unit if no parameters are needed.
Types
Properties
Functions
Creates an Entry to provide values.
Retrieve the value from entry. The entry will have been created by a ServiceKey that is equals to this key. If this ServiceKey is only equals to other keys of the same class, then entry will be guaranteed to be of type Entry.