/// <summary>
        ///     Gets a copy of all stored output if PassThroughOnly is not active.
        /// </summary>
        /// <returns>Any stored output.</returns>
        public string GetText()
        {
            lock (this)
            {
                if (PassThroughOnly)
                {
                    return("PassThroughOnly specified. No local recording of data performed");
                }

                var sb = new DbgStringBuilder(ExecutionUtilities, 2048);
                sb.Append(DataBuffer);
                foreach (var LineBuffer in LineBuffers)
                {
                    if (LineBuffer.Value.Length != 0)
                    {
                        sb.Append(FilterLine(LineBuffer.Key, LineBuffer.Value.ToString(), PreviousTextWasDml, PreviousDmlFlags));
                    }
                }

                return(sb.ToString());
            }
        }
Example #2
0
 public static DebugUtilities.DML ToDML(this DbgStringBuilder sb, string command, DebugUtilities.DML.Colors color)
 {
     return(new DebugUtilities.DML {
         Text = sb.ToString(), Command = command, Color = color
     });
 }