<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>$name</title>
- <style type="text/css">
- h3 {
- font-size: 18px;
- padding-bottom: 4pt;
- border-bottom: 2px solid #dddddd;
- }
-
+ <title>$name</title>
+ <style type="text/css">
+ body {
+ line-height: 1.5;
+ padding-left: 2em;
+ padding-right: 2em;
+ }
+ body code {
+ font-family: "Consolas", "Courier", monospace;
+ border: 1px solid rgba(214,214,214,1);
+ background-color: rgba(249,249,249,1);
+ padding-left: 3px;
+ padding-right: 3px;
+ }
+
+ .api-entry code {
+ border: none;
+ background-color: transparent;
+ }
+ h3 {
+ }
+
+ .api-parameters {
+ border-collapse: collapse;
+ border-spacing: 0;
+ empty-cells: hide;
+ border: 0;
+ margin: 5px 0 26px;
+ }
+
+ .api-parameters td {
+ border: 1px solid rgba(214,214,214,1);
+ border-left-style: none;
+ padding: 5px 25px 5px 10px;
+ }
+
+ .api-parameters tr>td:last-child {
+ border-right: 0;
+ }
+
+ .api-parameters td:first-of-type {
+ text-align: right;
+ padding: 7px;
+ vertical-align: top;
+ word-break: normal;
+ width: 40px;
+ }
+
+ .api-parameters tr:last-child>td {
+ border-bottom: 0;
+ }
+
+ .api-parameters tr:first-child>td {
+ border-top: 0;
+ }
+
+ .api-parameters tr td:first-of-type {
+ text-align: right;
+ padding: 7px;
+ vertical-align: top;
+ word-break: normal;
+ width: 40px;
+ }
+
.api {
- padding: 10pt;
- margin: 10pt;
- border: 3px solid #ddd;
- }
-
- .api-entry {
- border-bottom: none;
- font-size: 150%;
- font-family: "Consolas", "Courier", monospace;
- padding-bottom: .5em;
- }
-
- .prototype {
- border: 3px solid #ecf0f1;
- border-radius: 6px;
- padding: .5em;
- margin-top: 5pt;
- margin-bottom: 5pt;
- font-family: "Consolas", "Courier", monospace;
- display: block;
- overflow: auto;
- background-color: #f9f9f9;
- }
-
- .header {
-
- padding: 0 0 5pt 5pt;
- margin: 10pt;
- white-space: pre;
- font-family: monospace;
- }
+ left: -25px;
+ margin: 0;
+ padding: 13px 25px 0;
+ position: relative;
+ width: 100%;
+ }
+
+ .api-description {
+ background: rgba(249,249,249,1);
+ border-bottom: 1px solid rgba(233,233,233,1);
+ left: -25px;
+ margin: 0;
+ padding: 13px 25px 0;
+ position: relative;
+ width: 100%;
+ }
+
+ .api-entry {
+ background: transparent;
+ }
+
+ .api-docs {
+ }
+
+ .prototype {
+ border-left: 5px solid rgba(205,233,244,1);
+ padding: .5em;
+ margin-top: 5pt;
+ margin-bottom: 5pt;
+ font-family: "Consolas", "Courier", monospace;
+ display: block;
+ overflow: auto;
+ background-color: #f9f9f9;
+ }
+
+ .header {
+ padding: 0 0 5pt 5pt;
+ margin: 10pt;
+ white-space: pre;
+ font-family: monospace;
+ border: 1px solid rgba(233,233,233,1);
+ }
- .code {
- border: 1px solid;
- padding: 0 0 5pt 5pt;
- margin: 10pt;
- white-space: pre;
- font-family: monospace;
- }
-
- .strike {
- text-decoration: line-through;
- }
- .deprecated {
- color: red;
- }
+ .code {
+ border: 1px solid;
+ padding: 0 0 5pt 5pt;
+ margin: 10pt;
+ white-space: pre;
+ font-family: monospace;
+ }
+
+ .declaration {
+ margin-top: 21px;
+ }
+
+ .api-section {
+ font-size: smaller;
+ font-weight: bold;
+ margin-top: 21px;
+ line-height: 1.5;
+ }
+
+ .strike {
+ text-decoration: line-through;
+ }
+
+ .deprecated {
+ color: red;
+ }
+
+ .api-ptr-container {
+ background: white;
+ border-bottom: 1px solid rgba(233,233,233,1);
+ left: -25px;
+ padding-left: 25px;
+ padding-right: 25px;
+ padding-bottom: 13px;
+ position: relative;
+ width: 100%;
+ }
+
+ .api-ptr {
+ background: rgba(249,249,249,1);
+ border-left: 1px solid rgba(233,233,233,1);
+ border-top: 1px solid rgba(233,233,233,1);
+ height: 12px;
+ left: 37px;
+ top: -7px;
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -o-transform: rotate(45deg);
+ transform: rotate(45deg);
+ position: absolute;
+ width: 12px;
+ }
+
+ .api-height-container {
+ height: 0;
+ left: -25px;
+ padding: 0 25px;
+ position: relative;
+ width: 100%;
+ }
+
</style>
</head>
<body>
+<div class="api-docs">
EOF
@a = split (/\n/, $files_content[$f]);
$strikeextra = "";
$proto = "Prototype: $api";
}
-print OUT<<EOF;
+ print OUT<<EOF;
<a name="api:$api"></a>
<div class="api">
- <div class="api-entry $strike">$api$strikeextra</div>
- <div><b>Syntax</b></div>
- <div class="prototype">$proto</div>
+ <div class="api-entry $strike"><code>$api$strikeextra</code></div>
+ <div class="api-height-container">
+ <div class="api-ptr-container"></div>
+ <div class="api-description">
+ <div class="api-ptr"></div>
+
+ <div class="declaration api-section">Syntax</div>
+ <div class="prototype">$proto</div>
<p>
EOF
- &opt_print ("Parameters", $arguments{$api}, 1);
- &opt_print ("Returns", $returns{$api}, 1);
- &opt_print ("Description", $bodies{$api}, 0);
- print OUT "\n";
+
+# if ($arguments{$api} ne "" && (!($arguments{$api}) =~ /^[ \t]+$/)){
+ print OUT "<div class=\"api-section\">Parameters</div>\n";
+ print OUT "<table class=\"api-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
+# }
+# &opt_print ("Parameters", $arguments{$api}, 1);
+
+ &opt_print ("Returns", $returns{$api}, 1);
+ &opt_print ("Description", $bodies{$api}, 0);
+ print OUT "\n";
} else {
if ($line =~ /@API_IDX@/){
$apis_toc = &create_toc ($apis[$f]);
$line =~ s/\@API_IDX\@/$apis_toc/;
}
- if ($line =~ /^<h/){
- print OUT "</div>";
+ if ($line =~ /^<h4/){
+ print OUT "</div></div></div>";
$api_shown = 0;
}
-
+ if ($line =~ /`/){
+ }
print OUT "$line\n";
}
}
print OUT<<EOF;
+ </div>
</body>
</html>
EOF
# Process arguments
while (<>){
- if (/^ \*\*?\//){
- $body =~ s/[@#](\w+)/<i>\1<\/i>/g;
- $returns =~ s/[@#](\w+)/<i>\1<\/i>/g;
-
+ s/NULL/<code>NULL<\/code>/g;
+ s/TRUE/<code>TRUE<\/code>/g;
+ s/FALSE/<code>FALSE<\/code>/g;
+ if (/^ \*\*?\//){
+ $body =~ s/@(\w+)/<i>\1<\/i>/g;
+ $returns =~ s/@(\w+)/<i>\1<\/i>/g;
$args =~ s/@(\w+)/<i>\1<\/i>/g;
+
+ $body =~ s/#(\w+)/<code>\1<\/code>/g;
+ $returns =~ s/#(\w+)/<code>\1<\/code>/g;
+ $args =~ s/#(\w+)/<code>\1<\/code>/g;
+
+ $returns =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
+ $args =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
+ $body =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
+
$body =~ s/\n/ /;
$bodies{$func} = $body;
$arguments{$func} = $args;
if ($1 eq "deprecated"){
$deprecated = $2;
} else {
- $args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
+ #$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
+ $args .= "<tr><td><i>$1</i><td>$2</td></td></tr>";
}
} else {
my ($caption, $opttext, $quote) = @_;
if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
- print OUT "<b>$caption</b>\n";
+ print OUT "<div class=\"api-section\">$caption</div>\n";
if ($quote == 1){
print OUT "<blockquote>$opttext</blockquote>\n";
} else {
<h4><a name="api:mono_assembly_load">mono_assembly_load</a></h4>
<h4><a name="api:mono_assembly_load_full">mono_assembly_load_full</a></h4>
<h4><a name="api:mono_assembly_loaded">mono_assembly_loaded</a></h4>
-<h4><a name="api:mono_assembly_load_from">mono_assembly_load_from</a>
-<h4><a name="api:mono_assembly_load_from_full">mono_assembly_load_from_full</a>
-<h4><a name="api:mono_assembly_load_with_partial_name">mono_assembly_load_with_partial_name</a>
+<h4><a name="api:mono_assembly_load_from">mono_assembly_load_from</a></h4>
+<h4><a name="api:mono_assembly_load_from_full">mono_assembly_load_from_full</a></h4>
+<h4><a name="api:mono_assembly_load_with_partial_name">mono_assembly_load_with_partial_name</a></h4>
<h4><a name="api:mono_assembly_open">mono_assembly_open</a></h4>
-<h4><a name="api:mono_assembly_open_full">mono_assembly_open_full</a>
-<h4><a name="api:mono_set_assemblies_path">mono_set_assemblies_path</a>
-<h4><a name="api:mono_set_rootdir">mono_set_rootdir</a>
+<h4><a name="api:mono_assembly_open_full">mono_assembly_open_full</a></h4>
+<h4><a name="api:mono_set_assemblies_path">mono_set_assemblies_path</a></h4>
+<h4><a name="api:mono_set_rootdir">mono_set_rootdir</a></h4>
<h3>Working with Assemblies</h3>
-<h4><a name="api:mono_assembly_fill_assembly_name">mono_assembly_fill_assembly_name</a>
-<h4><a name="api:mono_assembly_foreach">mono_assembly_foreach</a>
+<h4><a name="api:mono_assembly_fill_assembly_name">mono_assembly_fill_assembly_name</a></h4>
+<h4><a name="api:mono_assembly_foreach">mono_assembly_foreach</a></h4>
<h4><a name="api:mono_assembly_get_image">mono_assembly_get_image</a></h4>
<h4><a name="api:mono_assembly_get_main">mono_assembly_get_main</a></h4>
-<h4><a name="api:mono_assembly_get_name">mono_assembly_get_name</a>
+<h4><a name="api:mono_assembly_get_name">mono_assembly_get_name</a></h4>
<h4><a name="api:mono_assembly_getrootdir">mono_assembly_getrootdir</a></h4>
-<h4><a name="api:mono_assembly_get_assemblyref">mono_assembly_get_assemblyref</a>
-<h4><a name="api:mono_assembly_loaded_full">mono_assembly_loaded_full</a>
-<h4><a name="api:mono_assembly_load_reference">mono_assembly_load_reference</a>
-<h4><a name="api:mono_assembly_load_references">mono_assembly_load_references</a>
-<h4><a name="api:mono_assembly_load_module">mono_assembly_load_module</a>
-<h4><a name="api:mono_assembly_invoke_load_hook">mono_assembly_invoke_load_hook</a>
-<h4><a name="api:mono_assembly_invoke_search_hook">mono_assembly_invoke_search_hook</a>
-<h4><a name="api:mono_assembly_set_main">mono_assembly_set_main</a>
-<h4><a name="api:mono_assembly_setrootdir">mono_assembly_setrootdir</a>
-<h4><a name="api:mono_register_config_for_assembly">mono_register_config_for_assembly</a>
-<h4><a name="api:mono_register_symfile_for_assembly">mono_register_symfile_for_assembly</a>
+<h4><a name="api:mono_assembly_get_assemblyref">mono_assembly_get_assemblyref</a></h4>
+<h4><a name="api:mono_assembly_loaded_full">mono_assembly_loaded_full</a></h4>
+<h4><a name="api:mono_assembly_load_reference">mono_assembly_load_reference</a></h4>
+<h4><a name="api:mono_assembly_load_references">mono_assembly_load_references</a></h4>
+<h4><a name="api:mono_assembly_load_module">mono_assembly_load_module</a></h4>
+<h4><a name="api:mono_assembly_invoke_load_hook">mono_assembly_invoke_load_hook</a></h4>
+<h4><a name="api:mono_assembly_invoke_search_hook">mono_assembly_invoke_search_hook</a></h4>
+<h4><a name="api:mono_assembly_set_main">mono_assembly_set_main</a></h4>
+<h4><a name="api:mono_assembly_setrootdir">mono_assembly_setrootdir</a></h4>
+<h4><a name="api:mono_register_config_for_assembly">mono_register_config_for_assembly</a></h4>
+<h4><a name="api:mono_register_symfile_for_assembly">mono_register_symfile_for_assembly</a></h4>
<h3>Assembly Names</h3>
href="http://www.mono-project.com/monodoc/T:System.Reflection.AssemblyName">System.Reflection.AssemblyName</a>
managed type.
-<h4><a name="api:mono_assembly_name_new">mono_assembly_name_new</a>
-<h4><a name="api:mono_assembly_name_get_name">mono_assembly_name_get_name</a>
-<h4><a name="api:mono_assembly_name_get_culture">mono_assembly_name_get_culture</a>
-<h4><a name="api:mono_assembly_name_get_version">mono_assembly_name_get_version</a>
-<h4><a name="api:mono_assembly_name_get_pubkeytoken">mono_assembly_name_get_pubkeytoken</a>
+<h4><a name="api:mono_assembly_name_new">mono_assembly_name_new</a></h4>
+<h4><a name="api:mono_assembly_name_get_name">mono_assembly_name_get_name</a></h4>
+<h4><a name="api:mono_assembly_name_get_culture">mono_assembly_name_get_culture</a></h4>
+<h4><a name="api:mono_assembly_name_get_version">mono_assembly_name_get_version</a></h4>
+<h4><a name="api:mono_assembly_name_get_pubkeytoken">mono_assembly_name_get_pubkeytoken</a></h4>
<h4><a name="api:mono_assembly_name_free">mono_assembly_name_free</a></h4>
<h4><a name="api:mono_stringify_assembly_name">mono_stringify_assembly_name</a></h4>
<h4><a name="api:mono_assembly_names_equal">mono_assembly_names_equal</a></h4>
<h3>Advanced</h3>
-<h4><a name="api:mono_install_assembly_load_hook">mono_install_assembly_load_hook</a>
-<h4><a name="api:mono_install_assembly_search_hook">mono_install_assembly_search_hook</a>
-<h4><a name="api:mono_install_assembly_refonly_search_hook">mono_install_assembly_refonly_search_hook</a>
-<h4><a name="api:mono_install_assembly_preload_hook">mono_install_assembly_preload_hook</a>
-<h4><a name="api:mono_install_assembly_refonly_preload_hook">mono_install_assembly_refonly_preload_hook</a>
-<h4><a name="api:mono_install_assembly_postload_search_hook">mono_install_assembly_postload_search_hook</a>
-<h4><a name="api:mono_install_assembly_postload_refonly_search_hook">mono_install_assembly_postload_refonly_search_hook</a>
+<h4><a name="api:mono_install_assembly_load_hook">mono_install_assembly_load_hook</a></h4>
+<h4><a name="api:mono_install_assembly_search_hook">mono_install_assembly_search_hook</a></h4>
+<h4><a name="api:mono_install_assembly_refonly_search_hook">mono_install_assembly_refonly_search_hook</a></h4>
+<h4><a name="api:mono_install_assembly_preload_hook">mono_install_assembly_preload_hook</a></h4>
+<h4><a name="api:mono_install_assembly_refonly_preload_hook">mono_install_assembly_refonly_preload_hook</a></h4>
+<h4><a name="api:mono_install_assembly_postload_search_hook">mono_install_assembly_postload_search_hook</a></h4>
+<h4><a name="api:mono_install_assembly_postload_refonly_search_hook">mono_install_assembly_postload_refonly_search_hook</a></h4>
<h4><a name="api:mono_domain_assembly_open">mono_domain_assembly_open</a></h4>
<h4><a name="api:mono_domain_create">mono_domain_create</a></h4>
-<h4><a name="api:mono_domain_create_appdomain">mono_domain_create_appdomain</a>
+<h4><a name="api:mono_domain_create_appdomain">mono_domain_create_appdomain</a></h4>
<h4><a name="api:mono_domain_finalize">mono_domain_finalize</a></h4>
<h4><a name="api:mono_domain_foreach">mono_domain_foreach</a></h4>
<h4><a name="api:mono_domain_free">mono_domain_free</a></h4>
-<h4><a name="api:mono_domain_from_appdomain">mono_domain_from_appdomain</a>
+<h4><a name="api:mono_domain_from_appdomain">mono_domain_from_appdomain</a></h4>
<h4><a name="api:mono_domain_get_by_id">mono_domain_get_by_id</a></h4>
-<h4><a name="api:mono_domain_get_friendly_name">mono_domain_get_friendly_name</a>
+<h4><a name="api:mono_domain_get_friendly_name">mono_domain_get_friendly_name</a></h4>
<h4><a name="api:mono_domain_get_id">mono_domain_get_id</a></h4>
<h4><a name="api:mono_domain_get">mono_domain_get</a></h4>
<h4><a name="api:mono_domain_has_type_resolve">mono_domain_has_type_resolve</a></h4>
<h4><a name="api:mono_domain_is_unloading">mono_domain_is_unloading</a></h4>
<h4><a name="api:mono_domain_owns_vtable_slot">mono_domain_owns_vtable_slot</a></h4>
-<h4><a name="api:mono_domain_set_config">mono_domain_set_config</a>
+<h4><a name="api:mono_domain_set_config">mono_domain_set_config</a></h4>
<h4><a name="api:mono_domain_set_internal">mono_domain_set_internal</a></h4>
<h4><a name="api:mono_domain_set">mono_domain_set</a></h4>
<h4><a name="api:mono_domain_try_type_resolve">mono_domain_try_type_resolve</a></h4>
-<h4><a name="api:mono_domain_try_unload">mono_domain_try_unload</a>
-<h4><a name="api:mono_domain_unload">mono_domain_unload</a>
+<h4><a name="api:mono_domain_try_unload">mono_domain_try_unload</a></h4>
+<h4><a name="api:mono_domain_unload">mono_domain_unload</a></h4>
<h3>Contexts</h3>
-<h4><a name="api:mono_context_init">mono_context_init</a>
+<h4><a name="api:mono_context_init">mono_context_init</a></h4>
<h4><a name="api:mono_context_get">mono_context_get</a></h4>
-<h4><a name="api:mono_context_get_domain_id">mono_context_get_domain_id</a>
-<h4><a name="api:mono_context_get_id">mono_context_get_id</a>
+<h4><a name="api:mono_context_get_domain_id">mono_context_get_domain_id</a></h4>
+<h4><a name="api:mono_context_get_id">mono_context_get_id</a></h4>
<h4><a name="api:mono_context_set">mono_context_set</a></h4>
<h4><a name="api:mono_context_get_desc">mono_context_get_desc</a></h4>
<h4><a name="api:mono_config_string_for_assembly_file">mono_config_string_for_assembly_file</a></h4>
<h4><a name="api:mono_get_config_dir">mono_get_config_dir</a></h4>
<h4><a name="api:mono_get_machine_config">mono_get_machine_config</a></h4>
-<h4><a name="api:mono_register_machine_config">mono_register_machine_config</a>
+<h4><a name="api:mono_register_machine_config">mono_register_machine_config</a></h4>
<h4><a name="api:mono_set_config_dir">mono_set_config_dir</a></h4>
<h3>Advanced Execution Setups</h3>
<h3>JIT Information</h3>
-<h4><a name="api:mono_jit_info_get_code_size">mono_jit_info_get_code_size</a>
-<h4><a name="api:mono_jit_info_get_code_start">mono_jit_info_get_code_start</a>
-<h4><a name="api:mono_jit_info_get_method">mono_jit_info_get_method</a>
-<h4><a name="api:mono_jit_info_table_find">mono_jit_info_table_find</a>
+<h4><a name="api:mono_jit_info_get_code_size">mono_jit_info_get_code_size</a></h4>
+<h4><a name="api:mono_jit_info_get_code_start">mono_jit_info_get_code_start</a></h4>
+<h4><a name="api:mono_jit_info_get_method">mono_jit_info_get_method</a></h4>
+<h4><a name="api:mono_jit_info_table_find">mono_jit_info_table_find</a></h4>
<h3>Useful Debugging Functions</h3>
* mono_domain_has_type_resolve:
* @domain: application domains being looked up
*
- * Returns true if the AppDomain.TypeResolve field has been
+ * Returns: TRUE if the AppDomain.TypeResolve field has been
* set.
*/
gboolean
return aname;
}
-/*
+/**
* mono_assembly_get_assemblyref:
+ * @image: pointer to the MonoImage to extract the information from.
+ * @index: index to the assembly reference in the image.
+ * @aname: pointer to a `MonoAssemblyName` that will hold the returned value.
*
- * Fill out ANAME with the assembly name of the INDEXth assembly reference in IMAGE.
+ * Fills out the @aname with the assembly name of the @index assembly reference in @image.
*/
void
mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname)
}
}
+/**
+ * mono_assembly_load_references:
+ * @image:
+ * @status:
+ * @deprecated: There is no reason to use this method anymore, it does nothing
+ *
+ * This method is now a no-op, it does nothing other than setting the @status to #MONO_IMAGE_OK
+ */
void
mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status)
{
/**
* mono_assembly_open_from_bundle:
* @filename: Filename requested
- * @status: return value
+ * @status: return status code
*
* This routine tries to open the assembly specified by `filename' from the
* defined bundles, if found, returns the MonoImage for it, if not found
return NULL;
}
+/**
+ * mono_assemblies_open_full:
+ * @filename: the file to load
+ * @status: return status code
+ * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+*
+ * This loads an assembly from the specified @filename. The @filename allows
+ * a local URL (starting with a file:// prefix). If a file prefix is used, the
+ * filename is interpreted as a URL, and the filename is URL-decoded. Otherwise the file
+ * is treated as a local path.
+ *
+ * First, an attempt is made to load the assembly from the bundled executable (for those
+ * deployments that have been done with the `mkbundle` tool or for scenarios where the
+ * assembly has been registered as an embedded assembly). If this is not the case, then
+ * the assembly is loaded from disk using `api:mono_image_open_full`.
+ *
+ * If the pointed assembly does not live in the Global Assembly Cache, a shadow copy of
+ * the assembly is made.
+ *
+ * If @refonly is set to true, then the assembly is loaded purely for inspection with
+ * the `System.Reflection` API.
+ *
+ * Returns: NULL on error, with the @status set to an error code, or a pointer
+ * to the assembly.
+ */
MonoAssembly *
mono_assembly_open_full (const char *filename, MonoImageOpenStatus *status, gboolean refonly)
{
g_free (val);
}
-/*
+/**
* mono_assembly_load_friends:
* @ass: an assembly
*
/**
* mono_assembly_open:
* @filename: Opens the assembly pointed out by this name
- * @status: where a status code can be returned
+ * @status: return status code
+ *
+ * This loads an assembly from the specified @filename. The @filename allows
+ * a local URL (starting with a file:// prefix). If a file prefix is used, the
+ * filename is interpreted as a URL, and the filename is URL-decoded. Otherwise the file
+ * is treated as a local path.
*
- * mono_assembly_open opens the PE-image pointed by @filename, and
- * loads any external assemblies referenced by it.
+ * First, an attempt is made to load the assembly from the bundled executable (for those
+ * deployments that have been done with the `mkbundle` tool or for scenarios where the
+ * assembly has been registered as an embedded assembly). If this is not the case, then
+ * the assembly is loaded from disk using `api:mono_image_open_full`.
+ *
+ * If the pointed assembly does not live in the Global Assembly Cache, a shadow copy of
+ * the assembly is made.
*
* Return: a pointer to the MonoAssembly if @filename contains a valid
* assembly or NULL on error. Details about the error are stored in the
return mono_assembly_open_full (filename, status, FALSE);
}
+/**
+ * mono_assembly_load_from_full:
+ * @image: Image to load the assembly from
+ * @fname: assembly name to associate with the assembly
+ * @status: returns the status condition
+ * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+ *
+ * If the provided @image has an assembly reference, it will process the given
+ * image as an assembly with the given name.
+ *
+ * Most likely you want to use the `api:mono_assembly_load_full` method instead.
+ *
+ * Returns: A valid pointer to a `MonoAssembly*` on success and the @status will be
+ * set to #MONO_IMAGE_OK; or NULL on error.
+ *
+ * If there is an error loading the assembly the @status will indicate the
+ * reason with @status being set to `MONO_IMAGE_INVALID` if the
+ * image did not contain an assembly reference table.
+ */
MonoAssembly *
mono_assembly_load_from_full (MonoImage *image, const char*fname,
MonoImageOpenStatus *status, gboolean refonly)
return ass;
}
+/**
+ * mono_assembly_load_from:
+ * @image: Image to load the assembly from
+ * @fname: assembly name to associate with the assembly
+ * @status: return status code
+ *
+ * If the provided @image has an assembly reference, it will process the given
+ * image as an assembly with the given name.
+ *
+ * Most likely you want to use the `api:mono_assembly_load_full` method instead.
+ *
+ * This is equivalent to calling `api:mono_assembly_load_from_full` with the
+ * @refonly parameter set to FALSE.
+ * Returns: A valid pointer to a `MonoAssembly*` on success and the @status will be
+ * set to #MONO_IMAGE_OK; or NULL on error.
+ *
+ * If there is an error loading the assembly the @status will indicate the
+ * reason with @status being set to `MONO_IMAGE_INVALID` if the
+ * image did not contain an assembly reference table.
+
+ */
MonoAssembly *
mono_assembly_load_from (MonoImage *image, const char *fname,
MonoImageOpenStatus *status)
* Parses an assembly qualified type name and assigns the name,
* version, culture and token to the provided assembly name object.
*
- * Returns: true if the name could be parsed.
+ * Returns: TRUE if the name could be parsed.
*/
gboolean
mono_assembly_name_parse (const char *name, MonoAssemblyName *aname)
}
}
+/**
+ * mono_assembly_load_with_partial_name:
+ * @name: an assembly name that is then parsed by `api:mono_assembly_name_parse`.
+ * @status: return status code
+ *
+ * Loads a Mono Assembly from a name. The name is parsed using `api:mono_assembly_name_parse`,
+ * so it might contain a qualified type name, version, culture and token.
+ *
+ * This will load the assembly from the file whose name is derived from the assembly name
+ * by appending the .dll extension.
+ *
+ * The assembly is loaded from either one of the extra Global Assembly Caches specified
+ * by the extra GAC paths (specified by the `MONO_GAC_PREFIX` environment variable) or
+ * if that fails from the GAC.
+ *
+ * Returns: NULL on failure, or a pointer to a MonoAssembly on success.
+ */
MonoAssembly*
mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *status)
{
return mono_assembly_load_full_internal (aname, NULL, basedir, status, FALSE);
}
+/**
+ * mono_assembly_loaded_full:
+ * @aname: an assembly to look for.
+ * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+ *
+ * This is used to determine if the specified assembly has been loaded
+ * Returns: NULL If the given @aname assembly has not been loaded, or a pointer to
+ * a `MonoAssembly` that matches the `MonoAssemblyName` specified.
+ */
MonoAssembly*
mono_assembly_loaded_full (MonoAssemblyName *aname, gboolean refonly)
{
* mono_assembly_loaded:
* @aname: an assembly to look for.
*
+ * This is used to determine if the specified assembly has been loaded
+
* Returns: NULL If the given @aname assembly has not been loaded, or a pointer to
- * a MonoAssembly that matches the MonoAssemblyName specified.
+ * a `MonoAssembly` that matches the `MonoAssemblyName` specified.
*/
MonoAssembly*
mono_assembly_loaded (MonoAssemblyName *aname)
return mono_image_load_file_for_image (assembly->image, idx);
}
+/**
+ * mono_assembly_foreach:
+ * @func: function to invoke for each assembly loaded
+ * @user_data: data passed to the callback
+ *
+ * Invokes the provided @func callback for each assembly loaded into
+ * the runtime. The first parameter passed to the callback is the
+ * `MonoAssembly*`, and the second parameter is the @user_data.
+ *
+ * This is done for all assemblies loaded in the runtime, not just
+ * those loaded in the current application domain.
+ */
void
mono_assembly_foreach (GFunc func, gpointer user_data)
{
* @gchandle: a GCHandle's handle.
* @domain: An application domain.
*
- * Returns: true if the object wrapped by the @gchandle belongs to the specific @domain.
+ * Returns: TRUE if the object wrapped by the @gchandle belongs to the specific @domain.
*/
gboolean
mono_gc_is_null (void)
return type;
}
-/*
+/**
* mono_class_is_open_constructed_type:
* @type: a type
*
- * Returns TRUE if type represents a generics open constructed type.
+ * Returns: TRUE if type represents a generics open constructed type.
* IOW, not all type parameters required for the instantiation have
* been provided or it's a generic type definition.
*
}
}
-/*
+/**
* mono_class_interface_offset_with_variance:
*
* Return the interface offset of @itf in @klass. Sets @non_exact_match to TRUE if the match required variance check
* This method determines whether @klass is a subclass of @klassc.
*
* If the @check_interfaces flag is set, then if @klassc is an interface
- * this method return true if the @klass implements the interface or
+ * this method return TRUE if the @klass implements the interface or
* if @klass is an interface, if one of its base classes is @klass.
*
* If @check_interfaces is false then, then if @klass is not an interface
- * then it returns true if the @klass is a subclass of @klassc.
+ * then it returns TRUE if the @klass is a subclass of @klassc.
*
* if @klass is an interface and @klassc is System.Object, then this function
* return true.
* @klass: the class to be assigned to
* @oklass: the source class
*
- * Both klass and oklass must be instances of the same generic interface.
- * Return true if @klass can be assigned to a @klass variable
+ * Both @klass and @oklass must be instances of the same generic interface.
+ *
+ * Returns: TRUE if @klass can be assigned to a @klass variable
*/
gboolean
mono_class_is_variant_compatible (MonoClass *klass, MonoClass *oklass, gboolean check_for_reference_conv)
* @klass: the class to be assigned to
* @oklass: the source class
*
- * Return: true if an instance of object oklass can be assigned to an
+ * Returns: TRUE if an instance of object oklass can be assigned to an
* instance of object @klass
*/
gboolean
* mono_class_is_valuetype:
* @klass: the MonoClass to act on
*
- * Returns: true if the MonoClass represents a ValueType.
+ * Returns: TRUE if the MonoClass represents a ValueType.
*/
gboolean
mono_class_is_valuetype (MonoClass *klass)
* mono_class_is_enum:
* @klass: the MonoClass to act on
*
- * Returns: true if the MonoClass represents an enumeration.
+ * Returns: TRUE if the MonoClass represents an enumeration.
*/
gboolean
mono_class_is_enum (MonoClass *klass)
* mono_class_is_delegate
* @klass: the MonoClass to act on
*
- * Returns: true if the MonoClass represents a System.Delegate.
+ * Returns: TRUE if the MonoClass represents a System.Delegate.
*/
mono_bool
mono_class_is_delegate (MonoClass *klass)
* @klass: The MonoClass to act on
* @interface: The interface to check if @klass implements.
*
- * Returns: true if @klass implements @interface.
+ * Returns: TRUE if @klass implements @interface.
*/
mono_bool
mono_class_implements_interface (MonoClass* klass, MonoClass* iface)
*
* Used to determine if a method is allowed to access the specified field.
*
- * Returns: true if the given @method is allowed to access the @field while following
+ * Returns: TRUE if the given @method is allowed to access the @field while following
* the accessibility rules of the CLI.
*/
gboolean
*
* Used to determine if the @method is allowed to access the specified @called method.
*
- * Returns: true if the given @method is allowed to invoke the @called while following
+ * Returns: TRUE if the given @method is allowed to invoke the @called while following
* the accessibility rules of the CLI.
*/
gboolean
* This routine tests whether the @thread argument represents the
* finalization thread.
*
- * Returns true if @thread is the finalization thread.
+ * Returns: TRUE if @thread is the finalization thread.
*/
gboolean
mono_gc_is_finalizer_thread (MonoThread *thread)
* @summary: Where to store the header
*
*
- * Returns: true if the header was properly decoded.
+ * Returns: TRUE if the header was properly decoded.
*/
gboolean
mono_method_get_header_summary (MonoMethod *method, MonoMethodHeaderSummary *summary)
}
-/*
+/**
+ * mono_runtime_try_shutdown:
+ *
* Try to initialize runtime shutdown.
+ *
* After this call completes the thread pool will stop accepting new jobs and no further threads will be created.
*
- * @return true if shutdown was initiated by this call or false is other thread beat this one
+ * Returns: TRUE if shutdown was initiated by this call or false is other thread beat this one.
*/
gboolean
mono_runtime_try_shutdown (void)
* @gchandle: a GCHandle's handle.
* @domain: An application domain.
*
- * Returns: true if the object wrapped by the @gchandle belongs to the specific @domain.
+ * Returns: TRUE if the object wrapped by the @gchandle belongs to the specific @domain.
*/
gboolean
mono_gchandle_is_in_domain (guint32 gchandle, MonoDomain *domain)
* This function allows one to determine if a thread was created by the mono runtime and has
* a well defined lifecycle or it's a foreigh one, created by the native environment.
*
- * Returns: true if @thread was not created by the runtime.
+ * Returns: TRUE if @thread was not created by the runtime.
*/
mono_bool
mono_thread_is_foreign (MonoThread *thread)
/*
* mono_type_is_enum_type:
*
- * Returns TRUE if @type is an enum type.
+ * Returns: TRUE if @type is an enum type.
*/
static gboolean
mono_type_is_enum_type (MonoType *type)
/*
* mono_type_is_value_type:
*
- * Returns TRUE if @type is named after @namespace.@name.
+ * Returns: TRUE if @type is named after @namespace.@name.
*
*/
static gboolean
return TRUE;
}
-/*
- * Return true if @candidate is constraint compatible with @target.
+/**
+ * mono_generic_param_is_constraint_compatible:
+ *
+ * Returns: TRUE if @candidate is constraint compatible with @target.
*
* This means that @candidate constraints are a super set of @target constaints
*/
}
#endif
-/*Returns TRUE if candidate array type can be assigned to target.
- *Both parameters MUST be of type MONO_TYPE_ARRAY (target->type == MONO_TYPE_ARRAY)
+/**
+ * is_array_type_compatible:
+ *
+ * Returns TRUE if candidate array type can be assigned to target.
+ *
+ * Both parameters MUST be of type MONO_TYPE_ARRAY (target->type == MONO_TYPE_ARRAY)
*/
static gboolean
is_array_type_compatible (MonoType *target, MonoType *candidate)
return FALSE;
}
-/*
+/**
* is_compatible_boxed_valuetype:
*
- * Returns TRUE if @candidate / @stack is a valid boxed valuetype.
+ * Returns: TRUE if @candidate / @stack is a valid boxed valuetype.
*
* @type The source type. It it tested to be of the proper type.
* @candidate type of the boxed valuetype.
#define HANDLER_START(clause) ((clause)->flags == MONO_EXCEPTION_CLAUSE_FILTER ? (clause)->data.filter_offset : clause->handler_offset)
#define IS_CATCH_OR_FILTER(clause) ((clause)->flags == MONO_EXCEPTION_CLAUSE_FILTER || (clause)->flags == MONO_EXCEPTION_CLAUSE_NONE)
-/*
+/**
* is_clause_in_range :
*
* Returns TRUE if either the protected block or the handler of @clause is in the @start - @end range.
return FALSE;
}
-/*
+/**
* is_clause_inside_range :
*
* Returns TRUE if @clause lies completely inside the @start - @end range.
return TRUE;
}
-/*
+/**
* is_clause_nested :
*
* Returns TRUE if @nested is nested in @clause.
return NULL;
}
-/*
- * Returns true if @method needs to be verified.
+/**
+ * mono_verifier_is_enabled_for_method:
+ * @method: the method to probe
+ *
+ * Returns TRUE if @method needs to be verified.
*
*/
gboolean
return mono_verifier_is_enabled_for_class (method->klass) && (method->wrapper_type == MONO_WRAPPER_NONE || method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD);
}
-/*
- * Returns true if @klass need to be verified.
+/**
+ * mono_verifier_is_enabled_for_class:
+ * @klass: The `MonoClass` to probe
+ *
+ * Returns TRUE if @klass need to be verified.
*
*/
gboolean