private Option <List <FileCoverageData> > LoadData(string modeInput, Func <XDocument, List <FileCoverageData> > generateFunc) { if (generateFunc == null) { throw new ArgumentNullException(nameof(generateFunc)); } var document = _fileLoader.TryLoadFile(modeInput); if (!document.HasValue) { return(Option <List <FileCoverageData> > .None); } return(generateFunc(XDocument.Parse((string)document))); }
public void Execute() { if (!_userFileInput.TryGetFileName("open", out var userFileInput)) { return; } _fileLoader.TryLoadFile(userFileInput, _notebook); }