public static void Process(IEventLink eventLink, Object writeSyncObject, Task task, String workingDirectory, HashSet<TableMapper> mapping) { var processor = new TaskProcessor(eventLink, writeSyncObject, task, workingDirectory, mapping); processor.Process(); }
private TaskProcessor(IEventLink eventLink, Object writeSyncObject, Task task, String workingDirectory, HashSet<TableMapper> mapping) { _eventLink = eventLink; _writeSyncObject = writeSyncObject; _task = task; _workingDirectory = workingDirectory; _mapping = mapping; }
/// <summary> /// Добавляет задание в очередь /// </summary> /// <param name="task">Задание</param> public void Add(Task task) { if (task == null) throw new ArgumentNullException("task"); lock (_queueSyncObject) { _queue.Enqueue(task); } }