Пример #1
0
 public void OutputWarningEvent(OutputWarningEventArgs args)
 {
     buildEngine.LogWarningEvent(new BuildWarningEventArgs(
         args.SubCategory, args.Code, args.File,
         args.LineNumber, args.ColumnNumber, args.EndLineNumber, args.EndColumnNumber,
         args.Message, "", args.SenderName, args.Timestamp, null));
 }
Пример #2
0
 public void OutputWarningEvent(OutputWarningEventArgs e)
 {
 }
Пример #3
0
        public void OutputWarningEvent(OutputWarningEventArgs e)
        {
            if (Silent)
                return;

            // In case of resource problems
            try
            {
                Console.ForegroundColor = ConsoleColor.Yellow;

                if (!String.IsNullOrEmpty(e.File))
                {
                    writer.Write("{0}({1},{2}): ", e.File, e.LineNumber, e.ColumnNumber);
                }

                writer.Write(OutputterResources.Warning, e.Code);
                writer.WriteLine(e.Message);
            }
            finally
            {
                Console.ResetColor();
            }
        }
Пример #4
0
        public void Warning(
            string subcategory,
            string code,
            string file,
            int lineNumber,
            int columnNumber,
            int endLineNumber,
            int endColumnNumber,
            string helpKeyword,
            string senderName,
            DateTime timestamp,
            int threadId,
            string message,
            params object[] messageArgs)
        {
            if (warningsAsErrors)
            {
                Error(
                    subcategory,
                    code,
                    file,
                    lineNumber,
                    columnNumber,
                    endLineNumber,
                    endColumnNumber,
                    helpKeyword,
                    senderName,
                    timestamp,
                    threadId,
                    message,
                    messageArgs);
                return;
            }

            OutputWarningEventArgs e = new OutputWarningEventArgs(
                subcategory,
                code,
                file,
                lineNumber,
                columnNumber,
                endLineNumber,
                endColumnNumber,
                helpKeyword,
                senderName,
                timestamp,
                threadId,
                messageArgs.Length == 0 ? message : message.CultureFormat(messageArgs));

            this.outputter.OutputWarningEvent(e);
        }
Пример #5
0
 void IOutputter.OutputWarningEvent(OutputWarningEventArgs e)
 {
     Trace.WriteLine(Format(e.Code, e.Message));
 }