Beispiel #1
0
 public Result <None> Run(string input, string output, ITextParcer textParser,
                          ICloudLayouter cloud,
                          Visualizer visualizer)
 {
     return(textParser.TryGetWordsFromText(input)
            .Then(textParser.ParseWords)
            .Then(cloud.AddWordsFromDictionary)
            .Then((parsedCloud) => visualizer.RenderCurrentConfig(parsedCloud, output)));
 }
Beispiel #2
0
        public void Run(string input, string output)
        {
            var words = parser.TryGetWordsFromText(input);

            if (words == null)
            {
                return;
            }
            var parsedWords = parser.ParseWords(words);

            cloud.AddWordsFromDictionary(parsedWords);
            visualizer.RenderCurrentConfig(cloud, output);
        }