Esempio n. 1
0
        public void Emit(DiagnosticInfo info)
        {
            if (info.Kind == DiagnosticKind.Debug && !Verbose)
                return;

            var currentIndent = Indents.Sum();
            var message = new string(' ', currentIndent) + info.Message;

            Console.WriteLine(message);
            Debug.WriteLine(message);
        }
Esempio n. 2
0
        public static void Warning(this ILog consumer, string msg, 
            params object[] args)
        {
            var diagInfo = new DiagnosticInfo
            {
                Kind = DiagnosticKind.Warning,
                Message = string.Format(msg, args)
            };

            consumer.Emit(diagInfo);
        }