Skip to main content

engage/generated/system/reflection/
typeinfo.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-typeinfo-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        reflection::memberinfo::{IMemberInfo, MemberInfo},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/typeinfo/TypeInfo.md"))]
14    #[::unity::class(namespace = "System.Reflection", name = "TypeInfo")]
15    pub struct TypeInfo {}
16}
17
18#[cfg(feature = "system-reflection-typeinfo-types")]
19pub use __types::*;
20
21#[cfg(feature = "system-reflection-typeinfo")]
22pub trait ITypeInfoMethods: ITypeInfo {
23    #[doc = "`.ctor()` overload"]
24    fn ctor(self) -> () {
25        unsafe {
26            let __receiver = <TypeInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
27            ::unity::il2cpp_call!((::unity::module_base()+0x3563ac0usize)as*mut u8,();
28(TypeInfo)__receiver)
29        }
30    }
31    #[doc = "`System.Reflection.IReflectableType.GetTypeInfo()` overload"]
32    fn system_reflection_i_reflectable_type_get_type_info(self) -> crate::system::reflection::typeinfo::TypeInfo {
33        unsafe {
34            let __receiver = <TypeInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35            {
36                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
37                let __vi = *__vt.get(125usize).unwrap_or_else(|| {
38                    panic!(
39                        "unity: virtual slot {}
40 out of range (vtable len {}
41) on the runtime class behind {}
42 (method `{}
43`)",
44                        125usize,
45                        __vt.len(),
46                        <TypeInfo as ::unity::ClassIdentity>::NAME,
47                        "System.Reflection.IReflectableType.GetTypeInfo",
48                    )
49                });
50                let __inner: extern "C" fn(TypeInfo, ::unity::OptionalMethod) -> crate::system::reflection::typeinfo::TypeInfo =
51                    ::core::mem::transmute(__vi.method_ptr);
52                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
53                __inner(__receiver, __mi)
54            }
55        }
56    }
57    #[doc = "`get_ImplementedInterfaces()` overload"]
58    fn get_implemented_interfaces(self) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<::unity::SystemType> {
59        unsafe {
60            let __receiver = <TypeInfo 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(126usize).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                        126usize,
71                        __vt.len(),
72                        <TypeInfo as ::unity::ClassIdentity>::NAME,
73                        "get_ImplementedInterfaces",
74                    )
75                });
76                let __inner: extern "C" fn(
77                    TypeInfo,
78                    ::unity::OptionalMethod,
79                )
80                    -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<::unity::SystemType> =
81                    ::core::mem::transmute(__vi.method_ptr);
82                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
83                __inner(__receiver, __mi)
84            }
85        }
86    }
87}
88
89#[cfg(feature = "system-reflection-typeinfo")]
90impl<__T: ITypeInfo> ITypeInfoMethods for __T {}
91
92#[cfg(feature = "system-reflection-typeinfo")]
93impl TypeInfo {
94    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
96    }
97
98    pub fn system_reflection_i_reflectable_type_get_type_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
99        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
100    }
101
102    pub fn get_implemented_interfaces_method_info() -> &'static ::unity::il2cpp::MethodInfo {
103        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
104    }
105}
106
107#[cfg(feature = "system-reflection-typeinfo")]
108impl TypeInfo {
109    #[doc = "Direct (non-virtual) call to `TypeInfo`'s own `System.Reflection.IReflectableType.GetTypeInfo`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
110    pub unsafe fn system_reflection_i_reflectable_type_get_type_info(
111        this: impl ::core::convert::Into<::unity::IlInstance>,
112    ) -> crate::system::reflection::typeinfo::TypeInfo {
113        let __mi = Self::system_reflection_i_reflectable_type_get_type_info_method_info();
114        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::typeinfo::TypeInfo =
115            ::core::mem::transmute(__mi.method_ptr);
116        __inner(this.into(), ::core::option::Option::None)
117    }
118
119    #[doc = "Direct (non-virtual) call to `TypeInfo`'s own `get_ImplementedInterfaces`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
120    pub unsafe fn get_implemented_interfaces(
121        this: impl ::core::convert::Into<::unity::IlInstance>,
122    ) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<::unity::SystemType> {
123        let __mi = Self::get_implemented_interfaces_method_info();
124        let __inner: extern "C" fn(
125            ::unity::IlInstance,
126            ::unity::OptionalMethod,
127        ) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<::unity::SystemType> = ::core::mem::transmute(__mi.method_ptr);
128        __inner(this.into(), ::core::option::Option::None)
129    }
130}
131
132#[cfg(feature = "system-reflection-typeinfo")]
133impl TypeInfo {
134    #[doc = "`.ctor()` — no args"]
135    pub fn new() -> Self {
136        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
137            panic!(
138                "{}
139::{}
140 failed to instantiate",
141                ::core::stringify!(TypeInfo),
142                ::core::stringify!(new),
143            )
144        });
145        <Self as ITypeInfoMethods>::ctor(this);
146        this
147    }
148}
149
150#[cfg(feature = "system-reflection-typeinfo")]
151#[doc(hidden)]
152pub mod prelude {
153    pub use super::{ITypeInfo, ITypeInfoMethods, TypeInfo};
154    #[cfg(feature = "system-object")]
155    pub use crate::system::object::IObjectMethods;
156    #[cfg(feature = "system-reflection-memberinfo")]
157    pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
158    pub use crate::system::{object::IObject, reflection::memberinfo::IMemberInfo};
159}