private Task <SimulationPKParametersImport> importPKAnalysesFromFile(string fileFullPath, IModelCoreSimulation modelCoreSimulation, CancellationToken cancellationToken) { return(Task.Run(() => { var importLogger = new SimulationPKParametersImport { FilePath = fileFullPath }; importLogger.PKParameters = _pkAnalysesImporter.ImportPKParameters(fileFullPath, modelCoreSimulation, importLogger); return importLogger; }, cancellationToken)); }
private void addImportedPKToLogForSuccessfulImport(SimulationPKParametersImport pkParameterImport) { if (pkParameterImport.Status.Is(NotificationType.Error)) { return; } pkParameterImport.AddInfo(Messages.FollowingPKParametersWereSuccessfullyImported); foreach (var quantityPKParameter in pkParameterImport.PKParameters) { pkParameterImport.AddInfo(quantityPKParameter.ToString()); } }
private void verifyThatQuantityExistsInSimulation(PathCache <IQuantity> allQuantities, QuantityPKParameter pkParameter, SimulationPKParametersImport importedPKParameter) { if (allQuantities.Contains(pkParameter.QuantityPath)) { return; } importedPKParameter.AddError(Error.CouldNotFindQuantityWithPath(pkParameter.QuantityPath)); }
private void validateConsistencyWithSimulation(IModelCoreSimulation simulation, SimulationPKParametersImport importedPKParameter) { var allQuantities = _entitiesInSimulationRetriever.OutputsFrom(simulation); foreach (var pkParameter in importedPKParameter.PKParameters) { verifyThatQuantityExistsInSimulation(allQuantities, pkParameter, importedPKParameter); } }