public RunScpVm(IScpParams scpParams, IEnumerable <ISorterGenomeEvalVm> sorterGenomeEvalVms) { ScpRunnerVm = new ScpRunnerVm(scpParams, sorterGenomeEvalVms); ScpRunnerVm.OnIterationResult.Subscribe(ReportBestResult); ReportFrequency = 10; _trajectoryGridVm = new SgHistoryGridVm(); _stopwatch = new Stopwatch(); }
async Task OnRunCommand() { Busy = true; _stopwatch.Reset(); _stopwatch.Start(); _cancellationTokenSource = new CancellationTokenSource(); await ScpRunnerVm.OnRunAsync(_cancellationTokenSource); _stopwatch.Stop(); Busy = false; }