コード例 #1
0
 public MainViewModel(
     IFileReaderProvider fileReaderProvider,
     ICoverMatrixManager coverMatrixManager,
     IExcelWriter excelWriter,
     IValidateService validateService,
     IGroupingManager groupingManager,
     ITxtExporter txtExporter,
     IFileChecker fileChecker,
     IFileReader fileReader,
     IOpenFileDialog openFileDialog) : base(validateService)
 {
     Progress              = new ProgressBarModel();
     _txtExportert         = txtExporter;
     _fileChecker          = fileChecker;
     _fileReader           = fileReader;
     _openFileDialog       = openFileDialog;
     _fileReaderProvider   = fileReaderProvider;
     _coverMatrixManager   = coverMatrixManager;
     _excelWriter          = excelWriter;
     RunIndicatorVisible   = false;
     ExcelIndicatorVisible = false;
     CmdCancelComputeData  = new DelegateCommand(async() => await CancelComputeData(), () => CancelEnabled);
     CmdComputeData        = new DelegateCommand(async() => await ComputeData(), RunEnableCheck);
     CmdReadFile           = new DelegateCommand(ReadFile, () => RunButtonIndicatorVisible);
     CmdExportToExcel      = new DelegateCommand(async() => await ExportToExcel(), () => CanEnable);
     CmdExportTstToTxt     = new DelegateCommand(async() => await ExportToTxt(CoverResult.TestMatrix, "_Obiekty_testowe"), () => CanEnable);
     CmdExportTrnToTxt     = new DelegateCommand(async() => await ExportToTxt(CoverResult.DataMatrix, "_Obiekty_treningowe"), () => CanEnable);
     MethodsDelegates      = groupingManager.GetGroupingMethods();
     SelectedMethod        = MethodsDelegates.FirstOrDefault();
 }
コード例 #2
0
 public async Task <ActionResult <string[]> > GetMethods()
 {
     return(Ok(await Task.Run(() => _groupingManager.GetGroupingMethods().Select(x => x.MethodName))));
 }