Initializes a new instance of the IoCContainer
class.
Loads the provided service map and registers it globally.
The service map defining how services are registered and resolved.
Private
__A global platform-specific object, decorated with @platformGlobal
.
Private
serviceA record of service map items, keyed by their unique identifiers.
Private
servicesA record of registered services, keyed by their unique identifiers.
Private
createLoads the service map and registers its items.
The service map to load.
Registers a service with the specified key.
The unique key identifying the service.
The service instance to register.
Resolves a service by its key. If the service is not found, it attempts to create it from the service map.
The unique key identifying the service.
The resolved service instance.
IoCContainer
is responsible for managing service registration and resolution. It supports dependency injection and lazy initialization of services.