Exemplo n.º 1
0
        public RenderableComposer Color(ConsoleColor color, Action <RenderableComposer> action)
        {
            var content = new RenderableComposer();

            action(content);
            Root.Append(new ColorElement(color, content.Root));
            return(this);
        }
Exemplo n.º 2
0
        public RenderableComposer Condition(bool condition,
                                            Action <RenderableComposer> @true,
                                            Action <RenderableComposer> @false)
        {
            if (condition)
            {
                var block = new RenderableComposer();
                @true(block);
                Root.Append(block.Root);
            }
            else
            {
                var block = new RenderableComposer();
                @false(block);
                Root.Append(block.Root);
            }

            return(this);
        }