示例#1
0
 public Result <Image> GenerateCloud(ImmutableList <string> words)
 {
     return(Result.Of(() => DetermineTags(words))
            .Then(tags => GetLayout(tags))
            .Then(layout => renderer.Render(layout))
            .Then(image => TagCloudImage = image)
            .RefineError("Can't generate tags cloud"));
 }
示例#2
0
        public Image GenerateCloud(List <string> words)
        {
            var tags   = DetermineTags(words);
            var layout = GetLayout(tags);

            TagCloudImage = renderer.Render(layout);
            return(TagCloudImage);
        }