public void Run(string pathToFile, string pathToSaveFile, ImageSettings imageSettings, WordDrawSettings wordDrawSettings) { circularCloudDrawing.SetOptions(imageSettings); var processedWord = preprocessingWords.Preprocessing(readerLinesFromFile.GetWordsSet(pathToFile)); circularCloudDrawing.DrawWords(CountingWords.GetWordAndNumberOfRepetitions(processedWord), wordDrawSettings); circularCloudDrawing.SaveImage(pathToSaveFile); }
public Result <None> Run(string pathToFile, string pathToSaveFile, ImageSettings imageSettings, WordDrawSettings wordDrawSettings) { circularCloudDrawing.SetOptions(imageSettings); return(pathToFile.AsResult() .Then(readerFromFile.GetWordsSet) .Then(preprocessingWords.Preprocessing) .Then(CountingWords.GetWordAndNumberOfRepetitions) .Then(e => circularCloudDrawing.DrawWords(e, wordDrawSettings)) .Then(_ => circularCloudDrawing.SaveImage(pathToSaveFile))); ; }