public void NotifyShelfEmpty(Shelf shelf, string product) { if (directory.ContainsKey(product)) { shelvesToStock.Enqueue(shelf); // Remove shelf from directory product->shelf listing directory[product].Remove(shelf); if (directory[product].Count == 0) { // Remove product from directory directory.Remove(product); } } }