g_string_append_c (res, '&');
}
+/**
+ * mono_type_full_name:
+ */
char*
mono_type_full_name (MonoType *type)
{
return g_string_free (str, FALSE);
}
+/**
+ * mono_signature_get_desc:
+ */
char*
mono_signature_get_desc (MonoMethodSignature *sig, gboolean include_namespace)
{
* Creates a method description for \p name, which conforms to the following
* specification:
*
- * [namespace.]classname:methodname[(args...)]
+ * <code>[namespace.]classname:methodname[(args...)]</code>
*
* in all the loaded assemblies.
*
- * Both classname and methodname can contain '*' which matches anything.
+ * Both classname and methodname can contain <code>*</code> which matches anything.
*
* \returns a parsed representation of the method description.
*/
return result;
}
+/**
+ * mono_method_desc_from_method:
+ */
MonoMethodDesc*
mono_method_desc_from_method (MonoMethod *method)
{
/**
* mono_method_desc_free:
* \param desc method description to be released
- * Releases the MonoMethodDesc object \p desc.
+ * Releases the \c MonoMethodDesc object \p desc.
*/
void
mono_method_desc_free (MonoMethodDesc *desc)
}
/**
- * mono_method_descr_match:
+ * mono_method_desc_match:
* \param desc \c MonoMethoDescription
* \param method \c MonoMethod to test
*
return match_class (desc, pos, klass->nested_in);
}
+/**
+ * mono_method_desc_full_match:
+ */
gboolean
mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method)
{
return mono_method_desc_match (desc, method);
}
+/**
+ * mono_method_desc_search_in_class:
+ */
MonoMethod*
mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass)
{
return NULL;
}
+/**
+ * mono_method_desc_search_in_image:
+ */
MonoMethod*
mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image)
{
NULL /* user data */
};
+/**
+ * mono_disasm_code_one:
+ */
char*
mono_disasm_code_one (MonoDisHelper *dh, MonoMethod *method, const guchar *ip, const guchar **endp)
{
return result;
}
+/**
+ * mono_disasm_code:
+ */
char*
mono_disasm_code (MonoDisHelper *dh, MonoMethod *method, const guchar *ip, const guchar* end)
{
char *inst_desc = NULL;
MonoError error;
+ const char *class_method_separator = ":";
+ const char *method_sig_space = " ";
+ if (format == MONO_TYPE_NAME_FORMAT_REFLECTION) {
+ class_method_separator = ".";
+ method_sig_space = "";
+ }
+
if (format == MONO_TYPE_NAME_FORMAT_IL)
klass_desc = mono_type_full_name (&method->klass->byval_arg);
else
strcpy (wrapper, "");
if (ret && sig) {
char *ret_str = mono_type_full_name (sig->ret);
- res = g_strdup_printf ("%s%s %s:%s%s (%s)", wrapper, ret_str, klass_desc,
- method->name, inst_desc ? inst_desc : "", tmpsig);
+ res = g_strdup_printf ("%s%s %s%s%s%s%s(%s)", wrapper, ret_str, klass_desc,
+ class_method_separator,
+ method->name, inst_desc ? inst_desc : "", method_sig_space, tmpsig);
g_free (ret_str);
} else {
- res = g_strdup_printf ("%s%s:%s%s (%s)", wrapper, klass_desc,
- method->name, inst_desc ? inst_desc : "", tmpsig);
+ res = g_strdup_printf ("%s%s%s%s%s%s(%s)", wrapper, klass_desc,
+ class_method_separator,
+ method->name, inst_desc ? inst_desc : "", method_sig_space, tmpsig);
}
g_free (tmpsig);
} else {
- res = g_strdup_printf ("%s%s:%s%s", wrapper, klass_desc,
+ res = g_strdup_printf ("%s%s%s%s%s", wrapper, klass_desc,
+ class_method_separator,
method->name, inst_desc ? inst_desc : "");
}
return res;
}
+/**
+ * mono_method_full_name:
+ */
char *
mono_method_full_name (MonoMethod *method, gboolean signature)
{
return mono_method_get_name_full (method, TRUE, TRUE, MONO_TYPE_NAME_FORMAT_IL);
}
+/**
+ * mono_method_get_reflection_name:
+ *
+ * Returns the name of the method, including signature, using the same formating as reflection.
+ */
+char *
+mono_method_get_reflection_name (MonoMethod *method)
+{
+ return mono_method_get_name_full (method, TRUE, FALSE, MONO_TYPE_NAME_FORMAT_REFLECTION);
+}
+
static const char*
print_name_space (MonoClass *klass)
{