2727#endif // CORE_CLR || NETSTANDARD1_1
2828using System . Globalization ;
2929using System . Linq ;
30+ using System . Reflection ;
3031
3132using MsgPack . Serialization . Reflection ;
3233
@@ -39,6 +40,27 @@ internal class TypeDefinition
3940 {
4041 private static readonly TypeDefinition [ ] EmptyArray = new TypeDefinition [ 0 ] ;
4142
43+ public static readonly TypeDefinition ObjectType = TypeDefinition . Object ( typeof ( object ) ) ;
44+ public static readonly TypeDefinition ByteType = TypeDefinition . Object ( typeof ( byte ) ) ;
45+ public static readonly TypeDefinition SByteType = TypeDefinition . Object ( typeof ( sbyte ) ) ;
46+ public static readonly TypeDefinition Int16Type = TypeDefinition . Object ( typeof ( short ) ) ;
47+ public static readonly TypeDefinition UInt16Type = TypeDefinition . Object ( typeof ( ushort ) ) ;
48+ public static readonly TypeDefinition Int32Type = TypeDefinition . Object ( typeof ( int ) ) ;
49+ public static readonly TypeDefinition UInt32Type = TypeDefinition . Object ( typeof ( uint ) ) ;
50+ public static readonly TypeDefinition Int64Type = TypeDefinition . Object ( typeof ( long ) ) ;
51+ public static readonly TypeDefinition UInt64Type = TypeDefinition . Object ( typeof ( ulong ) ) ;
52+ public static readonly TypeDefinition SingleType = TypeDefinition . Object ( typeof ( float ) ) ;
53+ public static readonly TypeDefinition DoubleType = TypeDefinition . Object ( typeof ( double ) ) ;
54+ public static readonly TypeDefinition BooleanType = TypeDefinition . Object ( typeof ( bool ) ) ;
55+ public static readonly TypeDefinition CharType = TypeDefinition . Object ( typeof ( char ) ) ;
56+ public static readonly TypeDefinition StringType = TypeDefinition . Object ( typeof ( string ) ) ;
57+ public static readonly TypeDefinition TypeType = TypeDefinition . Object ( typeof ( Type ) ) ;
58+ public static readonly TypeDefinition MethodBaseType = TypeDefinition . Object ( typeof ( MethodBase ) ) ;
59+ public static readonly TypeDefinition FieldInfoType = TypeDefinition . Object ( typeof ( FieldInfo ) ) ;
60+ public static readonly TypeDefinition SerializationContextType = TypeDefinition . Object ( typeof ( SerializationContext ) ) ;
61+
62+
63+
4264 private readonly Flags _flags ;
4365
4466 public bool IsArray
0 commit comments