Esempio n. 1
0
        /// <summary>
        /// Writes the specified string to the output using the specified output-level and optionally
        /// the specified color.
        /// </summary>
        /// <param name="level">The output-level to output the string with.</param>
        /// <param name="s">The string to output to the console.</param>
        /// <param name="c">The color to use.</param>
        public static void Write(OutputLevel level, string s, ConsoleColor c)
        {
            if (OutputLevel > 0 && !OutputLevel.HasFlag(level))
            {
                return;
            }
            var color = Console.ForegroundColor;

            Console.ForegroundColor = c;
            Console.Write(Time.ToString("D8") + " ns| " + s);
            Console.ForegroundColor = color;
        }