Improved env
This commit is contained in:
parent
b18f2c4bcd
commit
2f92e9909d
@ -14,21 +14,22 @@ class StartupTemplate(TemplateFileABC):
|
||||
from cpl_core.application import StartupABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
|
||||
from cpl_core.environment import ApplicationEnvironment
|
||||
|
||||
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, services: ServiceCollectionABC):
|
||||
def __init__(sel):
|
||||
StartupABC.__init__(self)
|
||||
|
||||
self._configuration = config
|
||||
self._environment = self._configuration.environment
|
||||
self._services = services
|
||||
|
||||
def configure_configuration(self) -> ConfigurationABC:
|
||||
def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
|
||||
return self._configuration
|
||||
|
||||
def configure_services(self) -> ServiceProviderABC:
|
||||
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
|
||||
return self._services.build_service_provider()
|
||||
""")
|
||||
|
||||
|
@ -14,21 +14,22 @@ class StartupTemplate(TemplateFileABC):
|
||||
from cpl_core.application import StartupABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
|
||||
from cpl_core.environment import ApplicationEnvironment
|
||||
|
||||
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, services: ServiceCollectionABC):
|
||||
def __init__(sel):
|
||||
StartupABC.__init__(self)
|
||||
|
||||
self._configuration = config
|
||||
self._environment = self._configuration.environment
|
||||
self._services = services
|
||||
|
||||
def configure_configuration(self) -> ConfigurationABC:
|
||||
def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
|
||||
return self._configuration
|
||||
|
||||
def configure_services(self) -> ServiceProviderABC:
|
||||
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
|
||||
return self._services.build_service_provider()
|
||||
""")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user