public ViewNotificationsUseCaseFactory(
     ITaskItemRepositoryFactory taskItemRepositoryFactory,
     INotificationRepositoryFactory notificationRepositoryFactory)
 {
     this.taskItemRepositoryFactory     = taskItemRepositoryFactory ?? throw new ArgumentNullException(nameof(taskItemRepositoryFactory));
     this.notificationRepositoryFactory = notificationRepositoryFactory ?? throw new ArgumentNullException(nameof(notificationRepositoryFactory));
 }
 public DeleteTaskUseCaseFactory(
     ITaskItemRepositoryFactory taskItemRepositoryFactory,
     INotificationRepositoryFactory notificationRepositoryFactory,
     BasicTaskManager taskItemManager,
     BasicNotificationManager notificationManager)
 {
     this.taskItemRepositoryFactory     = taskItemRepositoryFactory ?? throw new ArgumentNullException(nameof(taskItemRepositoryFactory));
     this.notificationRepositoryFactory = notificationRepositoryFactory ?? throw new ArgumentNullException(nameof(notificationRepositoryFactory));
     this.taskItemManager     = taskItemManager ?? throw new ArgumentNullException(nameof(taskItemManager));
     this.notificationManager = notificationManager ?? throw new ArgumentNullException(nameof(notificationManager));
 }
Пример #3
0
        public TaskSchedulerApplication(
            ITaskItemRepositoryFactory taskItemRepositoryFactory,
            INotificationFrequencyRepositoryFactory notificationFrequencyRepositoryFactory,
            INotificationRepositoryFactory notificationRepositoryFactory,
            IClock clock)
        {
            this.taskItemRepositoryFactory = taskItemRepositoryFactory ?? throw new ArgumentNullException(nameof(taskItemRepositoryFactory));
            this.notificationFrequencyRepositoryFactory = notificationFrequencyRepositoryFactory ?? throw new ArgumentNullException(nameof(notificationFrequencyRepositoryFactory));
            this.notificationRepositoryFactory          = notificationRepositoryFactory ?? throw new ArgumentNullException(nameof(notificationRepositoryFactory));
            this.clock = clock ?? throw new ArgumentNullException(nameof(clock));

            this.InitializeDomainFromDatabase(
                taskItemRepositoryFactory,
                notificationManager,
                taskManager,
                clock
                );

            //CREATE USE-CASE FACTORIES
            createTaskUseCaseFactory =
                new CreateTaskUseCaseFactory(
                    taskManager,
                    notificationManager,
                    clock,
                    taskItemRepositoryFactory
                    );

            viewTasksUseCaseFactory =
                new ViewTasksUseCaseFactory(taskManager, taskItemRepositoryFactory);

            viewNotificationsUseCaseFactory =
                new ViewNotificationsUseCaseFactory(
                    taskItemRepositoryFactory,
                    notificationRepositoryFactory
                    );

            deleteTaskUseCaseFactory =
                new DeleteTaskUseCaseFactory(
                    taskItemRepositoryFactory,
                    notificationRepositoryFactory,
                    taskManager,
                    notificationManager
                    );
        }