/// <summary> /// Adds the message. /// </summary> /// <param name="level">The type.</param> /// <param name="message">The message.</param> /// <param name="span">The span.</param> /// <param name="parameters">The parameters.</param> protected void AddMessage(ReportMessageLevel level, MessageCode message, SourceSpan span, params object[] parameters) { if (level == ReportMessageLevel.Error) { this.HasErrors = true; } this.Messages.Add(new ReportMessage(level, message.Code, string.Format(message.Text, parameters), span)); }
/// <summary> /// Adds the message. /// </summary> /// <param name="level">The type.</param> /// <param name="message">The message.</param> /// <param name="span">The span.</param> protected void AddMessage(ReportMessageLevel level, MessageCode message, SourceSpan span) { if (level == ReportMessageLevel.Error) { this.HasErrors = true; } this.Messages.Add(new ReportMessage(level, message.Code, message.Text, span)); }
/// <summary> /// Logs an Error with the specified message. /// </summary> /// <param name="message">The message.</param> /// <param name="span">The span.</param> /// <param name="parameters">The parameters.</param> public void Error(MessageCode message, SourceSpan span, params object[] parameters) { this.AddMessage(ReportMessageLevel.Error, message, span, parameters); }
/// <summary> /// Logs an Error with the specified message. /// </summary> /// <param name="message">The message.</param> /// <param name="span">The span.</param> public void Error(MessageCode message, SourceSpan span) { this.AddMessage(ReportMessageLevel.Error, message, span); }
/// <summary> /// Logs an Warning with the specified message. /// </summary> /// <param name="message">The message.</param> /// <param name="span">The span.</param> /// <param name="parameters">The parameters.</param> public void Warning(MessageCode message, SourceSpan span, params object[] parameters) { this.AddMessage(ReportMessageLevel.Warning, message, span, parameters); }
/// <summary> /// Logs an Warning with the specified message. /// </summary> /// <param name="message">The message.</param> /// <param name="span">The span.</param> public void Warning(MessageCode message, SourceSpan span) { this.AddMessage(ReportMessageLevel.Warning, message, span); }
/// <summary> /// Logs an Info with the specified message. /// </summary> /// <param name="message">The message.</param> /// <param name="span">The span.</param> public void Info(MessageCode message, SourceSpan span) { this.AddMessage(ReportMessageLevel.Info, message, span); }