engage/generated/system/reflection/
methodbody.rs1#[cfg(feature = "system-reflection-methodbody-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/methodbody/MethodBody.md"))]
11 #[::unity::class(namespace = "System.Reflection", name = "MethodBody")]
12 #[parent(crate::system::object::Object)]
13 pub struct MethodBody {
14 #[offset(16)]
15 #[rename(name = "clauses")]
16 pub clauses: ::unity::Array<crate::system::reflection::exceptionhandlingclause::ExceptionHandlingClause>,
17 #[offset(24)]
18 #[rename(name = "locals")]
19 pub locals: ::unity::Array<crate::system::reflection::localvariableinfo::LocalVariableInfo>,
20 #[offset(32)]
21 #[rename(name = "il")]
22 pub il: ::unity::Array<u8>,
23 #[offset(40)]
24 #[rename(name = "init_locals")]
25 pub init_locals: bool,
26 #[offset(44)]
27 #[rename(name = "sig_token")]
28 pub sig_token: i32,
29 #[offset(48)]
30 #[rename(name = "max_stack")]
31 pub max_stack: i32,
32 }
33}
34
35#[cfg(feature = "system-reflection-methodbody-types")]
36pub use __types::*;
37
38#[cfg(feature = "system-reflection-methodbody")]
39pub trait IMethodBodyMethods: IMethodBody {
40 #[doc = "`.ctor()` overload"]
41 fn ctor(self) -> () {
42 unsafe {
43 let __receiver = <MethodBody as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44 ::unity::il2cpp_call!((::unity::module_base()+0x3375780usize)as*mut u8,();
45(MethodBody)__receiver)
46 }
47 }
48}
49
50#[cfg(feature = "system-reflection-methodbody")]
51impl<__T: IMethodBody> IMethodBodyMethods for __T {}
52
53#[cfg(feature = "system-reflection-methodbody")]
54impl MethodBody {
55 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
56 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
57 }
58}
59
60#[cfg(feature = "system-reflection-methodbody")]
61impl MethodBody {
62 #[doc = "`.ctor()` — no args"]
63 pub fn new() -> Self {
64 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
65 panic!(
66 "{}
67::{}
68 failed to instantiate",
69 ::core::stringify!(MethodBody),
70 ::core::stringify!(new),
71 )
72 });
73 <Self as IMethodBodyMethods>::ctor(this);
74 this
75 }
76}
77
78#[cfg(feature = "system-reflection-methodbody")]
79#[doc(hidden)]
80pub mod prelude {
81 pub use super::{IMethodBody, IMethodBodyMethods, MethodBody};
82 pub use crate::system::object::IObject;
83 #[cfg(feature = "system-object")]
84 pub use crate::system::object::IObjectMethods;
85}