def addService(self, moduleName, serviceName, service):
        """
        Add a service instance to the application service pool.

        :param moduleName: <str> module name in which the service is located
        :param serviceName: <str> service name
        :param service: <object> service instance
        :return: <void>
        """
        serviceIdentifier = "{}.{}".format(moduleName, serviceName)
        if serviceIdentifier not in self._services:
            self._services[serviceIdentifier] = service
        else:
            message = "Application - addService() - " \
                      "A service with the identifier {} already exists." \
                      .format(serviceIdentifier)
            raise Exception(message)
def addService ( self , moduleName , serviceName , service ) : serviceIdentifier = "{}.{}" . format ( moduleName , serviceName ) if serviceIdentifier not in self . _services : self . _services [ serviceIdentifier ] = service else : message = "Application - addService() - " "A service with the identifier {} already exists." . format ( serviceIdentifier ) raise Exception ( message )
Add a service instance to the application service pool.

        :param moduleName: <str> module name in which the service is located
        :param serviceName: <str> service name
        :param service: <object> service instance
        :return: <void>