public int AddTask(IBackgroundTask task) { int id = ++_id; Tasks[id] = task; Task.Run(() => { ObjectFactory.BuildUp(task); task.DoTask(); }); return id; }
public int AddTask(IBackgroundTask task) { int id = ++_id; Tasks[id] = task; Task.Run(() => { ObjectFactory.BuildUp(task); task.DoTask(); }); return(id); }