engage/generated/system/reflection/
runtimemethodinfo.rs1#[cfg(feature = "system-reflection-runtimemethodinfo-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 memberinfo::{IMemberInfo, MemberInfo},
12 methodbase::{IMethodBase, MethodBase},
13 methodinfo::{IMethodInfo, MethodInfo},
14 },
15 };
16
17 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/runtimemethodinfo/RuntimeMethodInfo.md"))]
18 #[::unity::class(namespace = "System.Reflection", name = "RuntimeMethodInfo")]
19 #[parent(crate::system::reflection::methodinfo::MethodInfo)]
20 pub struct RuntimeMethodInfo {}
21}
22
23#[cfg(feature = "system-reflection-runtimemethodinfo-types")]
24pub use __types::*;
25
26#[cfg(feature = "system-reflection-runtimemethodinfo")]
27pub trait IRuntimeMethodInfoMethods: IRuntimeMethodInfo {
28 #[doc = "`get_BindingFlags()` overload"]
29 fn get_binding_flags(self) -> crate::system::reflection::bindingflags::BindingFlags {
30 unsafe {
31 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32 ::unity::il2cpp_call!((::unity::module_base()+0x2fd5aa0usize)as*mut u8,crate::system::reflection::bindingflags::BindingFlags;
33(RuntimeMethodInfo)__receiver)
34 }
35 }
36 #[doc = "`get_Module()` overload"]
37 fn get_module(self) -> crate::system::reflection::module::Module {
38 unsafe {
39 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
40 {
41 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
42 let __vi = *__vt.get(15usize).unwrap_or_else(|| {
43 panic!(
44 "unity: virtual slot {}
45 out of range (vtable len {}
46) on the runtime class behind {}
47 (method `{}
48`)",
49 15usize,
50 __vt.len(),
51 <RuntimeMethodInfo as ::unity::ClassIdentity>::NAME,
52 "get_Module",
53 )
54 });
55 let __inner: extern "C" fn(RuntimeMethodInfo, ::unity::OptionalMethod) -> crate::system::reflection::module::Module =
56 ::core::mem::transmute(__vi.method_ptr);
57 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
58 __inner(__receiver, __mi)
59 }
60 }
61 }
62 #[doc = "`get_ReflectedTypeInternal()` overload"]
63 fn get_reflected_type_internal(self) -> crate::system::runtimetype::RuntimeType {
64 unsafe {
65 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
66 ::unity::il2cpp_call!((::unity::module_base()+0x2fd5bd0usize)as*mut u8,crate::system::runtimetype::RuntimeType;
67(RuntimeMethodInfo)__receiver)
68 }
69 }
70 #[doc = "`FormatNameAndSig(bool)` overload"]
71 fn format_name_and_sig(self, serialization: impl ::core::convert::Into<bool>) -> ::unity::Il2CppString {
72 unsafe {
73 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 {
75 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
76 let __vi = *__vt.get(40usize).unwrap_or_else(|| {
77 panic!(
78 "unity: virtual slot {}
79 out of range (vtable len {}
80) on the runtime class behind {}
81 (method `{}
82`)",
83 40usize,
84 __vt.len(),
85 <RuntimeMethodInfo as ::unity::ClassIdentity>::NAME,
86 "FormatNameAndSig",
87 )
88 });
89 let __inner: extern "C" fn(RuntimeMethodInfo, bool, ::unity::OptionalMethod) -> ::unity::Il2CppString =
90 ::core::mem::transmute(__vi.method_ptr);
91 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
92 __inner(__receiver, ::core::convert::Into::into(serialization), __mi)
93 }
94 }
95 }
96 #[doc = "`CreateDelegate(::unity::SystemType)` overload"]
97 fn create_delegate(self, delegate_type: impl ::core::convert::Into<::unity::SystemType>) -> crate::system::delegate::Delegate {
98 unsafe {
99 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100 {
101 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
102 let __vi = *__vt.get(47usize).unwrap_or_else(|| {
103 panic!(
104 "unity: virtual slot {}
105 out of range (vtable len {}
106) on the runtime class behind {}
107 (method `{}
108`)",
109 47usize,
110 __vt.len(),
111 <RuntimeMethodInfo as ::unity::ClassIdentity>::NAME,
112 "CreateDelegate",
113 )
114 });
115 let __inner: extern "C" fn(RuntimeMethodInfo, ::unity::SystemType, ::unity::OptionalMethod) -> crate::system::delegate::Delegate =
116 ::core::mem::transmute(__vi.method_ptr);
117 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
118 __inner(__receiver, ::core::convert::Into::into(delegate_type), __mi)
119 }
120 }
121 }
122 #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object)` overload"]
123 fn create_delegate_2(
124 self,
125 delegate_type: impl ::core::convert::Into<::unity::SystemType>,
126 target: impl ::core::convert::Into<crate::system::object::Object>,
127 ) -> crate::system::delegate::Delegate {
128 unsafe {
129 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
130 {
131 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
132 let __vi = *__vt.get(48usize).unwrap_or_else(|| {
133 panic!(
134 "unity: virtual slot {}
135 out of range (vtable len {}
136) on the runtime class behind {}
137 (method `{}
138`)",
139 48usize,
140 __vt.len(),
141 <RuntimeMethodInfo as ::unity::ClassIdentity>::NAME,
142 "CreateDelegate",
143 )
144 });
145 let __inner: extern "C" fn(
146 RuntimeMethodInfo,
147 ::unity::SystemType,
148 crate::system::object::Object,
149 ::unity::OptionalMethod,
150 ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__vi.method_ptr);
151 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
152 __inner(
153 __receiver,
154 ::core::convert::Into::into(delegate_type),
155 ::core::convert::Into::into(target),
156 __mi,
157 )
158 }
159 }
160 }
161 #[doc = "`ToString()` overload"]
162 fn to_string(self) -> ::unity::Il2CppString {
163 unsafe {
164 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
165 {
166 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
167 let __vi = *__vt.get(3usize).unwrap_or_else(|| {
168 panic!(
169 "unity: virtual slot {}
170 out of range (vtable len {}
171) on the runtime class behind {}
172 (method `{}
173`)",
174 3usize,
175 __vt.len(),
176 <RuntimeMethodInfo as ::unity::ClassIdentity>::NAME,
177 "ToString",
178 )
179 });
180 let __inner: extern "C" fn(RuntimeMethodInfo, ::unity::OptionalMethod) -> ::unity::Il2CppString =
181 ::core::mem::transmute(__vi.method_ptr);
182 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
183 __inner(__receiver, __mi)
184 }
185 }
186 }
187 #[doc = "`GetRuntimeModule()` overload"]
188 fn get_runtime_module(self) -> crate::system::reflection::runtimemodule::RuntimeModule {
189 unsafe {
190 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
191 ::unity::il2cpp_call!((::unity::module_base()+0x2fd5b40usize)as*mut u8,crate::system::reflection::runtimemodule::RuntimeModule;
192(RuntimeMethodInfo)__receiver)
193 }
194 }
195 #[doc = "`SerializationToString()` overload"]
196 fn serialization_to_string(self) -> ::unity::Il2CppString {
197 unsafe {
198 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
199 ::unity::il2cpp_call!((::unity::module_base()+0x2fd60a0usize)as*mut u8, ::unity::Il2CppString;
200(RuntimeMethodInfo)__receiver)
201 }
202 }
203 #[doc = "`.ctor()` overload"]
204 fn ctor(self) -> () {
205 unsafe {
206 let __receiver = <RuntimeMethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
207 ::unity::il2cpp_call!((::unity::module_base()+0x2fd6140usize)as*mut u8,();
208(RuntimeMethodInfo)__receiver)
209 }
210 }
211}
212
213#[cfg(feature = "system-reflection-runtimemethodinfo")]
214impl<__T: IRuntimeMethodInfo> IRuntimeMethodInfoMethods for __T {}
215
216#[cfg(feature = "system-reflection-runtimemethodinfo")]
217impl RuntimeMethodInfo {
218 pub fn get_binding_flags_method_info() -> &'static ::unity::il2cpp::MethodInfo {
219 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
220 }
221
222 pub fn get_module_method_info() -> &'static ::unity::il2cpp::MethodInfo {
223 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
224 }
225
226 pub fn get_reflected_type_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
227 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
228 }
229
230 pub fn format_name_and_sig_method_info() -> &'static ::unity::il2cpp::MethodInfo {
231 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
232 }
233
234 pub fn create_delegate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
235 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
236 }
237
238 pub fn create_delegate_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
239 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
240 }
241
242 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
243 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
244 }
245
246 pub fn get_runtime_module_method_info() -> &'static ::unity::il2cpp::MethodInfo {
247 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
248 }
249
250 pub fn serialization_to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
251 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
252 }
253
254 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
255 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
256 }
257}
258
259#[cfg(feature = "system-reflection-runtimemethodinfo")]
260impl RuntimeMethodInfo {
261 #[doc = "Direct (non-virtual) call to `RuntimeMethodInfo`'s own `get_Module`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
262 pub unsafe fn get_module(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::module::Module {
263 let __mi = Self::get_module_method_info();
264 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::module::Module =
265 ::core::mem::transmute(__mi.method_ptr);
266 __inner(this.into(), ::core::option::Option::None)
267 }
268
269 #[doc = "Direct (non-virtual) call to `RuntimeMethodInfo`'s own `FormatNameAndSig`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
270 pub unsafe fn format_name_and_sig(this: impl ::core::convert::Into<::unity::IlInstance>, serialization: bool) -> ::unity::Il2CppString {
271 let __mi = Self::format_name_and_sig_method_info();
272 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> ::unity::Il2CppString =
273 ::core::mem::transmute(__mi.method_ptr);
274 __inner(this.into(), serialization, ::core::option::Option::None)
275 }
276
277 #[doc = "Direct (non-virtual) call to `RuntimeMethodInfo`'s own `CreateDelegate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
278 pub unsafe fn create_delegate(
279 this: impl ::core::convert::Into<::unity::IlInstance>,
280 delegate_type: ::unity::SystemType,
281 ) -> crate::system::delegate::Delegate {
282 let __mi = Self::create_delegate_method_info();
283 let __inner: extern "C" fn(::unity::IlInstance, ::unity::SystemType, ::unity::OptionalMethod) -> crate::system::delegate::Delegate =
284 ::core::mem::transmute(__mi.method_ptr);
285 __inner(this.into(), delegate_type, ::core::option::Option::None)
286 }
287
288 #[doc = "Direct (non-virtual) call to `RuntimeMethodInfo`'s own `CreateDelegate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
289 pub unsafe fn create_delegate_2(
290 this: impl ::core::convert::Into<::unity::IlInstance>,
291 delegate_type: ::unity::SystemType,
292 target: crate::system::object::Object,
293 ) -> crate::system::delegate::Delegate {
294 let __mi = Self::create_delegate_2_method_info();
295 let __inner: extern "C" fn(
296 ::unity::IlInstance,
297 ::unity::SystemType,
298 crate::system::object::Object,
299 ::unity::OptionalMethod,
300 ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__mi.method_ptr);
301 __inner(this.into(), delegate_type, target, ::core::option::Option::None)
302 }
303
304 #[doc = "Direct (non-virtual) call to `RuntimeMethodInfo`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
305 pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
306 let __mi = Self::to_string_method_info();
307 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
308 __inner(this.into(), ::core::option::Option::None)
309 }
310}
311
312#[cfg(feature = "system-reflection-runtimemethodinfo")]
313impl RuntimeMethodInfo {
314 #[doc = "`.ctor()` — no args"]
315 pub fn new() -> Self {
316 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
317 panic!(
318 "{}
319::{}
320 failed to instantiate",
321 ::core::stringify!(RuntimeMethodInfo),
322 ::core::stringify!(new),
323 )
324 });
325 <Self as IRuntimeMethodInfoMethods>::ctor(this);
326 this
327 }
328}
329
330#[cfg(feature = "system-reflection-runtimemethodinfo")]
331#[doc(hidden)]
332pub mod prelude {
333 pub use super::{IRuntimeMethodInfo, IRuntimeMethodInfoMethods, RuntimeMethodInfo};
334 #[cfg(feature = "system-object")]
335 pub use crate::system::object::IObjectMethods;
336 #[cfg(feature = "system-reflection-memberinfo")]
337 pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
338 #[cfg(feature = "system-reflection-methodbase")]
339 pub use crate::system::reflection::methodbase::IMethodBaseMethods;
340 #[cfg(feature = "system-reflection-methodinfo")]
341 pub use crate::system::reflection::methodinfo::IMethodInfoMethods;
342 pub use crate::system::{
343 object::IObject,
344 reflection::{memberinfo::IMemberInfo, methodbase::IMethodBase, methodinfo::IMethodInfo},
345 };
346}