Merge pull request #2570 from lambdageek/monoerror-reflection-bubble-2
authorAleksey Kliger (λgeek) <akliger@gmail.com>
Tue, 9 Feb 2016 20:52:52 +0000 (15:52 -0500)
committerAleksey Kliger (λgeek) <akliger@gmail.com>
Tue, 9 Feb 2016 20:52:52 +0000 (15:52 -0500)
[reflection] Grab bag of MonoError commits

docs/exdoc
docs/sources/mono-api-assembly.html
docs/sources/mono-api-class.html
docs/sources/mono-api-embedding.html
docs/toc.xml
mono/metadata/icall.c
mono/metadata/reflection.c

index 7ce4b9290cca64805d7655ad68b3d071c4d686ff..058a2f7b962399d0c382b59ff000616060769377 100644 (file)
@@ -63,6 +63,7 @@ $css
 EOF
        @a = split (/\n/, $files_content[$f]);
        $strikeextra = "";
+       $api_shown = 0;
        for ($ai = 0; $ai < $#a; $ai++){
            $line = $a[$ai];
            
@@ -134,14 +135,16 @@ EOF
        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
@@ -151,9 +154,13 @@ EOF
                    last if (/<\/style>/);
                }
            }
-
-           print HACKOUT $_;
+           $last = $_;
+           $doprint = 1;
+       }
+       if (!($last =~ /span/)){
+           print HACKOUT $last;
        }
+
        #system ("cp.exe $dir/html/$name $dir/deploy/$name");
     }
 }
index 979a74c5246f347e23b4129acf9e29041c20b360..0f46f26805cc07bc16a8eda9fdec56ee7ae4d8eb 100644 (file)
@@ -1,5 +1,28 @@
 <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">
@@ -7,12 +30,9 @@
 
 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>
@@ -28,6 +48,7 @@ typedef struct _MonoAssembly MonoAssembly;
 <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>
@@ -48,6 +69,7 @@ typedef struct _MonoAssembly MonoAssembly;
 <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
@@ -67,6 +89,7 @@ typedef struct _MonoAssembly MonoAssembly;
 <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.
@@ -75,6 +98,7 @@ typedef struct _MonoAssembly MonoAssembly;
 <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>
index a15720635d831fba8984acbbf27201583bfdd15a..fddded790f4e48f4bdf6adbba0cf248607526429 100644 (file)
@@ -4,15 +4,15 @@
        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>
@@ -80,7 +80,7 @@
 <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>
@@ -93,7 +93,7 @@
 <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>
index 4c4329f634a6a636ec1720de3d2345705b30f789..fe086b29d91149a2aa73621c0b3eec50adf116ed 100644 (file)
@@ -1,5 +1,18 @@
 <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)
index 656dd26ba088fd8654c3c6d623fdb56b99013a60..5641273c09e06df9f4d8908960661a8193bda912 100644 (file)
           <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>
index de362a89519526a51600475586cfff9b9c1844d4..4c456dfaedd0f5c6d7df87a90350a68992b60d64 100644 (file)
@@ -7980,6 +7980,42 @@ mono_icall_cleanup (void)
        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)
 {
index 009d76b504ad8fcb800013a99c456ec95c3c1607..7786598405280f56a2659bffba7de06af1edb0be 100644 (file)
@@ -13253,7 +13253,7 @@ mono_image_create_method_token (MonoDynamicImage *assembly, MonoObject *obj, Mon
 
 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;