コード例 #1
0
        public Result <None> Generate(Arguments arguments)
        {
            var wordsColor      = Color.FromName(arguments.WordsColorName);
            var backgroundColor = Color.FromName(arguments.BackgroundColorName);
            var font            = new FontFamily(arguments.FontFamilyName);

            return(wordsFileReader
                   .ReadWords(arguments.WordsFileName)
                   .Then(Process)
                   .Then(words => counter.GetWordsInfo(words))
                   .Then(wordInfos => wordsLayouter.GenerateLayout(wordInfos, font, arguments.Multiplier))
                   .Then(layout => wordsDrawer.CreateImage(layout, wordsColor, backgroundColor))
                   .Then(image => Save(image, arguments)));
        }