示例#1
0
        public override void WriteWarningLine(string message)
        {
            var splitter = new BufferSplitterCollection(OutputLineType.Warning, "WARNING: " + message, RawUI.BufferSize.Width,
                                                        PrivateData.WarningForegroundColor, PrivateData.WarningBackgroundColor, true);

            Output.AddRange(splitter);
        }
        public override void WriteLine(string value)
        {
            var splitter = new BufferSplitterCollection(OutputLineType.Output, value, RawUI, true);

            Output.AddRange(splitter);
            WriteToLog(value, LogLevel.Info);
        }
示例#3
0
        public override void WriteVerboseLine(string message)
        {
            var splitter = new BufferSplitterCollection(OutputLineType.Verbose, "VERBOSE: " + message, RawUI.WindowSize.Width,
                                                        PrivateData.VerboseForegroundColor, PrivateData.VerboseBackgroundColor, true);

            Output.AddRange(splitter);
        }
        public override void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value)
        {
            var splitter = new BufferSplitterCollection(OutputLineType.Output, value, RawUI.BufferSize.Width,
                                                        foregroundColor,
                                                        backgroundColor, false);

            Output.AddRange(splitter);
        }
示例#5
0
        public override void WriteDebugLine(string message)
        {
            var splitter = new BufferSplitterCollection(OutputLineType.Debug, "DEBUG: " + message,
                                                        RawUI.WindowSize.Width,
                                                        PrivateData.DebugForegroundColor, PrivateData.DebugBackgroundColor, true);

            Output.AddRange(splitter);
        }
示例#6
0
        public override void WriteErrorLine(string value)
        {
            var splitter = new BufferSplitterCollection(OutputLineType.Error, value, RawUI.BufferSize.Width,
                                                        PrivateData.ErrorForegroundColor,
                                                        PrivateData.ErrorBackgroundColor, true);

            Output.HasErrors = true;
            Output.AddRange(splitter);
        }
        public override void Write(string value)
        {
            var lastline = Output.LastOrDefault();

            if (!(lastline?.Terminated ?? true))
            {
                lastline.Text += value;
                if (value.EndsWith("\n"))
                {
                    lastline.Terminated = true;
                }
            }
            else
            {
                var splitter = new BufferSplitterCollection(OutputLineType.Output, value, RawUI, false);
                Output.AddRange(splitter);
            }
        }