Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
MessageCode.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 namespace SiliconStudio.Shaders.Utility
4 {
5  public partial class MessageCode
6  {
7  public readonly string Code;
8 
9  public readonly string Text;
10 
11  public MessageCode(string text)
12  {
13  Code = "";
14  Text = text;
15  }
16 
17  public MessageCode(string code, string text)
18  {
19  Code = code;
20  Text = text;
21  }
22 
23  public static implicit operator MessageCode(string text)
24  {
25  return new MessageCode(text);
26  }
27 
28  #region Static members
29 
30  // Warnings
31  public static readonly MessageCode WarningUnknown = new MessageCode("W0000", "Unknown warning");
32 
33  public static readonly MessageCode WarningTypeAsConstructor = new MessageCode("W0001", "Invalid type used as a constructor [{0}]");
34  public static readonly MessageCode WarningTypeInferenceUnknownExpression = new MessageCode("W0002", "Type inference for unknown expression is supported [{0}]");
35 
36  // Error
37  public static readonly MessageCode ErrorAnalysisUnknown = new MessageCode("E0000", "Unknown analysis error");
38 
39  public static readonly MessageCode ErrorBinaryTypeDeduction = new MessageCode("E0001", "Can't deduce type of binary operation between [{0}] and [{1}]");
40  public static readonly MessageCode ErrorScalarTypeConversion = new MessageCode("E0002", "Unsupported scalar type conversion between [{0}] and [{1}]");
41  public static readonly MessageCode ErrorIndexerType = new MessageCode("E0003", "Unable to find type for indexer: [{0}]");
42  public static readonly MessageCode ErrorLiteralType = new MessageCode("E0004", "Unable to find type reference for literal value [{0}]");
43  public static readonly MessageCode ErrorNoOverloadedMethod = new MessageCode("E0005", "Unable to find a suitable overloaded method [{0}]");
44  public static readonly MessageCode ErrorNoReferencedMethod = new MessageCode("E0006", "Unable to find the referenced method [{0}]");
45  public static readonly MessageCode ErrorNoTypeReferenceMember = new MessageCode("E0007", "Unable to find type reference for member [{0}]");
46  public static readonly MessageCode ErrorNoTypeReferenceTypename = new MessageCode("E0008", "Unable to find type reference for typename [{0}]");
47 
48  #endregion
49  }
50 }
MessageCode(string code, string text)
Definition: MessageCode.cs:17