1#[cfg(feature = "system-reflection-methodinfo-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 },
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/methodinfo/MethodInfo.md"))]
17 #[::unity::class(namespace = "System.Reflection", name = "MethodInfo")]
18 #[parent(crate::system::reflection::methodbase::MethodBase)]
19 pub struct MethodInfo {}
20}
21
22#[cfg(feature = "system-reflection-methodinfo-types")]
23pub use __types::*;
24
25#[cfg(feature = "system-reflection-methodinfo")]
26impl MethodInfo {
27 #[doc = "`op_Equality(crate::system::reflection::methodinfo::MethodInfo, crate::system::reflection::methodinfo::MethodInfo)` overload"]
28 pub fn op_equality(
29 left: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
30 right: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
31 ) -> bool {
32 unsafe {
33 ::unity::il2cpp_call!((::unity::module_base()+0x3370d30usize)as*mut u8,bool;
34(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(left),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(right))
35 }
36 }
37
38 #[doc = "`op_Inequality(crate::system::reflection::methodinfo::MethodInfo, crate::system::reflection::methodinfo::MethodInfo)` overload"]
39 pub fn op_inequality(
40 left: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
41 right: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
42 ) -> bool {
43 unsafe {
44 ::unity::il2cpp_call!((::unity::module_base()+0x3374d60usize)as*mut u8,bool;
45(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(left),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(right))
46 }
47 }
48}
49
50#[cfg(feature = "system-reflection-methodinfo")]
51pub trait IMethodInfoMethods: IMethodInfo {
52 #[doc = "`.ctor()` overload"]
53 fn ctor(self) -> () {
54 unsafe {
55 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56 ::unity::il2cpp_call!((::unity::module_base()+0x3377910usize)as*mut u8,();
57(MethodInfo)__receiver)
58 }
59 }
60 #[doc = "`Equals(crate::system::object::Object)` overload"]
61 fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
62 unsafe {
63 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
64 {
65 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
66 let __vi = *__vt.get(0usize).unwrap_or_else(|| {
67 panic!(
68 "unity: virtual slot {}
69 out of range (vtable len {}
70) on the runtime class behind {}
71 (method `{}
72`)",
73 0usize,
74 __vt.len(),
75 <MethodInfo as ::unity::ClassIdentity>::NAME,
76 "Equals",
77 )
78 });
79 let __inner: extern "C" fn(MethodInfo, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
80 ::core::mem::transmute(__vi.method_ptr);
81 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
82 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
83 }
84 }
85 }
86 #[doc = "`GetHashCode()` overload"]
87 fn get_hash_code(self) -> i32 {
88 unsafe {
89 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90 {
91 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
92 let __vi = *__vt.get(2usize).unwrap_or_else(|| {
93 panic!(
94 "unity: virtual slot {}
95 out of range (vtable len {}
96) on the runtime class behind {}
97 (method `{}
98`)",
99 2usize,
100 __vt.len(),
101 <MethodInfo as ::unity::ClassIdentity>::NAME,
102 "GetHashCode",
103 )
104 });
105 let __inner: extern "C" fn(MethodInfo, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
106 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
107 __inner(__receiver, __mi)
108 }
109 }
110 }
111 #[doc = "`get_MemberType()` overload"]
112 fn get_member_type(self) -> crate::system::reflection::membertypes::MemberTypes {
113 unsafe {
114 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
115 {
116 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
117 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
118 panic!(
119 "unity: virtual slot {}
120 out of range (vtable len {}
121) on the runtime class behind {}
122 (method `{}
123`)",
124 6usize,
125 __vt.len(),
126 <MethodInfo as ::unity::ClassIdentity>::NAME,
127 "get_MemberType",
128 )
129 });
130 let __inner: extern "C" fn(MethodInfo, ::unity::OptionalMethod) -> crate::system::reflection::membertypes::MemberTypes =
131 ::core::mem::transmute(__vi.method_ptr);
132 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
133 __inner(__receiver, __mi)
134 }
135 }
136 }
137 #[doc = "`get_ReturnType()` overload"]
138 fn get_return_type(self) -> ::unity::SystemType {
139 unsafe {
140 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
141 {
142 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
143 let __vi = *__vt.get(44usize).unwrap_or_else(|| {
144 panic!(
145 "unity: virtual slot {}
146 out of range (vtable len {}
147) on the runtime class behind {}
148 (method `{}
149`)",
150 44usize,
151 __vt.len(),
152 <MethodInfo as ::unity::ClassIdentity>::NAME,
153 "get_ReturnType",
154 )
155 });
156 let __inner: extern "C" fn(MethodInfo, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
157 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
158 __inner(__receiver, __mi)
159 }
160 }
161 }
162 #[doc = "`GetGenericArguments()` overload"]
163 fn get_generic_arguments(self) -> ::unity::Array<::unity::SystemType> {
164 unsafe {
165 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
166 {
167 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
168 let __vi = *__vt.get(23usize).unwrap_or_else(|| {
169 panic!(
170 "unity: virtual slot {}
171 out of range (vtable len {}
172) on the runtime class behind {}
173 (method `{}
174`)",
175 23usize,
176 __vt.len(),
177 <MethodInfo as ::unity::ClassIdentity>::NAME,
178 "GetGenericArguments",
179 )
180 });
181 let __inner: extern "C" fn(MethodInfo, ::unity::OptionalMethod) -> ::unity::Array<::unity::SystemType> =
182 ::core::mem::transmute(__vi.method_ptr);
183 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
184 __inner(__receiver, __mi)
185 }
186 }
187 }
188 #[doc = "`GetGenericMethodDefinition()` overload"]
189 fn get_generic_method_definition(self) -> crate::system::reflection::methodinfo::MethodInfo {
190 unsafe {
191 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
192 {
193 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
194 let __vi = *__vt.get(45usize).unwrap_or_else(|| {
195 panic!(
196 "unity: virtual slot {}
197 out of range (vtable len {}
198) on the runtime class behind {}
199 (method `{}
200`)",
201 45usize,
202 __vt.len(),
203 <MethodInfo as ::unity::ClassIdentity>::NAME,
204 "GetGenericMethodDefinition",
205 )
206 });
207 let __inner: extern "C" fn(MethodInfo, ::unity::OptionalMethod) -> crate::system::reflection::methodinfo::MethodInfo =
208 ::core::mem::transmute(__vi.method_ptr);
209 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
210 __inner(__receiver, __mi)
211 }
212 }
213 }
214 #[doc = "`MakeGenericMethod(::unity::Array<::unity::SystemType>)` overload"]
215 fn make_generic_method(
216 self,
217 type_arguments: impl ::core::convert::Into<::unity::Array<::unity::SystemType>>,
218 ) -> crate::system::reflection::methodinfo::MethodInfo {
219 unsafe {
220 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
221 {
222 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
223 let __vi = *__vt.get(46usize).unwrap_or_else(|| {
224 panic!(
225 "unity: virtual slot {}
226 out of range (vtable len {}
227) on the runtime class behind {}
228 (method `{}
229`)",
230 46usize,
231 __vt.len(),
232 <MethodInfo as ::unity::ClassIdentity>::NAME,
233 "MakeGenericMethod",
234 )
235 });
236 let __inner: extern "C" fn(
237 MethodInfo,
238 ::unity::Array<::unity::SystemType>,
239 ::unity::OptionalMethod,
240 ) -> crate::system::reflection::methodinfo::MethodInfo = ::core::mem::transmute(__vi.method_ptr);
241 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
242 __inner(__receiver, ::core::convert::Into::into(type_arguments), __mi)
243 }
244 }
245 }
246 #[doc = "`CreateDelegate(::unity::SystemType)` overload"]
247 fn create_delegate(self, delegate_type: impl ::core::convert::Into<::unity::SystemType>) -> crate::system::delegate::Delegate {
248 unsafe {
249 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
250 {
251 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
252 let __vi = *__vt.get(47usize).unwrap_or_else(|| {
253 panic!(
254 "unity: virtual slot {}
255 out of range (vtable len {}
256) on the runtime class behind {}
257 (method `{}
258`)",
259 47usize,
260 __vt.len(),
261 <MethodInfo as ::unity::ClassIdentity>::NAME,
262 "CreateDelegate",
263 )
264 });
265 let __inner: extern "C" fn(MethodInfo, ::unity::SystemType, ::unity::OptionalMethod) -> crate::system::delegate::Delegate =
266 ::core::mem::transmute(__vi.method_ptr);
267 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
268 __inner(__receiver, ::core::convert::Into::into(delegate_type), __mi)
269 }
270 }
271 }
272 #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object)` overload"]
273 fn create_delegate_2(
274 self,
275 delegate_type: impl ::core::convert::Into<::unity::SystemType>,
276 target: impl ::core::convert::Into<crate::system::object::Object>,
277 ) -> crate::system::delegate::Delegate {
278 unsafe {
279 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
280 {
281 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
282 let __vi = *__vt.get(48usize).unwrap_or_else(|| {
283 panic!(
284 "unity: virtual slot {}
285 out of range (vtable len {}
286) on the runtime class behind {}
287 (method `{}
288`)",
289 48usize,
290 __vt.len(),
291 <MethodInfo as ::unity::ClassIdentity>::NAME,
292 "CreateDelegate",
293 )
294 });
295 let __inner: extern "C" fn(
296 MethodInfo,
297 ::unity::SystemType,
298 crate::system::object::Object,
299 ::unity::OptionalMethod,
300 ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__vi.method_ptr);
301 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
302 __inner(
303 __receiver,
304 ::core::convert::Into::into(delegate_type),
305 ::core::convert::Into::into(target),
306 __mi,
307 )
308 }
309 }
310 }
311 #[doc = "`GetBaseMethod()` overload"]
312 fn get_base_method(self) -> crate::system::reflection::methodinfo::MethodInfo {
313 unsafe {
314 let __receiver = <MethodInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
315 {
316 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
317 let __vi = *__vt.get(49usize).unwrap_or_else(|| {
318 panic!(
319 "unity: virtual slot {}
320 out of range (vtable len {}
321) on the runtime class behind {}
322 (method `{}
323`)",
324 49usize,
325 __vt.len(),
326 <MethodInfo as ::unity::ClassIdentity>::NAME,
327 "GetBaseMethod",
328 )
329 });
330 let __inner: extern "C" fn(MethodInfo, ::unity::OptionalMethod) -> crate::system::reflection::methodinfo::MethodInfo =
331 ::core::mem::transmute(__vi.method_ptr);
332 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
333 __inner(__receiver, __mi)
334 }
335 }
336 }
337}
338
339#[cfg(feature = "system-reflection-methodinfo")]
340impl<__T: IMethodInfo> IMethodInfoMethods for __T {}
341
342#[cfg(feature = "system-reflection-methodinfo")]
343impl MethodInfo {
344 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
345 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
346 }
347
348 pub fn op_equality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
349 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
350 }
351
352 pub fn op_inequality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
353 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
354 }
355
356 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
357 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
358 }
359
360 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
361 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
362 }
363
364 pub fn get_member_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
365 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
366 }
367
368 pub fn get_return_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
369 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
370 }
371
372 pub fn get_generic_arguments_method_info() -> &'static ::unity::il2cpp::MethodInfo {
373 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
374 }
375
376 pub fn get_generic_method_definition_method_info() -> &'static ::unity::il2cpp::MethodInfo {
377 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
378 }
379
380 pub fn make_generic_method_method_info() -> &'static ::unity::il2cpp::MethodInfo {
381 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
382 }
383
384 pub fn create_delegate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
385 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
386 }
387
388 pub fn create_delegate_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
389 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
390 }
391
392 pub fn get_base_method_method_info() -> &'static ::unity::il2cpp::MethodInfo {
393 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
394 }
395}
396
397#[cfg(feature = "system-reflection-methodinfo")]
398impl MethodInfo {
399 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
400 pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
401 let __mi = Self::equals_method_info();
402 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
403 ::core::mem::transmute(__mi.method_ptr);
404 __inner(this.into(), obj, ::core::option::Option::None)
405 }
406
407 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
408 pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
409 let __mi = Self::get_hash_code_method_info();
410 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
411 __inner(this.into(), ::core::option::Option::None)
412 }
413
414 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `get_MemberType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
415 pub unsafe fn get_member_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::membertypes::MemberTypes {
416 let __mi = Self::get_member_type_method_info();
417 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::membertypes::MemberTypes =
418 ::core::mem::transmute(__mi.method_ptr);
419 __inner(this.into(), ::core::option::Option::None)
420 }
421
422 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `get_ReturnType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
423 pub unsafe fn get_return_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
424 let __mi = Self::get_return_type_method_info();
425 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
426 __inner(this.into(), ::core::option::Option::None)
427 }
428
429 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `GetGenericArguments`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
430 pub unsafe fn get_generic_arguments(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Array<::unity::SystemType> {
431 let __mi = Self::get_generic_arguments_method_info();
432 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Array<::unity::SystemType> =
433 ::core::mem::transmute(__mi.method_ptr);
434 __inner(this.into(), ::core::option::Option::None)
435 }
436
437 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `GetGenericMethodDefinition`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
438 pub unsafe fn get_generic_method_definition(
439 this: impl ::core::convert::Into<::unity::IlInstance>,
440 ) -> crate::system::reflection::methodinfo::MethodInfo {
441 let __mi = Self::get_generic_method_definition_method_info();
442 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::methodinfo::MethodInfo =
443 ::core::mem::transmute(__mi.method_ptr);
444 __inner(this.into(), ::core::option::Option::None)
445 }
446
447 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `MakeGenericMethod`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
448 pub unsafe fn make_generic_method(
449 this: impl ::core::convert::Into<::unity::IlInstance>,
450 type_arguments: ::unity::Array<::unity::SystemType>,
451 ) -> crate::system::reflection::methodinfo::MethodInfo {
452 let __mi = Self::make_generic_method_method_info();
453 let __inner: extern "C" fn(
454 ::unity::IlInstance,
455 ::unity::Array<::unity::SystemType>,
456 ::unity::OptionalMethod,
457 ) -> crate::system::reflection::methodinfo::MethodInfo = ::core::mem::transmute(__mi.method_ptr);
458 __inner(this.into(), type_arguments, ::core::option::Option::None)
459 }
460
461 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `CreateDelegate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
462 pub unsafe fn create_delegate(
463 this: impl ::core::convert::Into<::unity::IlInstance>,
464 delegate_type: ::unity::SystemType,
465 ) -> crate::system::delegate::Delegate {
466 let __mi = Self::create_delegate_method_info();
467 let __inner: extern "C" fn(::unity::IlInstance, ::unity::SystemType, ::unity::OptionalMethod) -> crate::system::delegate::Delegate =
468 ::core::mem::transmute(__mi.method_ptr);
469 __inner(this.into(), delegate_type, ::core::option::Option::None)
470 }
471
472 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `CreateDelegate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
473 pub unsafe fn create_delegate_2(
474 this: impl ::core::convert::Into<::unity::IlInstance>,
475 delegate_type: ::unity::SystemType,
476 target: crate::system::object::Object,
477 ) -> crate::system::delegate::Delegate {
478 let __mi = Self::create_delegate_2_method_info();
479 let __inner: extern "C" fn(
480 ::unity::IlInstance,
481 ::unity::SystemType,
482 crate::system::object::Object,
483 ::unity::OptionalMethod,
484 ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__mi.method_ptr);
485 __inner(this.into(), delegate_type, target, ::core::option::Option::None)
486 }
487
488 #[doc = "Direct (non-virtual) call to `MethodInfo`'s own `GetBaseMethod`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
489 pub unsafe fn get_base_method(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::methodinfo::MethodInfo {
490 let __mi = Self::get_base_method_method_info();
491 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::methodinfo::MethodInfo =
492 ::core::mem::transmute(__mi.method_ptr);
493 __inner(this.into(), ::core::option::Option::None)
494 }
495}
496
497#[cfg(feature = "system-reflection-methodinfo")]
498impl MethodInfo {
499 #[doc = "`.ctor()` — no args"]
500 pub fn new() -> Self {
501 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
502 panic!(
503 "{}
504::{}
505 failed to instantiate",
506 ::core::stringify!(MethodInfo),
507 ::core::stringify!(new),
508 )
509 });
510 <Self as IMethodInfoMethods>::ctor(this);
511 this
512 }
513}
514
515#[cfg(feature = "system-reflection-methodinfo")]
516#[doc(hidden)]
517pub mod prelude {
518 pub use super::{IMethodInfo, IMethodInfoMethods, MethodInfo};
519 #[cfg(feature = "system-object")]
520 pub use crate::system::object::IObjectMethods;
521 #[cfg(feature = "system-reflection-memberinfo")]
522 pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
523 #[cfg(feature = "system-reflection-methodbase")]
524 pub use crate::system::reflection::methodbase::IMethodBaseMethods;
525 pub use crate::system::{
526 object::IObject,
527 reflection::{memberinfo::IMemberInfo, methodbase::IMethodBase},
528 };
529}