public void SaveTask(TaskDto taskDto) { var taskStorage = _tasksStorages.FirstOrDefault(x => x.Key == taskDto.Key); if (taskStorage == null) { _taskStorage = new TasksStorage { Key = taskDto.Key, Tasks = new Queue<Task>() }; _taskStorage.Tasks.Enqueue(taskDto.Task); _tasksStorages.Enqueue(_taskStorage); } else { taskStorage.Tasks.Enqueue(taskDto.Task); } }
public ManagerApplicationTest(TasksStorage taskStorage, Queue<TasksStorage> taskStorageQueue) : base(taskStorage, taskStorageQueue) { }
protected ManagerApplication(TasksStorage taskStorage, Queue<TasksStorage> taskStorages) { _taskStorage = taskStorage; _tasksStorages = taskStorages; taskStorage.Tasks = new Queue<Task>(); }