2018-12-18 22:18:06 +01:00
|
|
|
module d_webservice_example.component_registration;
|
|
|
|
|
2018-12-21 21:22:06 +01:00
|
|
|
import aermicioi.aedi;
|
2018-12-18 22:18:06 +01:00
|
|
|
|
|
|
|
void registerComponents(ConfigurableContainer container) @safe
|
|
|
|
{
|
2019-01-03 03:33:42 +01:00
|
|
|
import d_webservice_example.business.todo_notification_service : TodoNotificationService;
|
2018-12-21 21:22:06 +01:00
|
|
|
import d_webservice_example.business.todo_service : TodoRepository, TodoService;
|
|
|
|
import d_webservice_example.controller.todo_controller : TodoController;
|
2019-01-03 03:33:42 +01:00
|
|
|
import d_webservice_example.controller.todo_notification_controller : TodoNotificationController;
|
2018-12-21 21:22:06 +01:00
|
|
|
import d_webservice_example.dataaccess.in_memory_todo_repository : InMemoryTodoRepository;
|
2019-01-03 03:33:42 +01:00
|
|
|
import d_webservice_example.facade.todo_facade : TodoFacade;
|
2018-12-21 21:22:06 +01:00
|
|
|
|
2019-01-03 03:33:42 +01:00
|
|
|
with (container.configure)
|
|
|
|
{
|
|
|
|
register!TodoService.autowire;
|
|
|
|
register!TodoNotificationService.autowire;
|
|
|
|
register!TodoController.autowire;
|
|
|
|
register!TodoNotificationController.autowire;
|
|
|
|
register!(TodoRepository, InMemoryTodoRepository).autowire;
|
|
|
|
register!TodoFacade.autowire;
|
|
|
|
}
|
2018-12-18 22:18:06 +01:00
|
|
|
}
|