public long AddTask(IList <string> names, uint pricecode) { var task = new SynonymTask(names, pricecode, this); lock (taskList) { taskList.Add(task); } return(task.Id); }
public SynonymTask GetTask(long taskId) { SynonymTask res = null; lock (taskList) { foreach (var task in taskList) { if (task.Id == taskId) { res = task; break; } } } return(res); }