2021-08-05 14:21:42 +02:00
|
|
|
from cpl_core.application import StartupABC
|
|
|
|
from cpl_core.configuration import ConfigurationABC
|
|
|
|
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
|
2021-05-22 12:53:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Startup(StartupABC):
|
|
|
|
def __init__(self, config: ConfigurationABC, services: ServiceCollectionABC):
|
|
|
|
StartupABC.__init__(self)
|
|
|
|
|
|
|
|
self._configuration = config
|
|
|
|
self._environment = self._configuration.environment
|
|
|
|
self._services = services
|
|
|
|
|
|
|
|
def configure_configuration(self) -> ConfigurationABC:
|
|
|
|
return self._configuration
|
|
|
|
|
|
|
|
def configure_services(self) -> ServiceProviderABC:
|
|
|
|
return self._services.build_service_provider()
|