Print() 공개 메소드

public Print ( AbstractMessage msg ) : void
msg AbstractMessage
리턴 void
예제 #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);
        }
예제 #2
0
        //
        // Prints collected messages, common messages have a priority
        //
        public bool Merge(ReportPrinter dest)
        {
            var messages_to_print = merged_messages;

            if (common_messages != null && common_messages.Count > 0)
            {
                messages_to_print = common_messages;
            }

            if (messages_to_print == null)
            {
                return(false);
            }

            bool error_msg = false;

            foreach (AbstractMessage msg in messages_to_print)
            {
                dest.Print(msg, showFullPaths);
                error_msg |= !msg.IsWarning;
            }

            if (reported_missing_definitions != null)
            {
                foreach (var missing in reported_missing_definitions)
                {
                    dest.MissingTypeReported(missing);
                }
            }

            return(error_msg);
        }
예제 #3
0
        public void Warning(int code, int level, Location loc, string message)
        {
            if (reporting_disabled > 0)
            {
                return;
            }

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

            if (warning_regions_table != null && !loc.IsNull)
            {
                WarningRegions regions;
                if (warning_regions_table.TryGetValue(loc.File, out regions) && !regions.IsWarningEnabled(code, loc.Row))
                {
                    return;
                }
            }

            AbstractMessage msg;

            if (settings.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, settings.ShowFullPaths);
        }
예제 #4
0
		//
		// Prints collected messages, common messages have a priority
		//
		public bool Merge (ReportPrinter dest)
		{
			var messages_to_print = merged_messages;
			if (common_messages != null && common_messages.Count > 0) {
				messages_to_print = common_messages;
			}

			if (messages_to_print == null)
				return false;

			bool error_msg = false;
			foreach (AbstractMessage msg in messages_to_print) {
				dest.Print (msg);
				error_msg |= !msg.IsWarning;
			}

			return error_msg;
		}
예제 #5
0
        //
        // Prints collected messages, common messages have a priority
        //
        public bool Merge(ReportPrinter dest)
        {
            ArrayList messages_to_print = merged_messages;

            if (common_messages != null && common_messages.Count > 0)
            {
                messages_to_print = common_messages;
            }

            if (messages_to_print == null)
            {
                return(false);
            }

            foreach (AbstractMessage msg in messages_to_print)
            {
                dest.Print(msg);
            }

            return(true);
        }
예제 #6
0
		//
		// Prints collected messages, common messages have a priority
		//
		public bool Merge (ReportPrinter dest)
		{
			ArrayList messages_to_print = merged_messages;
			if (common_messages != null && common_messages.Count > 0) {
				messages_to_print = common_messages;
			}

			if (messages_to_print == null)
				return false;

			foreach (AbstractMessage msg in messages_to_print)
				dest.Print (msg);

			return true;
		}
예제 #7
0
파일: report.cs 프로젝트: litoMalone/mono
		//
		// Prints collected messages, common messages have a priority
		//
		public bool Merge (ReportPrinter dest)
		{
			var messages_to_print = merged_messages;
			if (common_messages != null && common_messages.Count > 0) {
				messages_to_print = common_messages;
			}

			if (messages_to_print == null)
				return false;

			bool error_msg = false;
			foreach (AbstractMessage msg in messages_to_print) {
				dest.Print (msg);
				error_msg |= !msg.IsWarning;
			}

			return error_msg;
		}
예제 #8
0
파일: report.cs 프로젝트: Profit0004/mono
		//
		// Prints collected messages, common messages have a priority
		//
		public bool Merge (ReportPrinter dest)
		{
			var messages_to_print = merged_messages;
			if (common_messages != null && common_messages.Count > 0) {
				messages_to_print = common_messages;
			}

			if (messages_to_print == null)
				return false;

			bool error_msg = false;
			foreach (AbstractMessage msg in messages_to_print) {
				dest.Print (msg, showFullPaths);
				error_msg |= !msg.IsWarning;
			}

			if (reported_missing_definitions != null) {
				foreach (var missing in reported_missing_definitions)
					dest.MissingTypeReported (missing);
			}

			return error_msg;
		}