Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > main-backports > by-pkgid > ec081eb1f0fb87b7640153d3a3340fac > files > 64

mono-doc-2.4.2.2-1mdv2009.1.x86_64.rpm

<?xml version="1.0" encoding="us-ascii"?><span>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>mono-api-methods.html</title>
   <style type="text/css">


   h3 { 
       font-size: 18px;
       padding-bottom: 4pt;
       border-bottom: 2px solid #dddddd;
   }
       
   .api {
     border: 1px solid;
     padding: 10pt;
     margin: 10pt;
   } 

   .api-entry { 
       border-bottom: none;
       font-size: 18px;
   }

   .prototype {
     border: 1px solid;
     background-color: #f2f2f2;
     padding: 5pt;
     margin-top: 5pt;
     margin-bottom: 5pt;  
   } 

   .header {
     border: 1px solid;
     padding: 0 0 5pt 5pt;
     margin: 10pt;
     white-space: pre;
       font-family: monospace;
   }
    
   .code {
     border: 1px solid;
     padding: 0 0 5pt 5pt;
     margin: 10pt;
     white-space: pre;
       font-family: monospace;
   }
   

</style>
</head>
<body>
<h3>Methods</h3>

<h3>Invoking Methods</h3>

 <a name="api:mono_runtime_invoke"></a>
 <div class="api">
    <div class="api-entry">mono_runtime_invoke</div>

    <div class="prototype">MonoObject*
mono_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc)

</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>method:</i></dt><dd> method to invoke</dd><dt><i>obJ:</i></dt><dd> object instance</dd><dt><i>params:</i></dt><dd> arguments to the method</dd><dt><i>exc:</i></dt><dd> exception information.</dd></blockquote>
<b>Remarks</b>
<p />	 
	 Invokes the method represented by <i>method</i> on the object <i>obj</i>.
	
	 obj is the 'this' pointer, it should be NULL for static
	 methods, a MonoObject* for object instances and a pointer to
	 the value type for value types.
	
	 The params array contains the arguments to the method with the
	 same convention: MonoObject* pointers for object instances and
	 pointers to the value type otherwise. 
	
<p />
	 From unmanaged code you'll usually use the
	 mono_runtime_invoke() variant.
	
	 Note that this function doesn't handle virtual methods for
	 you, it will exec the exact method you pass: we still need to
	 expose a function to lookup the derived class implementation
	 of a virtual method (there are examples of this in the code,
	 though).
	
<p />
	 You can pass NULL as the exc argument if you don't want to
	 catch exceptions, otherwise, *exc will be set to the exception
	 thrown, if any.  if an exception is thrown, you can't use the
	 MonoObject* result from the function.
	
<p />
	 If the method returns a value type, it is boxed in an object
	 reference.


If you want to invoke generic methods, you must call the method on the
&quot;inflated&quot; class, which you can obtain from the
<tt>mono_object_get_class()</tt>

<div class="code">
MonoClass *clazz;
MonoMethod *method;

clazz = mono_object_get_class (obj);

/*
 * If there are more Add methods declared, you
 * may use mono_method_desc_search_in_class (clazz, &quot;:Add(T)&quot;),
 * you must substitute &quot;:Add(T)&quot; with the correct type, for example
 * for List&lt;int&gt;, you would use &quot;:Add(int)&quot;.
 */
method = mono_class_get_method_from_name (clazz, &quot;Add&quot;, 1);
mono_runtime_invoke (method, obj, args, &amp;exception);
</div>


</div> <a name="api:mono_runtime_invoke_array"></a>
 <div class="api">
    <div class="api-entry">mono_runtime_invoke_array</div>

    <div class="prototype">MonoObject*
mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
			   MonoObject **exc)

</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>method:</i></dt><dd> method to invoke</dd><dt><i>obJ:</i></dt><dd> object instance</dd><dt><i>params:</i></dt><dd> arguments to the method</dd><dt><i>exc:</i></dt><dd> exception information.</dd></blockquote>
<b>Remarks</b>
<p />	 
	 Invokes the method represented by <i>method</i> on the object <i>obj</i>.
	
	 obj is the 'this' pointer, it should be NULL for static
	 methods, a MonoObject* for object instances and a pointer to
	 the value type for value types.
	
	 The params array contains the arguments to the method with the
	 same convention: MonoObject* pointers for object instances and
	 pointers to the value type otherwise. The _invoke_array
	 variant takes a C# object[] as the params argument (MonoArray
	 *params): in this case the value types are boxed inside the
	 respective reference representation.
	
<p />
	 From unmanaged code you'll usually use the
	 mono_runtime_invoke() variant.
	
	 Note that this function doesn't handle virtual methods for
	 you, it will exec the exact method you pass: we still need to
	 expose a function to lookup the derived class implementation
	 of a virtual method (there are examples of this in the code,
	 though).
	
<p />
	 You can pass NULL as the exc argument if you don't want to
	 catch exceptions, otherwise, *exc will be set to the exception
	 thrown, if any.  if an exception is thrown, you can't use the
	 MonoObject* result from the function.
	
<p />
	 If the method returns a value type, it is boxed in an object
	 reference.

</div> <a name="api:mono_remoting_invoke"></a>
 <div class="api">
    <div class="api-entry">mono_remoting_invoke</div>

    <div class="prototype">MonoObject*
mono_remoting_invoke (MonoObject *real_proxy, MonoMethodMessage *msg, 
		      MonoObject **exc, MonoArray **out_args)

</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>real_proxy:</i></dt><dd> pointer to a RealProxy object</dd><dt><i>msg:</i></dt><dd> The MonoMethodMessage to execute</dd><dt><i>exc:</i></dt><dd> used to store exceptions</dd><dt><i>out_args:</i></dt><dd> used to store output arguments</dd></blockquote>
<b>Returns</b>
<blockquote>	  the result object.
</blockquote>
<b>Remarks</b>
<p />	 
	 This is used to call RealProxy::Invoke(). RealProxy::Invoke() returns an
	 IMessage interface and it is not trivial to extract results from there. So
	 we call an helper method PrivateInvoke instead of calling
	 RealProxy::Invoke() directly.
	

</div> <a name="api:mono_runtime_delegate_invoke"></a>
 <div class="api">
    <div class="api-entry">mono_runtime_delegate_invoke</div>

    <div class="prototype">MonoObject*
mono_runtime_delegate_invoke (MonoObject *delegate, void **params, MonoObject **exc)

</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>delegate:</i></dt><dd> pointer to a delegate object.</dd><dt><i>params:</i></dt><dd> parameters for the delegate.</dd><dt><i>exc:</i></dt><dd> Pointer to the exception result.</dd></blockquote>
<b>Remarks</b>
<p />	 
	 Invokes the delegate method <i>delegate</i> with the parameters provided.
	
	 You can pass NULL as the exc argument if you don't want to
	 catch exceptions, otherwise, *exc will be set to the exception
	 thrown, if any.  if an exception is thrown, you can't use the
	 MonoObject* result from the function.


</div> <a name="api:mono_method_call_message_new"></a>
 <div class="api">
    <div class="api-entry">mono_method_call_message_new</div>

    <div class="prototype">MonoMethodMessage*
mono_method_call_message_new (MonoMethod *method, gpointer *params, MonoMethod *invoke, 
			      MonoDelegate **cb, MonoObject **state)

</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>method:</i></dt><dd> method to encapsulate</dd><dt><i>params:</i></dt><dd> parameters to the method</dd><dt><i>invoke:</i></dt><dd> optional, delegate invoke.</dd><dt><i>cb:</i></dt><dd> async callback delegate.</dd><dt><i>state:</i></dt><dd> state passed to the async callback.</dd></blockquote>
<b>Remarks</b>
<p />	 
	 Translates arguments pointers into a MonoMethodMessage.

</div> <a name="api:mono_method_desc_free"></a>
 <div class="api">
    <div class="api-entry">mono_method_desc_free</div>

    <div class="prototype">void
mono_method_desc_free (MonoMethodDesc *desc)

</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>desc:</i></dt><dd> method description to be released</dd></blockquote>
<b>Remarks</b>
<p />	 
	 Releases the MonoMethodDesc object <i>desc</i>.

</div> <a name="api:mono_method_desc_from_method"></a>
 <div class="api">
    <div class="api-entry">mono_method_desc_from_method</div>

    <div class="prototype">Prototype: mono_method_desc_from_method</div>
<p />

</div> <a name="api:mono_method_desc_full_match"></a>
 <div class="api">
    <div class="api-entry">mono_method_desc_full_match</div>

    <div class="prototype">Prototype: mono_method_desc_full_match</div>
<p />

</div> <a name="api:mono_method_desc_match"></a>
 <div class="api">
    <div class="api-entry">mono_method_desc_match</div>

    <div class="prototype">Prototype: mono_method_desc_match</div>
<p />

</div> <a name="api:mono_method_desc_new"></a>
 <div class="api">
    <div class="api-entry">mono_method_desc_new</div>

    <div class="prototype">MonoMethodDesc*
mono_method_desc_new (const char *name, gboolean include_namespace)

</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>name:</i></dt><dd> the method name.</dd><dt><i>include_namespace:</i></dt><dd> whether the name includes a namespace or not.</dd></blockquote>
<b>Returns</b>
<blockquote>	  a parsed representation of the method description.
</blockquote>
<b>Remarks</b>
<p />	 
	 Creates a method description for <i>name</i>, which conforms to the following
	 specification:
	
	 [namespace.]classname:methodname[(args...)]
	
	 in all the loaded assemblies.
	

</div> <a name="api:mono_method_desc_search_in_class"></a>
 <div class="api">
    <div class="api-entry">mono_method_desc_search_in_class</div>

    <div class="prototype">Prototype: mono_method_desc_search_in_class</div>
<p />

</div> <a name="api:mono_method_desc_search_in_image"></a>
 <div class="api">
    <div class="api-entry">mono_method_desc_search_in_image</div>

    <div class="prototype">Prototype: mono_method_desc_search_in_image</div>
<p />

</div> <a name="api:mono_method_full_name"></a>
 <div class="api">
    <div class="api-entry">mono_method_full_name</div>

    <div class="prototype">Prototype: mono_method_full_name</div>
<p />

</div> <a name="api:mono_method_get_class"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_class</div>

    <div class="prototype">Prototype: mono_method_get_class</div>
<p />

</div> <a name="api:mono_method_get_flags"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_flags</div>

    <div class="prototype">Prototype: mono_method_get_flags</div>
<p />

</div> <a name="api:mono_method_get_last_managed"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_last_managed</div>

    <div class="prototype">Prototype: mono_method_get_last_managed</div>
<p />

</div> <a name="api:mono_method_get_marshal_info"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_marshal_info</div>

    <div class="prototype">Prototype: mono_method_get_marshal_info</div>
<p />

</div> <a name="api:mono_method_get_name"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_name</div>

    <div class="prototype">Prototype: mono_method_get_name</div>
<p />

</div> <a name="api:mono_method_get_object"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_object</div>

    <div class="prototype">Prototype: mono_method_get_object</div>
<p />

</div> <a name="api:mono_method_get_param_names"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_param_names</div>

    <div class="prototype">Prototype: mono_method_get_param_names</div>
<p />

</div> <a name="api:mono_method_get_param_token"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_param_token</div>

    <div class="prototype">Prototype: mono_method_get_param_token</div>
<p />

</div> <a name="api:mono_method_get_signature"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_signature</div>

    <div class="prototype">Prototype: mono_method_get_signature</div>
<p />

</div> <a name="api:mono_method_get_index"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_index</div>

    <div class="prototype">Prototype: mono_method_get_index</div>
<p />

</div> <a name="api:mono_method_get_signature_full"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_signature_full</div>

    <div class="prototype">Prototype: mono_method_get_signature_full</div>
<p />

</div> <a name="api:mono_method_get_token"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_token</div>

    <div class="prototype">Prototype: mono_method_get_token</div>
<p />

</div> <a name="api:mono_method_get_wrapper_data"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_wrapper_data</div>

    <div class="prototype">Prototype: mono_method_get_wrapper_data</div>
<p />

</div> <a name="api:mono_method_has_marshal_info"></a>
 <div class="api">
    <div class="api-entry">mono_method_has_marshal_info</div>

    <div class="prototype">Prototype: mono_method_has_marshal_info</div>
<p />

</div> <a name="api:mono_method_return_message_restore"></a>
 <div class="api">
    <div class="api-entry">mono_method_return_message_restore</div>

    <div class="prototype">void
mono_method_return_message_restore (MonoMethod *method, gpointer *params, MonoArray *out_args)

</div>
<p />
<b>Remarks</b>
<p />	 
	 Restore results from message based processing back to arguments pointers

</div> <a name="api:mono_method_same_domain"></a>
 <div class="api">
    <div class="api-entry">mono_method_same_domain</div>

    <div class="prototype">Prototype: mono_method_same_domain</div>
<p />

</div> <a name="api:mono_method_verify"></a>
 <div class="api">
    <div class="api-entry">mono_method_verify</div>

    <div class="prototype">Prototype: mono_method_verify</div>
<p />


</div><h3>Method Signatures</h3>

 <a name="api:mono_method_signature"></a>
 <div class="api">
    <div class="api-entry">mono_method_signature</div>

    <div class="prototype">MonoMethodSignature*
mono_method_signature (MonoMethod *m)

</div>
<p />
<b>Remarks</b>
<p />	 
	 Return the signature of the method M. On failure, returns NULL.

</div> <a name="api:mono_signature_explicit_this"></a>
 <div class="api">
    <div class="api-entry">mono_signature_explicit_this</div>

    <div class="prototype">Prototype: mono_signature_explicit_this</div>
<p />

</div> <a name="api:mono_signature_get_call_conv"></a>
 <div class="api">
    <div class="api-entry">mono_signature_get_call_conv</div>

    <div class="prototype">Prototype: mono_signature_get_call_conv</div>
<p />

</div> <a name="api:mono_signature_get_desc"></a>
 <div class="api">
    <div class="api-entry">mono_signature_get_desc</div>

    <div class="prototype">Prototype: mono_signature_get_desc</div>
<p />

</div> <a name="api:mono_signature_get_param_count"></a>
 <div class="api">
    <div class="api-entry">mono_signature_get_param_count</div>

    <div class="prototype">Prototype: mono_signature_get_param_count</div>
<p />

</div> <a name="api:mono_signature_get_params"></a>
 <div class="api">
    <div class="api-entry">mono_signature_get_params</div>

    <div class="prototype">Prototype: mono_signature_get_params</div>
<p />

</div> <a name="api:mono_signature_get_return_type"></a>
 <div class="api">
    <div class="api-entry">mono_signature_get_return_type</div>

    <div class="prototype">Prototype: mono_signature_get_return_type</div>
<p />

</div> <a name="api:mono_signature_hash"></a>
 <div class="api">
    <div class="api-entry">mono_signature_hash</div>

    <div class="prototype">Prototype: mono_signature_hash</div>
<p />

</div> <a name="api:mono_signature_is_instance"></a>
 <div class="api">
    <div class="api-entry">mono_signature_is_instance</div>

    <div class="prototype">Prototype: mono_signature_is_instance</div>
<p />

</div> <a name="api:mono_signature_vararg_start"></a>
 <div class="api">
    <div class="api-entry">mono_signature_vararg_start</div>

    <div class="prototype">Prototype: mono_signature_vararg_start</div>
<p />


</div><h3>Methods Header Operations</h3>

 <a name="api:mono_method_get_header"></a>
 <div class="api">
    <div class="api-entry">mono_method_get_header</div>

    <div class="prototype">Prototype: mono_method_get_header</div>
<p />

</div> <a name="api:mono_method_header_get_clauses"></a>
 <div class="api">
    <div class="api-entry">mono_method_header_get_clauses</div>

    <div class="prototype">Prototype: mono_method_header_get_clauses</div>
<p />

</div> <a name="api:mono_method_header_get_code"></a>
 <div class="api">
    <div class="api-entry">mono_method_header_get_code</div>

    <div class="prototype">Prototype: mono_method_header_get_code</div>
<p />

</div> <a name="api:mono_method_header_get_locals"></a>
 <div class="api">
    <div class="api-entry">mono_method_header_get_locals</div>

    <div class="prototype">Prototype: mono_method_header_get_locals</div>
<p />

</div></body>
</html>
</span>