private MsCorLibTypeSignature GetCorLibSignature(Type type)
{
if (type == typeof(void))
return _typeSystem.Void;
if (type == typeof(IntPtr))
return _typeSystem.IntPtr;
if (type == typeof(UIntPtr))
return _typeSystem.UIntPtr;
if (type == typeof(TypedReference))
return _typeSystem.TypedReference;
if (type == typeof(object))
return _typeSystem.Object;
if (type.IsEnum)
return null;
switch (Type.GetTypeCode(type))
{
case TypeCode.Boolean:
return _typeSystem.Boolean;
case TypeCode.Byte:
return _typeSystem.Byte;
case TypeCode.Char:
return _typeSystem.Char;
case TypeCode.Double:
return _typeSystem.Double;
case TypeCode.Int16:
return _typeSystem.Int16;
case TypeCode.Int32:
return _typeSystem.Int32;
case TypeCode.Int64:
return _typeSystem.Int64;
case TypeCode.SByte:
return _typeSystem.SByte;
case TypeCode.Single:
return _typeSystem.Single;
case TypeCode.String:
return _typeSystem.String;
case TypeCode.UInt16:
return _typeSystem.UInt16;
case TypeCode.UInt32:
return _typeSystem.UInt32;
case TypeCode.UInt64:
return _typeSystem.UInt64;
}
return null;
}