2021.4 #19

Merged
edraft merged 237 commits from 2021.4 into master 2021-04-01 10:13:33 +02:00
2 changed files with 7 additions and 8 deletions
Showing only changes of commit 41ddc86961 - Show all commits

View File

@ -13,12 +13,12 @@ class StartupTemplate(TemplateFileABC):
self._value = textwrap.dedent("""\
from cpl.application import StartupABC
from cpl.configuration import ConfigurationABC
from cpl.dependency_injection import ServiceProviderABC
from cpl.dependency_injection import ServiceProviderABC, ServiceCollectionABC
class Startup(StartupABC):
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
def __init__(self, config: ConfigurationABC, services: ServiceCollectionABC):
StartupABC.__init__(self)
self._configuration = config
@ -29,8 +29,7 @@ class StartupTemplate(TemplateFileABC):
return self._configuration
def configure_services(self) -> ServiceProviderABC:
return self._services
return self._services.build_service_provider()
""")
@property

View File

@ -1,11 +1,11 @@
from cpl.application import StartupABC
from cpl.configuration import ConfigurationABC
from cpl.dependency_injection import ServiceProviderABC
from cpl.dependency_injection import ServiceProviderABC, ServiceCollectionABC
class Startup(StartupABC):
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
def __init__(self, config: ConfigurationABC, services: ServiceCollectionABC):
StartupABC.__init__(self)
self._configuration = config
@ -16,5 +16,5 @@ class Startup(StartupABC):
return self._configuration
def configure_services(self) -> ServiceProviderABC:
return self._services
return self._services.build_service_provider()