Esempio n. 1
0
        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)));
        }
Esempio n. 2
0
        public void Execute()
        {
            if (!_userFileInput.TryGetFileName("open", out var userFileInput))
            {
                return;
            }

            _fileLoader.TryLoadFile(userFileInput, _notebook);
        }