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")); }
public Image GenerateCloud(List <string> words) { var tags = DetermineTags(words); var layout = GetLayout(tags); TagCloudImage = renderer.Render(layout); return(TagCloudImage); }