Ejemplo n.º 1
0
        public Result <List <IWord> > HandleWords()
        {
            var resultWords = fileProcessor.GetWords();

            return(!resultWords.IsSuccess
                ? Result.Fail <List <IWord> >(resultWords.Error)
                : Result.Of(() => resultWords.Value.Select(w => WordHandle(w.Key, w.Value)).ToList()));
        }
Ejemplo n.º 2
0
        public List <IWord> HandleWords()
        {
            var words = fileProcessor.GetWords();

            return(words
                   .Select(w => WordHandle(w.Key, w.Value))
                   .ToList());
        }