public WorkPackage FetchWork(OSEnum pOS, String pAssignedClient) { if (!QueuedWorkItems.Any()) { return(null); } //get first item in list and create package for it var item = QueuedWorkItems.First(); var package = item.Start(pOS, pAssignedClient); //move from queued to active QueuedWorkItems.Remove(item); ActiveWorkItems.Add(item); return(package); }
private bool IsAlreadyInList(String pParameters) { return(QueuedWorkItems.Any(t => t.Parameters == pParameters) || ActiveWorkItems.Any(t => t.Parameters == pParameters)); }