EOF
@a = split (/\n/, $files_content[$f]);
$strikeextra = "";
+ $api_shown = 0;
for ($ai = 0; $ai < $#a; $ai++){
$line = $a[$ai];
open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
$line = 0;
+ $doprint = 0;
while (<HACK>){
+ print HACKOUT $last if ($doprint);
$line++;
s/^\/\/<!\[CDATA\[//;
s/^\/\/\]\]>\/\///;
# Remove the junk <span> wrapper generated by AgilityPack
if ($line==1){
- s/<?span>//;
+ s/<span>//;
}
if (/<style type/){
# Replace the CSS in the XHTML output with the original CSS
last if (/<\/style>/);
}
}
-
- print HACKOUT $_;
+ $last = $_;
+ $doprint = 1;
+ }
+ if (!($last =~ /span/)){
+ print HACKOUT $last;
}
+
#system ("cp.exe $dir/html/$name $dir/deploy/$name");
}
}
<h2>Assemblies</h2>
+ <p>Code in .NET and Mono is distributed in assemblies, there
+ are shipped typically in files with the extension .exe or
+ .dll, and they are files that extend
+ the <a href="https://en.wikipedia.org/wiki/Portable_Executable">Portable
+ Executable</a> file format to include the Common Intermediate
+ Language metadata and portable code.
+
+ <p>Assemblies are typically loaded either from a given file
+ path, or using an <a href="#assembly-name">Assembly Name</a>
+ to load them from the Global Assembly Cache.
+
+ <p>The Mono Assembly API contains method for dealing with
+ <a href="#assembly-name">assembly
+ names</a>, <a href="cil_assembly_load">loading assemblies</a>,
+ <a href="#working">accessing assembly
+ components</a>, <a href="#modules">modules</a> and
+ some <a href="#advanced">advanced</a> features.
+
+ <p>Assemblies contain one or
+ more images, the actual vessels for your code.
+ The <a href="mono-api-image.html">Image API</a> documents the
+ functions that operate on <code>MonoImage *</code>.
+
<h3>Synopsis</h3>
<div class="mapi-header">
typedef struct _MonoImage MonoImage;
typedef struct _MonoAssembly MonoAssembly;
-
-@API_IDX@
-
</div>
-<a name="cil_assembly_load"/>
+<a name="cil_assembly_load"/></a>
<h3>Assembly Loading</h3>
<h4><a name="api:mono_assembly_close">mono_assembly_close</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>
+<a name="working"/>
<h3>Working with Assemblies</h3>
<h4><a name="api:mono_assembly_fill_assembly_name">mono_assembly_fill_assembly_name</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>
+<a name="assembly-name"></a>
<h3>Assembly Names</h3>
<p>The MonoAssemblyName contains the full identity of an
<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>
+<a href="modules"/>
<h3>Modules</h3>
<p>An assembly is made up of one or more modules.
<h4><a name="api:mono_module_get_object">mono_module_get_object</a></h4>
+<a href="advanced"/>
<h3>Advanced</h3>
<h4><a name="api:mono_install_assembly_load_hook">mono_install_assembly_load_hook</a></h4>
query a number of properties of a .NET class from the C API.
<p>This page contains information
- for <a href="#class-getting">how to obtain a MonoClass</a>,
+ for <a href="#class-getting">how to obtain a MonoClass*</a>,
how to <a href="#class-work">probe for different
- features of a UonoClass</a> and APIs
+ features of a MonoClass*</a> and APIs
to <a href="#class-members">access class members</a> and
<a href="#class-fields">access fields</a>. To access
methods, see the <a href="mono-api-methods.html">method
documentation API</a>.
-<a name="class-getting">
+<a name="class-getting"></a>
<h3>Getting a MonoClass</h3>
<p>You typically would obtain a <code>MonoClass*</code>
<h4><a name="api:mono_class_value_size">mono_class_value_size</a></h4>
<h4><a name="api:mono_class_vtable">mono_class_vtable</a></h4>
-<a name="class-members">
+<a name="class-members"></a>
<h3>Getting Class Members</h3>
<h4><a name="api:mono_class_get_fields">mono_class_get_fields</a></h4>
<h4><a name="api:mono_class_get_property_from_name">mono_class_get_property_from_name</a></h4>
<h4><a name="api:mono_class_get_events">mono_class_get_events</a></h4>
-<a name="class-fields">
+<a name="class-fields"></a>
<h3>Fields</h3>
<h4><a name="api:mono_field_get_data">mono_field_get_data</a></h4>
<h2>Embedding Mono</h2>
+ <p>The Mono runtime can be embedded into C and C++
+ applications. Your C/C++ code can invoke managed code
+ running in the Mono/.NET world and you can also surface your
+ internal application APIs to Mono and .NET.
+
+ <p>For an overview of how to embed Mono into your application
+ and the strategies that you can use to embed Mono, check the
+ Mono
+ website's <a href="http://www.mono-project.com/docs/advanced/embedding/">Embedding
+ Mono</a> page.
+
+ <p>This page is the companion API reference for the above guide.
+
<p>The simplest way of embedding Mono is illustrated here:
<pre>
int main (int argc, char *argv)
<param name="Local" value="DoesNotExist"/>
</object>
</li>
+ <li>
+ <object type="text/sitemap">
+ <param name="Name" value="Embedding Mono"/>
+ <param name="Local" value="deploy/mono-api-embedding.html"/>
+ </object>
+ </li>
<li>
<object type="text/sitemap">
<param name="Name" value="Assemblies"/>
<param name="Local" value="deploy/mono-api-domains.html"/>
</object>
</li>
- <li>
- <object type="text/sitemap">
- <param name="Name" value="Dynamic Code Generation"/>
- <param name="Local" value="deploy/mono-api-dynamic-codegen.html"/>
- </object>
- </li>
<li>
<object type="text/sitemap">
<param name="Name" value="Exceptions"/>
<param name="Local" value="deploy/mono-api-gc.html"/>
</object>
</li>
- <li>
- <object type="text/sitemap">
- <param name="Name" value="Embedding Mono"/>
- <param name="Local" value="deploy/mono-api-embedding.html"/>
- </object>
- </li>
<li>
<object type="text/sitemap">
<param name="Name" value="Just in Time Compiler"/>
</object>
</li>
-->
- <li>
- <object type="text/sitemap">
- <param name="Name" value="JIT Counters"/>
- <param name="Local" value="deploy/mono-api-counters.html"/>
- </object>
- </li>
<li>
<object type="text/sitemap">
<param name="Name" value="Types"/>
<param name="Local" value="deploy/mono-api-utils.html"/>
</object>
</li>
+ <li>
+ <object type="text/sitemap">
+ <param name="Name" value="JIT Counters"/>
+ <param name="Local" value="deploy/mono-api-counters.html"/>
+ </object>
+ </li>
<li>
<object type="text/sitemap">
<param name="Name" value="Unsorted"/>
<param name="Local" value="deploy/mono-api-unsorted.html"/>
</object>
</li>
+ <li>
+ <object type="text/sitemap">
+ <param name="Name" value="Internal: Dynamic Code Generation"/>
+ <param name="Local" value="deploy/mono-api-dynamic-codegen.html"/>
+ </object>
+ </li>
</ul>
</body>
</html>
mono_os_mutex_destroy (&icall_mutex);
}
+/**
+ * mono_add_internal_call:
+ * @name: method specification to surface to the managed world
+ * @method: pointer to a C method to invoke when the method is called
+ *
+ * This method surfaces the C function pointed by @method as a method
+ * that has been surfaced in managed code with the method specified in
+ * @name as an internal call.
+ *
+ * Internal calls are surfaced to all app domains loaded and they are
+ * accessibly by a type with the specified name.
+ *
+ * You must provide a fully qualified type name, that is namespaces
+ * and type name, followed by a colon and the method name, with an
+ * optional signature to bind.
+ *
+ * For example, the following are all valid declarations:
+ *
+ * "MyApp.Services.ScriptService:Accelerate"
+ * "MyApp.Services.ScriptService:Slowdown(int,bool)"
+ *
+ * You use method parameters in cases where there might be more than
+ * one surface method to managed code. That way you can register different
+ * internal calls for different method overloads.
+ *
+ * The internal calls are invoked with no marshalling. This means that .NET
+ * types like System.String are exposed as `MonoString *` parameters. This is
+ * different than the way that strings are surfaced in P/Invoke.
+ *
+ * For more information on how the parameters are marshalled, see the
+ * <a href="http://www.mono-project.com/docs/advanced/embedding/">Mono Embedding</a>
+ * page.
+ *
+ * See the <a href="mono-api-methods.html#method-desc">Method Description</a>
+ * reference for more information on the format of method descriptions.
+ */
void
mono_add_internal_call (const char *name, gconstpointer method)
{
guint32
mono_image_create_token (MonoDynamicImage *assembly, MonoObject *obj,
- gboolean create_open_instance, gboolean register_token)
+ gboolean create_open_instance, gboolean register_token, MonoError *error)
{
g_assert_not_reached ();
return 0;