Mono.CSharp.ReportPrinter.Print C# (CSharp) Method

Print() public method

public Print ( AbstractMessage msg ) : void
msg AbstractMessage
return void
		public virtual void Print (AbstractMessage msg)
		{
			if (msg.IsWarning)
				++warnings;
			else
				++errors;
		}

Same methods

ReportPrinter::Print ( AbstractMessage msg, TextWriter output ) : void

Usage Example

Example #1
0
        public void Warning(int code, int level, Location loc, string message)
        {
            if (reporting_disabled > 0)
            {
                return;
            }

            if (!IsWarningEnabled(code, level, loc))
            {
                return;
            }

            AbstractMessage msg;

            if (IsWarningAsError(code))
            {
                message = "Warning as Error: " + message;
                msg     = new ErrorMessage(code, loc, message, extra_information);
            }
            else
            {
                msg = new WarningMessage(code, loc, message, extra_information);
            }

            extra_information.Clear();
            printer.Print(msg);
        }
All Usage Examples Of Mono.CSharp.ReportPrinter::Print