コード例 #1
0
 private void GenerateReport(DateTime finishDateTime)
 {
     Action.Safe(() =>
     {
         RunRepository.OnRunFinished(finishDateTime);
         DataService.SaveRun(RunRepository.CurrentRun);
     });
 }
コード例 #2
0
ファイル: Reporter.cs プロジェクト: weedkiller/Ghpr.Core
 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}");
     });
 }
コード例 #3
0
 public RunMessageProcessor(ILogger <RunMessageProcessor> logger, ILaunchService launchService, RunRepository runRepository,
                            IUnitOfWorkProvider unitOfWorkProvider, IContainer container)
 {
     _logger             = logger;
     _launchService      = launchService;
     _runRepository      = runRepository;
     _unitOfWorkProvider = unitOfWorkProvider;
     _container          = container;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 private void InitializeOnRunStarted(DateTime startDateTime)
 {
     Action.Safe(() =>
     {
         RunRepository.OnRunStarted(ReporterSettings, startDateTime);
         TestRunsRepository.OnRunStarted();
         ResourceExtractor.ExtractReportBase(ReporterSettings.OutputPath);
         DataService.SaveReportSettings(ReportSettings);
     });
 }
コード例 #6
0
 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);
     });
 }
コード例 #7
0
ファイル: Reporter.cs プロジェクト: weedkiller/Ghpr.Core
 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);
     });
 }
コード例 #8
0
        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);
        }
コード例 #9
0
ファイル: Reporter.cs プロジェクト: weedkiller/Ghpr.Core
 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}'");
     });
 }
コード例 #10
0
        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;
        }
コード例 #11
0
ファイル: RunFactory.cs プロジェクト: ESchulmeister/Projects
        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;
            }
        }
コード例 #12
0
        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");
        }
コード例 #13
0
ファイル: RunFactory.cs プロジェクト: ESchulmeister/Projects
        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));
        }
コード例 #14
0
 public Boolean AddRun(Run run)
 => RunRepository.AddRun(run);
コード例 #15
0
ファイル: Reporter.cs プロジェクト: weedkiller/Ghpr.Core
 public void SetRunName(string runName)
 {
     RunRepository.SetRunName(runName);
 }
コード例 #16
0
 public Boolean DeleteRun(UInt32 runID)
 => RunRepository.DeleteRun(runID);
コード例 #17
0
 public Run GetRun(UInt32 shooter_id, UInt32 stage_id)
 => RunRepository.GetRun(shooter_id, stage_id);
コード例 #18
0
 public Boolean EditRun(Run run, UInt32 shooter_id, UInt32 stage_id)
 => RunRepository.EditRun(run, shooter_id, stage_id);