Added docs for cpl.environment

This commit is contained in:
2021-05-17 17:28:52 +02:00
parent 4adf6bc834
commit adf9a33e83
5 changed files with 32 additions and 15 deletions

View File

@@ -21,7 +21,9 @@ class ServiceCollectionABC(ABC):
Parameter
---------
db_context: Type[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
Database context
db_settings: :class:`cpl.database.database_settings.DatabaseSettings`
Database settings
"""
pass
@@ -37,7 +39,9 @@ class ServiceCollectionABC(ABC):
Parameter
---------
service_type: :class:`Type`
Type of the service
service: :class:`Callable`
Object of the service
"""
pass
@@ -48,7 +52,9 @@ class ServiceCollectionABC(ABC):
Parameter
---------
service_type: :class:`Type`
Type of the service
service: :class:`Callable`
Object of the service
"""
pass
@@ -59,7 +65,9 @@ class ServiceCollectionABC(ABC):
Parameter
---------
service_type: :class:`Type`
Type of the service
service: :class:`Callable`
Object of the service
"""
pass

View File

@@ -9,7 +9,9 @@ class ServiceDescriptor:
Parameter
---------
implementation: Union[:class:`type`, Optional[:class:`object`]]
Object or type of service
lifetime: :class:`cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum`
Lifetime of the service
"""
def __init__(self, implementation: Union[type, Optional[object]], lifetime: ServiceLifetimeEnum):

View File

@@ -17,8 +17,11 @@ class ServiceProvider(ServiceProviderABC):
Parameter
---------
service_descriptors: list[:class:`cpl.dependency_injection.service_descriptor.ServiceDescriptor`]
Descriptor of the service
config: :class:`cpl.configuration.configuration_abc.ConfigurationABC`
CPL Configuration
db_context: Optional[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
Database representation
"""
def __init__(self, service_descriptors: list[ServiceDescriptor], config: ConfigurationABC, db_context: Optional[DatabaseContextABC]):