1#[cfg(feature = "system-reflection-monofield-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 reflection::{
11 fieldinfo::{FieldInfo, IFieldInfo},
12 memberinfo::{IMemberInfo, MemberInfo},
13 rtfieldinfo::{IRtFieldInfo, RtFieldInfo},
14 runtimefieldinfo::{IRuntimeFieldInfo, RuntimeFieldInfo},
15 },
16 };
17
18 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/monofield/MonoField.md"))]
19 #[::unity::class(namespace = "System.Reflection", name = "MonoField")]
20 #[parent(crate::system::reflection::rtfieldinfo::RtFieldInfo)]
21 pub struct MonoField {
22 #[offset(16)]
23 #[rename(name = "klass")]
24 pub klass: ::unity::IntPtr,
25 #[offset(32)]
26 #[rename(name = "name")]
27 pub name: ::unity::Il2CppString,
28 #[offset(40)]
29 #[rename(name = "type")]
30 pub r#type: ::unity::SystemType,
31 #[offset(48)]
32 #[rename(name = "attrs")]
33 pub attrs: crate::system::reflection::fieldattributes::FieldAttributes,
34 }
35}
36
37#[cfg(feature = "system-reflection-monofield-types")]
38pub use __types::*;
39
40#[cfg(feature = "system-reflection-monofield")]
41impl MonoField {
42 #[doc = "`SetValueInternal(crate::system::reflection::fieldinfo::FieldInfo, crate::system::object::Object, crate::system::object::Object)` overload"]
43 pub fn set_value_internal(
44 fi: impl ::core::convert::Into<crate::system::reflection::fieldinfo::FieldInfo>,
45 obj: impl ::core::convert::Into<crate::system::object::Object>,
46 value: impl ::core::convert::Into<crate::system::object::Object>,
47 ) -> () {
48 unsafe {
49 ::unity::il2cpp_call!((::unity::module_base()+0x337f670usize)as*mut u8,();
50(crate::system::reflection::fieldinfo::FieldInfo)::core::convert::Into::into(fi),(crate::system::object::Object)::core::convert::Into::into(obj),(crate::system::object::Object)::core::convert::Into::into(value))
51 }
52 }
53}
54
55#[cfg(feature = "system-reflection-monofield")]
56pub trait IMonoFieldMethods: IMonoField {
57 #[doc = "`get_Attributes()` overload"]
58 fn get_attributes(self) -> crate::system::reflection::fieldattributes::FieldAttributes {
59 unsafe {
60 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
61 {
62 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
63 let __vi = *__vt.get(16usize).unwrap_or_else(|| {
64 panic!(
65 "unity: virtual slot {}
66 out of range (vtable len {}
67) on the runtime class behind {}
68 (method `{}
69`)",
70 16usize,
71 __vt.len(),
72 <MonoField as ::unity::ClassIdentity>::NAME,
73 "get_Attributes",
74 )
75 });
76 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> crate::system::reflection::fieldattributes::FieldAttributes =
77 ::core::mem::transmute(__vi.method_ptr);
78 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
79 __inner(__receiver, __mi)
80 }
81 }
82 }
83 #[doc = "`ResolveType()` overload"]
84 fn resolve_type(self) -> ::unity::SystemType {
85 unsafe {
86 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
87 ::unity::il2cpp_call!((::unity::module_base()+0x337f170usize)as*mut u8, ::unity::SystemType;
88(MonoField)__receiver)
89 }
90 }
91 #[doc = "`get_FieldType()` overload"]
92 fn get_field_type(self) -> ::unity::SystemType {
93 unsafe {
94 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
95 {
96 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
97 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
98 panic!(
99 "unity: virtual slot {}
100 out of range (vtable len {}
101) on the runtime class behind {}
102 (method `{}
103`)",
104 18usize,
105 __vt.len(),
106 <MonoField as ::unity::ClassIdentity>::NAME,
107 "get_FieldType",
108 )
109 });
110 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
111 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
112 __inner(__receiver, __mi)
113 }
114 }
115 }
116 #[doc = "`GetParentType(bool)` overload"]
117 fn get_parent_type(self, declaring: impl ::core::convert::Into<bool>) -> ::unity::SystemType {
118 unsafe {
119 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
120 ::unity::il2cpp_call!((::unity::module_base()+0x337f220usize)as*mut u8, ::unity::SystemType;
121(MonoField)__receiver,(bool)::core::convert::Into::into(declaring))
122 }
123 }
124 #[doc = "`get_ReflectedType()` overload"]
125 fn get_reflected_type(self) -> ::unity::SystemType {
126 unsafe {
127 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
128 {
129 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
130 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
131 panic!(
132 "unity: virtual slot {}
133 out of range (vtable len {}
134) on the runtime class behind {}
135 (method `{}
136`)",
137 9usize,
138 __vt.len(),
139 <MonoField as ::unity::ClassIdentity>::NAME,
140 "get_ReflectedType",
141 )
142 });
143 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
144 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
145 __inner(__receiver, __mi)
146 }
147 }
148 }
149 #[doc = "`get_DeclaringType()` overload"]
150 fn get_declaring_type(self) -> ::unity::SystemType {
151 unsafe {
152 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
153 {
154 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
155 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
156 panic!(
157 "unity: virtual slot {}
158 out of range (vtable len {}
159) on the runtime class behind {}
160 (method `{}
161`)",
162 8usize,
163 __vt.len(),
164 <MonoField as ::unity::ClassIdentity>::NAME,
165 "get_DeclaringType",
166 )
167 });
168 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
169 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
170 __inner(__receiver, __mi)
171 }
172 }
173 }
174 #[doc = "`get_Name()` overload"]
175 fn get_name(self) -> ::unity::Il2CppString {
176 unsafe {
177 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
178 {
179 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
180 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
181 panic!(
182 "unity: virtual slot {}
183 out of range (vtable len {}
184) on the runtime class behind {}
185 (method `{}
186`)",
187 7usize,
188 __vt.len(),
189 <MonoField as ::unity::ClassIdentity>::NAME,
190 "get_Name",
191 )
192 });
193 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
194 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
195 __inner(__receiver, __mi)
196 }
197 }
198 }
199 #[doc = "`IsDefined(::unity::SystemType, bool)` overload"]
200 fn is_defined(self, attribute_type: impl ::core::convert::Into<::unity::SystemType>, inherit: impl ::core::convert::Into<bool>) -> bool {
201 unsafe {
202 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
203 {
204 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
205 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
206 panic!(
207 "unity: virtual slot {}
208 out of range (vtable len {}
209) on the runtime class behind {}
210 (method `{}
211`)",
212 12usize,
213 __vt.len(),
214 <MonoField as ::unity::ClassIdentity>::NAME,
215 "IsDefined",
216 )
217 });
218 let __inner: extern "C" fn(MonoField, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
219 ::core::mem::transmute(__vi.method_ptr);
220 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
221 __inner(
222 __receiver,
223 ::core::convert::Into::into(attribute_type),
224 ::core::convert::Into::into(inherit),
225 __mi,
226 )
227 }
228 }
229 }
230 #[doc = "`GetCustomAttributes(bool)` overload"]
231 fn get_custom_attributes(self, inherit: impl ::core::convert::Into<bool>) -> ::unity::Array<crate::system::object::Object> {
232 unsafe {
233 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
234 {
235 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
236 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
237 panic!(
238 "unity: virtual slot {}
239 out of range (vtable len {}
240) on the runtime class behind {}
241 (method `{}
242`)",
243 10usize,
244 __vt.len(),
245 <MonoField as ::unity::ClassIdentity>::NAME,
246 "GetCustomAttributes",
247 )
248 });
249 let __inner: extern "C" fn(MonoField, bool, ::unity::OptionalMethod) -> ::unity::Array<crate::system::object::Object> =
250 ::core::mem::transmute(__vi.method_ptr);
251 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
252 __inner(__receiver, ::core::convert::Into::into(inherit), __mi)
253 }
254 }
255 }
256 #[doc = "`GetCustomAttributes(::unity::SystemType, bool)` overload"]
257 fn get_custom_attributes_2(
258 self,
259 attribute_type: impl ::core::convert::Into<::unity::SystemType>,
260 inherit: impl ::core::convert::Into<bool>,
261 ) -> ::unity::Array<crate::system::object::Object> {
262 unsafe {
263 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
264 {
265 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
266 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
267 panic!(
268 "unity: virtual slot {}
269 out of range (vtable len {}
270) on the runtime class behind {}
271 (method `{}
272`)",
273 11usize,
274 __vt.len(),
275 <MonoField as ::unity::ClassIdentity>::NAME,
276 "GetCustomAttributes",
277 )
278 });
279 let __inner: extern "C" fn(
280 MonoField,
281 ::unity::SystemType,
282 bool,
283 ::unity::OptionalMethod,
284 ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__vi.method_ptr);
285 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
286 __inner(
287 __receiver,
288 ::core::convert::Into::into(attribute_type),
289 ::core::convert::Into::into(inherit),
290 __mi,
291 )
292 }
293 }
294 }
295 #[doc = "`GetFieldOffset()` overload"]
296 fn get_field_offset(self) -> i32 {
297 unsafe {
298 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
299 {
300 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
301 let __vi = *__vt.get(33usize).unwrap_or_else(|| {
302 panic!(
303 "unity: virtual slot {}
304 out of range (vtable len {}
305) on the runtime class behind {}
306 (method `{}
307`)",
308 33usize,
309 __vt.len(),
310 <MonoField as ::unity::ClassIdentity>::NAME,
311 "GetFieldOffset",
312 )
313 });
314 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
315 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
316 __inner(__receiver, __mi)
317 }
318 }
319 }
320 #[doc = "`GetValueInternal(crate::system::object::Object)` overload"]
321 fn get_value_internal(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> crate::system::object::Object {
322 unsafe {
323 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
324 ::unity::il2cpp_call!((::unity::module_base()+0x337f3e0usize)as*mut u8,crate::system::object::Object;
325(MonoField)__receiver,(crate::system::object::Object)::core::convert::Into::into(obj))
326 }
327 }
328 #[doc = "`GetValue(crate::system::object::Object)` overload"]
329 fn get_value(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> crate::system::object::Object {
330 unsafe {
331 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
332 {
333 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
334 let __vi = *__vt.get(19usize).unwrap_or_else(|| {
335 panic!(
336 "unity: virtual slot {}
337 out of range (vtable len {}
338) on the runtime class behind {}
339 (method `{}
340`)",
341 19usize,
342 __vt.len(),
343 <MonoField as ::unity::ClassIdentity>::NAME,
344 "GetValue",
345 )
346 });
347 let __inner: extern "C" fn(MonoField, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
348 ::core::mem::transmute(__vi.method_ptr);
349 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
350 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
351 }
352 }
353 }
354 #[doc = "`ToString()` overload"]
355 fn to_string(self) -> ::unity::Il2CppString {
356 unsafe {
357 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
358 {
359 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
360 let __vi = *__vt.get(3usize).unwrap_or_else(|| {
361 panic!(
362 "unity: virtual slot {}
363 out of range (vtable len {}
364) on the runtime class behind {}
365 (method `{}
366`)",
367 3usize,
368 __vt.len(),
369 <MonoField as ::unity::ClassIdentity>::NAME,
370 "ToString",
371 )
372 });
373 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
374 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
375 __inner(__receiver, __mi)
376 }
377 }
378 }
379 #[doc = "`GetRawConstantValue()` overload"]
380 fn get_raw_constant_value(self) -> crate::system::object::Object {
381 unsafe {
382 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
383 {
384 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
385 let __vi = *__vt.get(35usize).unwrap_or_else(|| {
386 panic!(
387 "unity: virtual slot {}
388 out of range (vtable len {}
389) on the runtime class behind {}
390 (method `{}
391`)",
392 35usize,
393 __vt.len(),
394 <MonoField as ::unity::ClassIdentity>::NAME,
395 "GetRawConstantValue",
396 )
397 });
398 let __inner: extern "C" fn(MonoField, ::unity::OptionalMethod) -> crate::system::object::Object =
399 ::core::mem::transmute(__vi.method_ptr);
400 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
401 __inner(__receiver, __mi)
402 }
403 }
404 }
405 #[doc = "`GetCustomAttributesData()` overload"]
406 fn get_custom_attributes_data(
407 self,
408 ) -> crate::system::collections::generic::ilist_1_interface::IList_1_Interface<crate::system::reflection::customattributedata::CustomAttributeData>
409 {
410 unsafe {
411 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
412 {
413 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
414 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
415 panic!(
416 "unity: virtual slot {}
417 out of range (vtable len {}
418) on the runtime class behind {}
419 (method `{}
420`)",
421 13usize,
422 __vt.len(),
423 <MonoField as ::unity::ClassIdentity>::NAME,
424 "GetCustomAttributesData",
425 )
426 });
427 let __inner: extern "C" fn(
428 MonoField,
429 ::unity::OptionalMethod,
430 ) -> crate::system::collections::generic::ilist_1_interface::IList_1_Interface<
431 crate::system::reflection::customattributedata::CustomAttributeData,
432 > = ::core::mem::transmute(__vi.method_ptr);
433 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
434 __inner(__receiver, __mi)
435 }
436 }
437 }
438 #[doc = "`CheckGeneric()` overload"]
439 fn check_generic(self) -> () {
440 unsafe {
441 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
442 ::unity::il2cpp_call!((::unity::module_base()+0x337f580usize)as*mut u8,();
443(MonoField)__receiver)
444 }
445 }
446 #[doc = "`.ctor()` overload"]
447 fn ctor(self) -> () {
448 unsafe {
449 let __receiver = <MonoField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
450 ::unity::il2cpp_call!((::unity::module_base()+0x337f960usize)as*mut u8,();
451(MonoField)__receiver)
452 }
453 }
454}
455
456#[cfg(feature = "system-reflection-monofield")]
457impl<__T: IMonoField> IMonoFieldMethods for __T {}
458
459#[cfg(feature = "system-reflection-monofield")]
460impl MonoField {
461 pub fn get_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
462 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
463 }
464
465 pub fn resolve_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
466 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
467 }
468
469 pub fn get_field_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
470 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
471 }
472
473 pub fn get_parent_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
474 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
475 }
476
477 pub fn get_reflected_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
478 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
479 }
480
481 pub fn get_declaring_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
482 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
483 }
484
485 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
486 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
487 }
488
489 pub fn is_defined_method_info() -> &'static ::unity::il2cpp::MethodInfo {
490 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
491 }
492
493 pub fn get_custom_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
494 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
495 }
496
497 pub fn get_custom_attributes_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
498 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
499 }
500
501 pub fn get_field_offset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
502 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
503 }
504
505 pub fn get_value_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
506 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
507 }
508
509 pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
510 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
511 }
512
513 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
514 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
515 }
516
517 pub fn set_value_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
518 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
519 }
520
521 pub fn get_raw_constant_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
522 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
523 }
524
525 pub fn get_custom_attributes_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
526 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
527 }
528
529 pub fn check_generic_method_info() -> &'static ::unity::il2cpp::MethodInfo {
530 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
531 }
532
533 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
534 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
535 }
536}
537
538#[cfg(feature = "system-reflection-monofield")]
539impl MonoField {
540 #[doc = "Direct (non-virtual) call to `MonoField`'s own `get_Attributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
541 pub unsafe fn get_attributes(
542 this: impl ::core::convert::Into<::unity::IlInstance>,
543 ) -> crate::system::reflection::fieldattributes::FieldAttributes {
544 let __mi = Self::get_attributes_method_info();
545 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::fieldattributes::FieldAttributes =
546 ::core::mem::transmute(__mi.method_ptr);
547 __inner(this.into(), ::core::option::Option::None)
548 }
549
550 #[doc = "Direct (non-virtual) call to `MonoField`'s own `get_FieldType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
551 pub unsafe fn get_field_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
552 let __mi = Self::get_field_type_method_info();
553 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
554 __inner(this.into(), ::core::option::Option::None)
555 }
556
557 #[doc = "Direct (non-virtual) call to `MonoField`'s own `get_ReflectedType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
558 pub unsafe fn get_reflected_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
559 let __mi = Self::get_reflected_type_method_info();
560 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
561 __inner(this.into(), ::core::option::Option::None)
562 }
563
564 #[doc = "Direct (non-virtual) call to `MonoField`'s own `get_DeclaringType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
565 pub unsafe fn get_declaring_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
566 let __mi = Self::get_declaring_type_method_info();
567 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
568 __inner(this.into(), ::core::option::Option::None)
569 }
570
571 #[doc = "Direct (non-virtual) call to `MonoField`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
572 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
573 let __mi = Self::get_name_method_info();
574 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
575 __inner(this.into(), ::core::option::Option::None)
576 }
577
578 #[doc = "Direct (non-virtual) call to `MonoField`'s own `IsDefined`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
579 pub unsafe fn is_defined(this: impl ::core::convert::Into<::unity::IlInstance>, attribute_type: ::unity::SystemType, inherit: bool) -> bool {
580 let __mi = Self::is_defined_method_info();
581 let __inner: extern "C" fn(::unity::IlInstance, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
582 ::core::mem::transmute(__mi.method_ptr);
583 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
584 }
585
586 #[doc = "Direct (non-virtual) call to `MonoField`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
587 pub unsafe fn get_custom_attributes(
588 this: impl ::core::convert::Into<::unity::IlInstance>,
589 inherit: bool,
590 ) -> ::unity::Array<crate::system::object::Object> {
591 let __mi = Self::get_custom_attributes_method_info();
592 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> ::unity::Array<crate::system::object::Object> =
593 ::core::mem::transmute(__mi.method_ptr);
594 __inner(this.into(), inherit, ::core::option::Option::None)
595 }
596
597 #[doc = "Direct (non-virtual) call to `MonoField`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
598 pub unsafe fn get_custom_attributes_2(
599 this: impl ::core::convert::Into<::unity::IlInstance>,
600 attribute_type: ::unity::SystemType,
601 inherit: bool,
602 ) -> ::unity::Array<crate::system::object::Object> {
603 let __mi = Self::get_custom_attributes_2_method_info();
604 let __inner: extern "C" fn(
605 ::unity::IlInstance,
606 ::unity::SystemType,
607 bool,
608 ::unity::OptionalMethod,
609 ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__mi.method_ptr);
610 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
611 }
612
613 #[doc = "Direct (non-virtual) call to `MonoField`'s own `GetFieldOffset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
614 pub unsafe fn get_field_offset(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
615 let __mi = Self::get_field_offset_method_info();
616 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
617 __inner(this.into(), ::core::option::Option::None)
618 }
619
620 #[doc = "Direct (non-virtual) call to `MonoField`'s own `GetValue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
621 pub unsafe fn get_value(
622 this: impl ::core::convert::Into<::unity::IlInstance>,
623 obj: crate::system::object::Object,
624 ) -> crate::system::object::Object {
625 let __mi = Self::get_value_method_info();
626 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
627 ::core::mem::transmute(__mi.method_ptr);
628 __inner(this.into(), obj, ::core::option::Option::None)
629 }
630
631 #[doc = "Direct (non-virtual) call to `MonoField`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
632 pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
633 let __mi = Self::to_string_method_info();
634 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
635 __inner(this.into(), ::core::option::Option::None)
636 }
637
638 #[doc = "Direct (non-virtual) call to `MonoField`'s own `GetRawConstantValue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
639 pub unsafe fn get_raw_constant_value(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::object::Object {
640 let __mi = Self::get_raw_constant_value_method_info();
641 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
642 ::core::mem::transmute(__mi.method_ptr);
643 __inner(this.into(), ::core::option::Option::None)
644 }
645
646 #[doc = "Direct (non-virtual) call to `MonoField`'s own `GetCustomAttributesData`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
647 pub unsafe fn get_custom_attributes_data(
648 this: impl ::core::convert::Into<::unity::IlInstance>,
649 ) -> crate::system::collections::generic::ilist_1_interface::IList_1_Interface<crate::system::reflection::customattributedata::CustomAttributeData>
650 {
651 let __mi = Self::get_custom_attributes_data_method_info();
652 let __inner: extern "C" fn(
653 ::unity::IlInstance,
654 ::unity::OptionalMethod,
655 ) -> crate::system::collections::generic::ilist_1_interface::IList_1_Interface<
656 crate::system::reflection::customattributedata::CustomAttributeData,
657 > = ::core::mem::transmute(__mi.method_ptr);
658 __inner(this.into(), ::core::option::Option::None)
659 }
660}
661
662#[cfg(feature = "system-reflection-monofield")]
663impl MonoField {
664 #[doc = "`.ctor()` — no args"]
665 pub fn new() -> Self {
666 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
667 panic!(
668 "{}
669::{}
670 failed to instantiate",
671 ::core::stringify!(MonoField),
672 ::core::stringify!(new),
673 )
674 });
675 <Self as IMonoFieldMethods>::ctor(this);
676 this
677 }
678}
679
680#[cfg(feature = "system-reflection-monofield")]
681#[doc(hidden)]
682pub mod prelude {
683 pub use super::{IMonoField, IMonoFieldMethods, MonoField};
684 #[cfg(feature = "system-object")]
685 pub use crate::system::object::IObjectMethods;
686 #[cfg(feature = "system-reflection-fieldinfo")]
687 pub use crate::system::reflection::fieldinfo::IFieldInfoMethods;
688 #[cfg(feature = "system-reflection-memberinfo")]
689 pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
690 #[cfg(feature = "system-reflection-rtfieldinfo")]
691 pub use crate::system::reflection::rtfieldinfo::IRtFieldInfoMethods;
692 #[cfg(feature = "system-reflection-runtimefieldinfo")]
693 pub use crate::system::reflection::runtimefieldinfo::IRuntimeFieldInfoMethods;
694 pub use crate::system::{
695 object::IObject,
696 reflection::{fieldinfo::IFieldInfo, memberinfo::IMemberInfo, rtfieldinfo::IRtFieldInfo, runtimefieldinfo::IRuntimeFieldInfo},
697 };
698}