public static List <Protocol> GetProtocolsFromFolder(string folderPath) { var protocols = new List <Protocol>(); var filePaths = Directory.GetFiles(folderPath, "*.csv"); foreach (string filePath in filePaths) { var objectives = DvhObjective.ReadObjectivesFromCsv(filePath); var id = (objectives.First()).ProtocolId; var protocol = new Protocol(id, filePath, objectives); protocols.Add(protocol); } return(protocols); }
public Protocol(string id, string filePath) { Id = id; FilePath = filePath; Objectives = DvhObjective.ReadObjectivesFromCsv(filePath); }