protected override void Context()
 {
     base.Context();
     sut.AddInfo("TOTO");
     _simulationResultFile = new SimulationResultsFile();
     sut.SimulationResultsFiles.Add(_simulationResultFile);
 }
Ejemplo n.º 2
0
        public SimulationResultsFileSelectionDTO AddFile(string fileFullPath)
        {
            var simulationResultsFileSelectionDTO = new SimulationResultsFileSelectionDTO {
                FilePath = fileFullPath
            };

            SimulationResultsFile.Add(simulationResultsFileSelectionDTO);
            return(simulationResultsFileSelectionDTO);
        }
Ejemplo n.º 3
0
 public static SimulationResultsFileSelectionDTO From(SimulationResultsFile simulationResultsFile)
 {
     return(new SimulationResultsFileSelectionDTO
     {
         FilePath = simulationResultsFile.FilePath,
         Status = simulationResultsFile.Status,
         NumberOfIndividuals = simulationResultsFile.NumberOfIndividuals,
         NumberOfQuantities = simulationResultsFile.NumberOfQuantities,
         Messages = simulationResultsFile.Log
     });
 }
Ejemplo n.º 4
0
        private Task <IndividualResultsImport> importFiles(string fileFullPath, Simulation simulation, CancellationToken cancellationToken)
        {
            return(Task.Run(() =>
            {
                var importResult = new IndividualResultsImport();
                var simulationResultsFile = new SimulationResultsFile {
                    FilePath = fileFullPath
                };
                importResult.IndividualResults = _individualResultsImporter.ImportFrom(fileFullPath, simulation, simulationResultsFile).ToList();
                simulationResultsFile.NumberOfIndividuals = importResult.IndividualResults.Count;
                importResult.SimulationResultsFile = simulationResultsFile;

                if (importResult.IndividualResults.Any())
                {
                    importResult.SimulationResultsFile.NumberOfQuantities = importResult.IndividualResults.First().Count();
                }

                return importResult;
            }, cancellationToken));
        }
Ejemplo n.º 5
0
 public void RemoveFile(SimulationResultsFileSelectionDTO fileSelectionDTO)
 {
     resetMessages();
     SimulationResultsFile.Remove(fileSelectionDTO);
 }
Ejemplo n.º 6
0
 public SimulationResultsFileSelectionDTO AddFile(SimulationResultsFileSelectionDTO simulationResultsFileSelectionDTO)
 {
     resetMessages();
     SimulationResultsFile.Add(simulationResultsFileSelectionDTO);
     return(simulationResultsFileSelectionDTO);
 }
Ejemplo n.º 7
0
 public void Clear()
 {
     SimulationResultsFile.Clear();
     resetMessages();
 }