X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=docs%2Fsources%2Fmono-api-object.html;h=d11226f5232f12efeff438c4e7d4f32b772c9e26;hb=16c07b50f3c412724c6d90c7ba46fe5c60a9bf16;hp=2878a5844b9d13ea8a45eaf64d1222e654c3faf5;hpb=3331634f37c395ea87d15a2f3338b2bc66a8470a;p=mono.git diff --git a/docs/sources/mono-api-object.html b/docs/sources/mono-api-object.html index 2878a5844b9..d11226f5232 100644 --- a/docs/sources/mono-api-object.html +++ b/docs/sources/mono-api-object.html @@ -2,21 +2,21 @@
The object API deals with all the operations shared by objects, value - types, arrays and nullable types. + types, arrays.
The object API has methods for accessing fields, properties, properties, methods, events, delegates. + +
There are some advanced uses that are useful to document - here dealing with AsyncResults and remote fields. + here dealing with remote fields.
MonoObject is the base definition for all managed objects +
`MonoObject` is the base definition for all managed objects in the Mono runtime, it represents the System.Object managed type. @@ -56,12 +56,11 @@ typedef struct { following the pattern where the parent class is the first field of a structure definition, for example: -
For example, if you wanted to create an object of type System.Version, you would use a piece of code like this: -
- - MonoArray *CreateByteArray (MonoDomain *domain) - { - MonoArray *data; ++MonoArray *CreateByteArray (MonoDomain *domain) +{ + MonoArray *data; - data = mono_array_new (domain, mono_get_byte_class (), 2); - mono_array_set (data, guint8, 0, 0xca); - mono_array_set (data, guint8, 0, 0xfe); - - return data; - } + data = mono_array_new (domain, mono_get_byte_class (), 2); + mono_array_set (data, guint8, 0, 0xca); + mono_array_set (data, guint8, 0, 0xfe); + return data; +}Creating Arrays
@@ -137,21 +134,35 @@ result = mono_object_new (mono_domain_get (), version_class);mono_array_new_full
mono_array_new_specific
mono_array_class_get
-mono_array_clone_in_domain
mono_array_clone
-mono_array_full_copy
-mono_array_to_lparray
-mono_array_to_savearray
-mono_dup_array_type
Using Arrays
+Arrays are represented by the `MonoArray` data type and are + instances of `MonoObject`. While you can use the `bounds` + and `max_length` fields of the type, the actual storage + (represented by `vector`) is not very useful. Instead you + should use one of the accesor methods described below to + fetch or set the values in the array. + +
When setting values in an array, you should + use mono_array_set for + setting elements in an array that contains value types, and + mono_array_setref for arrays + that contain reference types. + +
The mono_array_get, + mono_array_set and mono_array_setref are C + macros that wrap the underlying array access. + +
mono_array_get
+mono_array_length
mono_array_set
mono_array_setref
-mono_array_length
mono_array_addr
mono_array_addr_with_size
-mono_array_get
mono_array_element_size
@@ -167,10 +178,12 @@ result = mono_object_new (mono_domain_get (), version_class);mono_field_set_value
mono_field_static_get_value
mono_field_static_set_value
+mono_field_get_object
Properties
+mono_property_get_object
mono_property_get_flags
mono_property_get_get_method
mono_property_get_name
@@ -182,6 +195,7 @@ result = mono_object_new (mono_domain_get (), version_class);Events
+mono_event_get_object
mono_event_get_add_method
mono_event_get_flags
mono_event_get_name
@@ -189,14 +203,6 @@ result = mono_object_new (mono_domain_get (), version_class);mono_event_get_raise_method
mono_event_get_remove_method
- -Delegates
-mono_delegate_ctor
- - -AsyncResults
-mono_async_result_new
-Remote Fields
mono_load_remote_field
@@ -204,11 +210,7 @@ result = mono_object_new (mono_domain_get (), version_class);mono_store_remote_field
mono_store_remote_field_new
- -Nullable Objects
- -These methods are used to manipulate objects of type - System.Nullable<T> - -
mono_nullable_box
-mono_nullable_init
+ +Delegates
+mono_get_delegate_begin_invoke
+mono_get_delegate_end_invoke