private void GenerateReport(DateTime finishDateTime) { Action.Safe(() => { RunRepository.OnRunFinished(finishDateTime); DataService.SaveRun(RunRepository.CurrentRun); }); }
private void GenerateReport(DateTime finishDateTime) { Action.Safe(() => { RunRepository.OnRunFinished(finishDateTime); DataWriterService.SaveRun(RunRepository.CurrentRun); Logger.Info($"Report generated at {finishDateTime:yyyy-MM-dd HH:mm:ss.fff}"); }); }
public RunMessageProcessor(ILogger <RunMessageProcessor> logger, ILaunchService launchService, RunRepository runRepository, IUnitOfWorkProvider unitOfWorkProvider, IContainer container) { _logger = logger; _launchService = launchService; _runRepository = runRepository; _unitOfWorkProvider = unitOfWorkProvider; _container = container; }
public RunFacade(IUnitOfWorkProvider unitOfWorkProvider, ICurrentUserProvider currentUserProvider, AlgorithmRepository algorithmRepository, RunRepository runRepository, IArgumentTranslator argumentTranslator, ILaunchService launchService) : base(unitOfWorkProvider, currentUserProvider) { _algorithmRepository = algorithmRepository; _runRepository = runRepository; _argumentTranslator = argumentTranslator; _launchService = launchService; }
private void InitializeOnRunStarted(DateTime startDateTime) { Action.Safe(() => { RunRepository.OnRunStarted(ReporterSettings, startDateTime); TestRunsRepository.OnRunStarted(); ResourceExtractor.ExtractReportBase(ReporterSettings.OutputPath); DataService.SaveReportSettings(ReportSettings); }); }
private void OnTestFinish(TestRunDto testDtoWhenFinished) { Action.Safe(() => { RunRepository.OnTestFinished(testDtoWhenFinished); var testDtoWhenStarted = TestRunsRepository.ExtractCorrespondingTestRun(testDtoWhenFinished); var finalTest = TestRunProcessor.Process(testDtoWhenStarted, testDtoWhenFinished, RunRepository.RunGuid); DataService.SaveTestRun(finalTest); }); }
private void OnTestFinish(TestRunDto testDtoWhenFinished, TestOutputDto testOutputDto) { Action.Safe(() => { RunRepository.OnTestFinished(testDtoWhenFinished); var testDtoWhenStarted = TestRunsRepository.ExtractCorrespondingTestRun(testDtoWhenFinished); var finalTest = TestRunProcessor.Process(testDtoWhenStarted, testDtoWhenFinished, RunRepository.RunGuid); Logger.Debug($"Saving test run '{finalTest.Name}' (Guid: {finalTest.TestInfo.Guid})"); DataWriterService.SaveTestRun(finalTest, testOutputDto); }); }
public void Initialize() { var options = new DbContextOptionsBuilder <MLOpsDbContext>() .UseInMemoryDatabase(databaseName: "MLOpsNET") .Options; this.contextFactory = new DbContextFactory(options, RelationalEntityConfigurator.OnModelCreating); this.clockMock = new Mock <IClock>(); this.sut = new RunRepository(contextFactory, clockMock.Object); }
private void InitializeOnRunStarted(DateTime startDateTime) { Action.Safe(() => { Logger.Debug("Reporter is initializing on run start..."); RunRepository.OnRunStarted(ReporterSettings, startDateTime); TestRunsRepository.OnRunStarted(); ResourceExtractor.ExtractReportBase(ReporterSettings.OutputPath); DataWriterService.SaveReportSettings(ReportSettings); Logger.Debug($"Reporter initializing done. Output folder is '{ReporterSettings.OutputPath}'. " + $"Data service file: '{ReporterSettings.DataServiceFile}', Logger file: '{ReporterSettings.LoggerFile}'"); }); }
public LocalLaunchService(IOptions <AlgorithmOptions> options, IProcessService processService, IUnitOfWorkProvider unitOfWorkProvider, RunRepository runRepository, ITemporaryFileProvider temporaryFileProvider, IFileStorage fileStorage, IAlgorithmFileProvider algorithmFileProvider, ILogger <LocalLaunchService> logger, FileSystemWrapper fileSystemWrapper) { _options = options; _processService = processService; _unitOfWorkProvider = unitOfWorkProvider; _runRepository = runRepository; _temporaryFileProvider = temporaryFileProvider; _fileStorage = fileStorage; _algorithmFileProvider = algorithmFileProvider; _logger = logger; _fileSystemWrapper = fileSystemWrapper; }
public async Task Update(Run oRun) { var oRunRepository = new RunRepository(); try { string sNote = String.IsNullOrWhiteSpace(oRun.Note) ? String.Empty : oRun.Note.Trim(); byte[] aSignatureBytes = (oRun.Signature == null) ? null : oRun.Signature.ToPngBytes(); await oRunRepository.Update(oRun.Number, sNote, aSignatureBytes); } catch (Exception) { throw; } }
public void ItShouldCopyAndRename_TheSampleSubmissionMaster_ToTheDocxFolder() { try { var run = new RunRepository(new PilotPlantEntities()).DbContext.Runs.FirstOrDefault(r => r.Id == 9); } catch (Exception ex) { throw; } string startingpath = "S:\\Research\\Fermentation\\Project--Darwin\\140729_300L_sAA2178_2.50EL-1.76D_NH4OH_1.5xKA1(4.05% D) 5.25gLammoniumsulfate, HighPhosphate_34C"; FileInfo fi = OfficeHandler.FileIO.SampleSubmissionPlan.FindWordFileInfo( "140729_300L_Outline.docx", ref startingpath); FileInfo retval = OfficeHandler.FileIO.SampleSubmissionPlan.CopySubmissionMasterToRun(fi, "nstein"); Assert.IsTrue(retval.Name == "140729_300L_Sample_Submission_Nick.xlsx"); }
public async Task <Run> Instance(int iRunNo) { var oRunRepository = new RunRepository(); IDataReader oDataReader = null; try { oDataReader = await oRunRepository.Get(iRunNo); } catch (Exception) { throw; } if (!oDataReader.Read()) { return(null); } return(new Run(oDataReader)); }
public Boolean AddRun(Run run) => RunRepository.AddRun(run);
public void SetRunName(string runName) { RunRepository.SetRunName(runName); }
public Boolean DeleteRun(UInt32 runID) => RunRepository.DeleteRun(runID);
public Run GetRun(UInt32 shooter_id, UInt32 stage_id) => RunRepository.GetRun(shooter_id, stage_id);
public Boolean EditRun(Run run, UInt32 shooter_id, UInt32 stage_id) => RunRepository.EditRun(run, shooter_id, stage_id);