linux-packaging-mono/docs/deploy/mono-api-type.html
Xamarin Public Jenkins 3c6daee652 Imported Upstream version 4.2.2.29
Former-commit-id: f069081cc0821095435a845c961ae61cbbc95121
2016-01-18 21:29:19 -05:00

274 lines
8.1 KiB
HTML

<?xml version="1.0" encoding="utf-8"?><span>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>mono-api-type.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>
<h2>Type support</h2>
<h3>Synopsis</h3>
<div class="header">
#include &lt;metadata/metadata.h&gt;
#include &lt;metadata/class.h&gt;
typedef struct _MonoType MonoType;
<a href="#api:mono_type_get_object"></a>
<a href="#api:mono_type_create_from_typespec"></a>
<a href="#api:mono_type_full_name"></a>
MonoArrayType* <a href="#api:mono_type_get_array_type">mono_type_get_array_type</a> (MonoType *type);
MonoClass* <a href="#api:mono_type_get_class">mono_type_get_class</a> (MonoType *type);
<a href="#api:mono_type_get_desc"></a>
<a href="#api:mono_type_get_modifiers"></a>
char* <a href="#api:mono_type_get_name">mono_type_get_name</a> (MonoType *type);
MonoMethodSignature* <a href="#api:mono_type_get_signature">mono_type_get_signature</a> (MonoType *type);
int <a href="#api:mono_type_get_type">mono_type_get_type</a> (MonoType *type);
<a href="#api:mono_type_get_underlying_type"></a>
gboolean <a href="#api:mono_type_is_byref">mono_type_is_byref</a> (MonoType *type);
<a href="#api:mono_type_size"></a>
<a href="#api:mono_type_stack_size"></a>
guint32 <a href="#api:mono_type_to_unmanaged">mono_type_to_unmanaged</a> (MonoType *type,
MonoMarshalSpec *mspec,
gboolean as_field;
<a href="#api:mono_type_generic_inst_is_valuetype"></a>
</div>
<p />The MonoType represents the unmanaged version of
System.Type.
<a name="api:mono_type_get_object"></a>
<div class="api">
<div class="api-entry">mono_type_get_object</div>
<div class="prototype">Prototype: mono_type_get_object</div>
<p />
</div> <a name="api:mono_type_create_from_typespec"></a>
<div class="api">
<div class="api-entry">mono_type_create_from_typespec</div>
<div class="prototype">Prototype: mono_type_create_from_typespec</div>
<p />
</div> <a name="api:mono_type_full_name"></a>
<div class="api">
<div class="api-entry">mono_type_full_name</div>
<div class="prototype">Prototype: mono_type_full_name</div>
<p />
</div> <a name="api:mono_type_get_array_type"></a>
<div class="api">
<div class="api-entry">mono_type_get_array_type</div>
<div class="prototype">MonoArrayType*
mono_type_get_array_type (MonoType *type)
</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>type:</i></dt><dd> the MonoType operated on</dd></blockquote>
<b>Returns</b>
<blockquote> a MonoArrayType struct describing the array type that <i>type</i>
represents. The info includes details such as rank, array element type
and the sizes and bounds of multidimensional arrays.</blockquote>
<b>Remarks</b>
<p />
It is only valid to call this function if <i>type</i> is a MONO_TYPE_ARRAY.
</div> <a name="api:mono_type_get_class"></a>
<div class="api">
<div class="api-entry">mono_type_get_class</div>
<div class="prototype">MonoClass*
mono_type_get_class (MonoType *type)
</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>type:</i></dt><dd> the MonoType operated on</dd></blockquote>
<b>Returns</b>
<blockquote> the MonoClass pointer that describes the class that <i>type</i> represents.
</blockquote>
<b>Remarks</b>
<p />
It is only valid to call this function if <i>type</i> is a MONO_TYPE_CLASS or a
MONO_TYPE_VALUETYPE. For more general functionality, use mono_class_from_mono_type (),
instead
</div> <a name="api:mono_type_get_desc"></a>
<div class="api">
<div class="api-entry">mono_type_get_desc</div>
<div class="prototype">Prototype: mono_type_get_desc</div>
<p />
</div> <a name="api:mono_type_get_modifiers"></a>
<div class="api">
<div class="api-entry">mono_type_get_modifiers</div>
<div class="prototype">Prototype: mono_type_get_modifiers</div>
<p />
</div> <a name="api:mono_type_get_name"></a>
<div class="api">
<div class="api-entry">mono_type_get_name</div>
<div class="prototype">char*
mono_type_get_name (MonoType *type)
</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>type:</i></dt><dd> a type</dd></blockquote>
<b>Returns</b>
<blockquote> the string representation for type as it would be represented in IL code.
</blockquote>
</div> <a name="api:mono_type_get_signature"></a>
<div class="api">
<div class="api-entry">mono_type_get_signature</div>
<div class="prototype">MonoMethodSignature*
mono_type_get_signature (MonoType *type)
</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>type:</i></dt><dd> the MonoType operated on</dd></blockquote>
<b>Returns</b>
<blockquote> the MonoMethodSignature pointer that describes the signature
of the function pointer <i>type</i> represents.</blockquote>
<b>Remarks</b>
<p />
It is only valid to call this function if <i>type</i> is a MONO_TYPE_FNPTR.
</div> <a name="api:mono_type_get_type"></a>
<div class="api">
<div class="api-entry">mono_type_get_type</div>
<div class="prototype">int
mono_type_get_type (MonoType *type)
</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>type:</i></dt><dd> the MonoType operated on</dd></blockquote>
<b>Returns</b>
<blockquote> the IL type value for <i>type</i>. This is one of the MonoTypeEnum
enum members like MONO_TYPE_I4 or MONO_TYPE_STRING.</blockquote>
</div> <a name="api:mono_type_get_underlying_type"></a>
<div class="api">
<div class="api-entry">mono_type_get_underlying_type</div>
<div class="prototype">Prototype: mono_type_get_underlying_type</div>
<p />
</div> <a name="api:mono_type_is_byref"></a>
<div class="api">
<div class="api-entry">mono_type_is_byref</div>
<div class="prototype">gboolean
mono_type_is_byref (MonoType *type)
</div>
<p />
<b>Parameters</b>
<blockquote><dt><i>type:</i></dt><dd> the MonoType operated on</dd></blockquote>
<b>Returns</b>
<blockquote> <i>TRUE</i> if <i>type</i> represents a type passed by reference,
<i>FALSE</i> otherwise.</blockquote>
</div> <a name="api:mono_type_size"></a>
<div class="api">
<div class="api-entry">mono_type_size</div>
<div class="prototype">Prototype: mono_type_size</div>
<p />
</div> <a name="api:mono_type_stack_size"></a>
<div class="api">
<div class="api-entry">mono_type_stack_size</div>
<div class="prototype">Prototype: mono_type_stack_size</div>
<p />
</div> <a name="api:mono_type_to_unmanaged"></a>
<div class="api">
<div class="api-entry">mono_type_to_unmanaged</div>
<div class="prototype">guint32
mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec, gboolean as_field,
gboolean unicode, MonoMarshalConv *conv)
</div>
<p />
<b>Returns</b>
<blockquote> A MonoMarshalNative enumeration value (MONO_NATIVE_) value
describing the underlying native reprensetation of the type.
<p />
In addition the value pointed by
&quot;conv&quot; will contain the kind of marshalling required for this
particular type one of the MONO_MARSHAL_CONV_ enumeration values.</blockquote>
</div></body>
</html>
</span>