Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Mono
diff options
context:
space:
mode:
authorJb Evain <jb@evain.net>2017-03-09 05:54:24 +0300
committerJb Evain <jb@evain.net>2017-03-09 06:19:43 +0300
commit56511b52da59935feb38ff4c20382033bc1d390c (patch)
treea876f24e160ee307e023ad441f76fc84c121bb83 /Mono
parentc08c1878f61f5d2f9453cedd56d8dec8d34f9c80 (diff)
Bring the ReflectionImporter to NET_CORE
Diffstat (limited to 'Mono')
-rw-r--r--Mono/Type.cs47
1 files changed, 46 insertions, 1 deletions
diff --git a/Mono/Type.cs b/Mono/Type.cs
index d04a615..4ff2048 100644
--- a/Mono/Type.cs
+++ b/Mono/Type.cs
@@ -79,7 +79,7 @@ namespace Mono {
#endif
}
- public static Assembly GetAssembly (this Type type)
+ public static Assembly Assembly (this Type type)
{
#if NET_CORE
return type.GetTypeInfo ().Assembly;
@@ -87,5 +87,50 @@ namespace Mono {
return type.Assembly;
#endif
}
+
+ public static MethodBase DeclaringMethod (this Type type)
+ {
+#if NET_CORE
+ return type.GetTypeInfo ().DeclaringMethod;
+#else
+ return type.DeclaringMethod;
+#endif
+ }
+
+ public static Type [] GetGenericArguments (this Type type)
+ {
+#if NET_CORE
+ return type.GetTypeInfo ().GenericTypeArguments;
+#else
+ return type.GetGenericArguments ();
+#endif
+ }
+
+ public static bool IsGenericType (this Type type)
+ {
+#if NET_CORE
+ return type.GetTypeInfo ().IsGenericType;
+#else
+ return type.IsGenericType;
+#endif
+ }
+
+ public static bool IsGenericTypeDefinition (this Type type)
+ {
+#if NET_CORE
+ return type.GetTypeInfo ().IsGenericTypeDefinition;
+#else
+ return type.IsGenericTypeDefinition;
+#endif
+ }
+
+ public static bool IsValueType (this Type type)
+ {
+#if NET_CORE
+ return type.GetTypeInfo ().IsValueType;
+#else
+ return type.IsValueType;
+#endif
+ }
}
}