예제 #1
0
        public AnsiConsoleBackend(Profile profile)
        {
            _profile = profile ?? throw new ArgumentNullException(nameof(profile));
            _builder = new AnsiBuilder(profile);

            Cursor = new AnsiConsoleCursor(this);
        }
        public AnsiConsoleBackend(IAnsiConsole console)
        {
            _console = console ?? throw new ArgumentNullException(nameof(console));
            _builder = new AnsiBuilder(_console.Profile);

            Cursor = new AnsiConsoleCursor(this);
        }
예제 #3
0
        public void Write(IRenderable renderable)
        {
            var result = AnsiBuilder.Build(_console, renderable);

            if (result?.Length > 0)
            {
                _console.Profile.Out.Writer.Write(result);
                _console.Profile.Out.Writer.Flush();
            }
        }