예제 #1
0
 /// <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));
 }
예제 #2
0
 /// <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));
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 /// <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);
 }
예제 #5
0
 /// <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);
 }
예제 #6
0
 /// <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);
 }
예제 #7
0
 /// <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);
 }