You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
116
external/ikvm/reflect/Universe.cs
vendored
116
external/ikvm/reflect/Universe.cs
vendored
@@ -136,8 +136,6 @@ namespace IKVM.Reflection
|
||||
DisableWindowsRuntimeProjection = 64,
|
||||
DecodeVersionInfoAttributeBlobs = 128,
|
||||
DeterministicOutput = 256,
|
||||
|
||||
SupressReferenceTypeIdentityConversion = 1 << 20
|
||||
}
|
||||
|
||||
public sealed class Universe : IDisposable
|
||||
@@ -180,26 +178,16 @@ namespace IKVM.Reflection
|
||||
private Type typeof_System_DateTime;
|
||||
private Type typeof_System_DBNull;
|
||||
private Type typeof_System_Decimal;
|
||||
private Type typeof_System_NonSerializedAttribute;
|
||||
private Type typeof_System_SerializableAttribute;
|
||||
private Type typeof_System_AttributeUsageAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_DllImportAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_FieldOffsetAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_InAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_MarshalAsAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_UnmanagedType;
|
||||
private Type typeof_System_Runtime_InteropServices_VarEnum;
|
||||
private Type typeof_System_Runtime_InteropServices_OutAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_StructLayoutAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_OptionalAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_PreserveSigAttribute;
|
||||
private Type typeof_System_Runtime_InteropServices_CallingConvention;
|
||||
private Type typeof_System_Runtime_InteropServices_CharSet;
|
||||
private Type typeof_System_Runtime_InteropServices_ComImportAttribute;
|
||||
private Type typeof_System_Runtime_CompilerServices_DecimalConstantAttribute;
|
||||
private Type typeof_System_Runtime_CompilerServices_SpecialNameAttribute;
|
||||
private Type typeof_System_Runtime_CompilerServices_MethodImplAttribute;
|
||||
private Type typeof_System_Security_SuppressUnmanagedCodeSecurityAttribute;
|
||||
private Type typeof_System_Reflection_AssemblyCopyrightAttribute;
|
||||
private Type typeof_System_Reflection_AssemblyTrademarkAttribute;
|
||||
private Type typeof_System_Reflection_AssemblyProductAttribute;
|
||||
@@ -399,16 +387,6 @@ namespace IKVM.Reflection
|
||||
get { return typeof_System_Decimal ?? (typeof_System_Decimal = ImportMscorlibType("System", "Decimal")); }
|
||||
}
|
||||
|
||||
internal Type System_NonSerializedAttribute
|
||||
{
|
||||
get { return typeof_System_NonSerializedAttribute ?? (typeof_System_NonSerializedAttribute = ImportMscorlibType("System", "NonSerializedAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_SerializableAttribute
|
||||
{
|
||||
get { return typeof_System_SerializableAttribute ?? (typeof_System_SerializableAttribute = ImportMscorlibType("System", "SerializableAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_AttributeUsageAttribute
|
||||
{
|
||||
get { return typeof_System_AttributeUsageAttribute ?? (typeof_System_AttributeUsageAttribute = ImportMscorlibType("System", "AttributeUsageAttribute")); }
|
||||
@@ -424,11 +402,6 @@ namespace IKVM.Reflection
|
||||
get { return typeof_System_Runtime_InteropServices_FieldOffsetAttribute ?? (typeof_System_Runtime_InteropServices_FieldOffsetAttribute = ImportMscorlibType("System.Runtime.InteropServices", "FieldOffsetAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_InteropServices_InAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_InteropServices_InAttribute ?? (typeof_System_Runtime_InteropServices_InAttribute = ImportMscorlibType("System.Runtime.InteropServices", "InAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_InteropServices_MarshalAsAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_InteropServices_MarshalAsAttribute ?? (typeof_System_Runtime_InteropServices_MarshalAsAttribute = ImportMscorlibType("System.Runtime.InteropServices", "MarshalAsAttribute")); }
|
||||
@@ -444,21 +417,6 @@ namespace IKVM.Reflection
|
||||
get { return typeof_System_Runtime_InteropServices_VarEnum ?? (typeof_System_Runtime_InteropServices_VarEnum = ImportMscorlibType("System.Runtime.InteropServices", "VarEnum")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_InteropServices_OutAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_InteropServices_OutAttribute ?? (typeof_System_Runtime_InteropServices_OutAttribute = ImportMscorlibType("System.Runtime.InteropServices", "OutAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_InteropServices_StructLayoutAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_InteropServices_StructLayoutAttribute ?? (typeof_System_Runtime_InteropServices_StructLayoutAttribute = ImportMscorlibType("System.Runtime.InteropServices", "StructLayoutAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_InteropServices_OptionalAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_InteropServices_OptionalAttribute ?? (typeof_System_Runtime_InteropServices_OptionalAttribute = ImportMscorlibType("System.Runtime.InteropServices", "OptionalAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_InteropServices_PreserveSigAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_InteropServices_PreserveSigAttribute ?? (typeof_System_Runtime_InteropServices_PreserveSigAttribute = ImportMscorlibType("System.Runtime.InteropServices", "PreserveSigAttribute")); }
|
||||
@@ -474,31 +432,11 @@ namespace IKVM.Reflection
|
||||
get { return typeof_System_Runtime_InteropServices_CharSet ?? (typeof_System_Runtime_InteropServices_CharSet = ImportMscorlibType("System.Runtime.InteropServices", "CharSet")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_InteropServices_ComImportAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_InteropServices_ComImportAttribute ?? (typeof_System_Runtime_InteropServices_ComImportAttribute = ImportMscorlibType("System.Runtime.InteropServices", "ComImportAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_CompilerServices_DecimalConstantAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_CompilerServices_DecimalConstantAttribute ?? (typeof_System_Runtime_CompilerServices_DecimalConstantAttribute = ImportMscorlibType("System.Runtime.CompilerServices", "DecimalConstantAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_CompilerServices_SpecialNameAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_CompilerServices_SpecialNameAttribute ?? (typeof_System_Runtime_CompilerServices_SpecialNameAttribute = ImportMscorlibType("System.Runtime.CompilerServices", "SpecialNameAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Runtime_CompilerServices_MethodImplAttribute
|
||||
{
|
||||
get { return typeof_System_Runtime_CompilerServices_MethodImplAttribute ?? (typeof_System_Runtime_CompilerServices_MethodImplAttribute = ImportMscorlibType("System.Runtime.CompilerServices", "MethodImplAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Security_SuppressUnmanagedCodeSecurityAttribute
|
||||
{
|
||||
get { return typeof_System_Security_SuppressUnmanagedCodeSecurityAttribute ?? (typeof_System_Security_SuppressUnmanagedCodeSecurityAttribute = ImportMscorlibType("System.Security", "SuppressUnmanagedCodeSecurityAttribute")); }
|
||||
}
|
||||
|
||||
internal Type System_Reflection_AssemblyCopyrightAttribute
|
||||
{
|
||||
get { return typeof_System_Reflection_AssemblyCopyrightAttribute ?? (typeof_System_Reflection_AssemblyCopyrightAttribute = ImportMscorlibType("System.Reflection", "AssemblyCopyrightAttribute")); }
|
||||
@@ -915,6 +853,55 @@ namespace IKVM.Reflection
|
||||
return parser.GetType(this, context == null ? null : context.ManifestModule, false, assemblyQualifiedTypeName, true, false);
|
||||
}
|
||||
|
||||
public Type GetBuiltInType(string ns, string name)
|
||||
{
|
||||
if (ns != "System")
|
||||
{
|
||||
return null;
|
||||
}
|
||||
switch (name)
|
||||
{
|
||||
case "Boolean":
|
||||
return System_Boolean;
|
||||
case "Char":
|
||||
return System_Char;
|
||||
case "Object":
|
||||
return System_Object;
|
||||
case "String":
|
||||
return System_String;
|
||||
case "Single":
|
||||
return System_Single;
|
||||
case "Double":
|
||||
return System_Double;
|
||||
case "SByte":
|
||||
return System_SByte;
|
||||
case "Int16":
|
||||
return System_Int16;
|
||||
case "Int32":
|
||||
return System_Int32;
|
||||
case "Int64":
|
||||
return System_Int64;
|
||||
case "IntPtr":
|
||||
return System_IntPtr;
|
||||
case "UIntPtr":
|
||||
return System_UIntPtr;
|
||||
case "TypedReference":
|
||||
return System_TypedReference;
|
||||
case "Byte":
|
||||
return System_Byte;
|
||||
case "UInt16":
|
||||
return System_UInt16;
|
||||
case "UInt32":
|
||||
return System_UInt32;
|
||||
case "UInt64":
|
||||
return System_UInt64;
|
||||
case "Void":
|
||||
return System_Void;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Assembly[] GetAssemblies()
|
||||
{
|
||||
Assembly[] array = new Assembly[assemblies.Count + dynamicAssemblies.Count];
|
||||
@@ -1254,11 +1241,6 @@ namespace IKVM.Reflection
|
||||
get { return (options & UniverseOptions.DecodeVersionInfoAttributeBlobs) != 0; }
|
||||
}
|
||||
|
||||
internal bool SupressReferenceTypeIdentityConversion
|
||||
{
|
||||
get { return (options & UniverseOptions.SupressReferenceTypeIdentityConversion) != 0; }
|
||||
}
|
||||
|
||||
internal bool Deterministic
|
||||
{
|
||||
get { return (options & UniverseOptions.DeterministicOutput) != 0; }
|
||||
|
||||
Reference in New Issue
Block a user