Exemplo n.º 1
0
        static void consoleWriter_WriteLineEvent(object sender, ConsoleWriterEventArgs e)
        {
            if (builtString != "")
            {
                if (!(builtString.Contains("WARN") && s_CommandLineOpts.IgnoreWarn))
                {
                    Console.SetOut(oldOut);
                    Console.Write(builtString);
                    Console.SetOut(newOut);
                }
                if (!builtString.EndsWith("\n"))
                {
                    Console.Write("\n");
                }
                builtString = "";
            }

            /* Linux Double-WriteLine Bug Workaround, Why does this Happen? IDK */
            bool mono = Type.GetType("Mono.Runtime") != null;

            if (!mono)
            {
                Console.SetOut(oldOut);
                Console.WriteLine(e.Value);
                Console.SetOut(newOut);
            }
        }
Exemplo n.º 2
0
        static void consoleWriter_WriteEvent(object sender, ConsoleWriterEventArgs e)
        {
            //Console.SetOut(oldOut);
            //Console.Write(e.Value);
            //Console.SetOut(newOut);

            /* Slightly Messy but it'll get the job done*/
            builtString += e.Value;
            if (e.Value.EndsWith("\n"))
            {
                if (!(builtString.Contains("WARN") && s_CommandLineOpts.IgnoreWarn))
                {
                    Console.SetOut(oldOut);
                    Console.Write(builtString);
                    Console.SetOut(newOut);
                }
                builtString = "";
            }
        }