Permalink
Browse files

Add mono_reflection_type_get_type () api function to return the MonoT…

…ype* corresponding to a System.Type.
  • Loading branch information...
1 parent d3e5167 commit 82f59b8a6406ab6f841e0c81379dc1f69722b950 @vargaz vargaz committed Dec 14, 2011
Showing with 17 additions and 0 deletions.
  1. +15 −0 mono/metadata/reflection.c
  2. +2 −0 mono/metadata/reflection.h
View
@@ -12554,3 +12554,18 @@ mono_reflection_call_is_assignable_to (MonoClass *klass, MonoClass *oklass)
else
return *(MonoBoolean*)mono_object_unbox (res);
}
+
+/**
+ * mono_reflection_type_get_type:
+ * @reftype: the System.Type object
+ *
+ * Returns the MonoType* associated with the C# System.Type object @reftype.
+ */
+MonoType*
+mono_reflection_type_get_type (MonoReflectionType *reftype)
+{
+ g_assert (reftype);
+
+ return reftype->type;
+}
+
@@ -132,6 +132,8 @@ MonoBoolean mono_declsec_get_method_action (MonoMethod *method, uint32_t action,
MonoBoolean mono_declsec_get_class_action (MonoClass *klass, uint32_t action, MonoDeclSecurityEntry *entry);
MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, uint32_t action, MonoDeclSecurityEntry *entry);
+MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype);
+
MONO_END_DECLS
#endif /* __METADATA_REFLECTION_H__ */

0 comments on commit 82f59b8

Please sign in to comment.