Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ReportMessage.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Shaders.Ast;
4 
5 namespace SiliconStudio.Shaders.Utility
6 {
7  /// <summary>
8  /// A report message.
9  /// </summary>
10  public class ReportMessage
11  {
12  #region Constants and Fields
13 
14  /// <summary>
15  /// Type of the message.
16  /// </summary>
18 
19  /// <summary>
20  /// Span and location attached to this message.
21  /// </summary>
22  public SourceSpan Span;
23 
24  /// <summary>
25  /// The error code.
26  /// </summary>
27  public string Code;
28 
29  /// <summary>
30  /// Text of the message.
31  /// </summary>
32  public string Text;
33 
34  #endregion
35 
36  #region Constructors and Destructors
37 
38  /// <summary>
39  /// Initializes a new instance of the <see cref="ReportMessage"/> class.
40  /// </summary>
41  public ReportMessage()
42  {
43  }
44 
45  /// <summary>
46  /// Initializes a new instance of the <see cref="ReportMessage"/> class.
47  /// </summary>
48  /// <param name="level">The type.</param>
49  /// <param name="code">The error code.</param>
50  /// <param name="text">The text.</param>
51  /// <param name="span">The span.</param>
52  public ReportMessage(ReportMessageLevel level, string code, string text, SourceSpan span)
53  {
54  this.Level = level;
55  this.Code = code;
56  this.Text = text;
57  this.Span = span;
58  }
59 
60  #endregion
61 
62  #region Public Methods
63 
64  /// <inheritdoc/>
65  public override string ToString()
66  {
67  return string.Format("{0}: {1} {2} : {3}", this.Span, this.Level.ToString().ToLower(), this.Code, this.Text);
68  }
69 
70  #endregion
71  }
72 }
ReportMessage(ReportMessageLevel level, string code, string text, SourceSpan span)
Initializes a new instance of the ReportMessage class.
ReportMessage()
Initializes a new instance of the ReportMessage class.
SourceSpan Span
Span and location attached to this message.
ReportMessageLevel
Level of a ReportMessage.
ReportMessageLevel Level
Type of the message.