private void AddTask(TaskType type, string path) { directoriesService.AddTask(new Task { Type = type, Path = GetDirectoryName(path) }); }