public List<ProcessDataViewModel> NewJob() { Initialize(); var newId = processes.Max(p => p.Id) + 1; var processData = new ProcessDataViewModel { Id = newId, Name = "Process " + newId, Status = queued }; for (int j = 0; j < 5; j++) { var processDataItem = new ProcessDataItemViewModel { Status = queued }; processData.DataItems.Add(processDataItem); } processes.Add(processData); return processes; }
private static List<ProcessDataViewModel> BuildDummyData(int processCount, int processItemCount) { var result = new List<ProcessDataViewModel>(); for (int i = 0; i <= processCount; i++) { var processData = new ProcessDataViewModel { Id = i, Name = "Process " + i, Status = queued }; for (int j = 0; j < processItemCount; j++) { var processDataItem = new ProcessDataItemViewModel { Status = queued }; processData.DataItems.Add(processDataItem); } result.Add(processData); } return result; }