Skip to main content

engage/generated/system/reflection/
constructorinfo.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-constructorinfo-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/constructorinfo/ConstructorInfo.md"))]
17    #[::unity::class(namespace = "System.Reflection", name = "ConstructorInfo")]
18    #[parent(crate::system::reflection::methodbase::MethodBase)]
19    pub struct ConstructorInfo {
20        #[static_field]
21        #[rename(name = "ConstructorName")]
22        pub constructor_name: ::unity::Il2CppString,
23        #[static_field]
24        #[rename(name = "TypeConstructorName")]
25        pub type_constructor_name: ::unity::Il2CppString,
26    }
27}
28
29#[cfg(feature = "system-reflection-constructorinfo-types")]
30pub use __types::*;
31
32#[cfg(feature = "system-reflection-constructorinfo")]
33impl ConstructorInfo {
34    #[doc = "`op_Equality(crate::system::reflection::constructorinfo::ConstructorInfo, crate::system::reflection::constructorinfo::ConstructorInfo)` overload"]
35    pub fn op_equality(
36        left: impl ::core::convert::Into<crate::system::reflection::constructorinfo::ConstructorInfo>,
37        right: impl ::core::convert::Into<crate::system::reflection::constructorinfo::ConstructorInfo>,
38    ) -> bool {
39        unsafe {
40            ::unity::il2cpp_call!((::unity::module_base()+0x31d0260usize)as*mut u8,bool;
41(crate::system::reflection::constructorinfo::ConstructorInfo)::core::convert::Into::into(left),(crate::system::reflection::constructorinfo::ConstructorInfo)::core::convert::Into::into(right))
42        }
43    }
44
45    #[doc = "`op_Inequality(crate::system::reflection::constructorinfo::ConstructorInfo, crate::system::reflection::constructorinfo::ConstructorInfo)` overload"]
46    pub fn op_inequality(
47        left: impl ::core::convert::Into<crate::system::reflection::constructorinfo::ConstructorInfo>,
48        right: impl ::core::convert::Into<crate::system::reflection::constructorinfo::ConstructorInfo>,
49    ) -> bool {
50        unsafe {
51            ::unity::il2cpp_call!((::unity::module_base()+0x31e5290usize)as*mut u8,bool;
52(crate::system::reflection::constructorinfo::ConstructorInfo)::core::convert::Into::into(left),(crate::system::reflection::constructorinfo::ConstructorInfo)::core::convert::Into::into(right))
53        }
54    }
55
56    #[doc = "`.cctor()` overload"]
57    pub fn cctor() -> () {
58        unsafe {
59            ::unity::il2cpp_call!((::unity::module_base()+0x31e52f0usize)as*mut u8,();
60            )
61        }
62    }
63}
64
65#[cfg(feature = "system-reflection-constructorinfo")]
66pub trait IConstructorInfoMethods: IConstructorInfo {
67    #[doc = "`.ctor()` overload"]
68    fn ctor(self) -> () {
69        unsafe {
70            let __receiver = <ConstructorInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
71            ::unity::il2cpp_call!((::unity::module_base()+0x31e5250usize)as*mut u8,();
72(ConstructorInfo)__receiver)
73        }
74    }
75    #[doc = "`get_MemberType()` overload"]
76    fn get_member_type(self) -> crate::system::reflection::membertypes::MemberTypes {
77        unsafe {
78            let __receiver = <ConstructorInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79            {
80                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
81                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
82                    panic!(
83                        "unity: virtual slot {}
84 out of range (vtable len {}
85) on the runtime class behind {}
86 (method `{}
87`)",
88                        6usize,
89                        __vt.len(),
90                        <ConstructorInfo as ::unity::ClassIdentity>::NAME,
91                        "get_MemberType",
92                    )
93                });
94                let __inner: extern "C" fn(ConstructorInfo, ::unity::OptionalMethod) -> crate::system::reflection::membertypes::MemberTypes =
95                    ::core::mem::transmute(__vi.method_ptr);
96                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
97                __inner(__receiver, __mi)
98            }
99        }
100    }
101    #[doc = "`Invoke(::unity::Array<crate::system::object::Object>)` overload"]
102    fn invoke(self, parameters: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>) -> crate::system::object::Object {
103        unsafe {
104            let __receiver = <ConstructorInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
105            ::unity::il2cpp_call!((::unity::module_base()+0x31d02a0usize)as*mut u8,crate::system::object::Object;
106(ConstructorInfo)__receiver,(::unity::Array<crate::system::object::Object>)::core::convert::Into::into(parameters))
107        }
108    }
109    #[doc = "`Equals(crate::system::object::Object)` overload"]
110    fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
111        unsafe {
112            let __receiver = <ConstructorInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
113            {
114                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
115                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
116                    panic!(
117                        "unity: virtual slot {}
118 out of range (vtable len {}
119) on the runtime class behind {}
120 (method `{}
121`)",
122                        0usize,
123                        __vt.len(),
124                        <ConstructorInfo as ::unity::ClassIdentity>::NAME,
125                        "Equals",
126                    )
127                });
128                let __inner: extern "C" fn(ConstructorInfo, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
129                    ::core::mem::transmute(__vi.method_ptr);
130                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
131                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
132            }
133        }
134    }
135    #[doc = "`GetHashCode()` overload"]
136    fn get_hash_code(self) -> i32 {
137        unsafe {
138            let __receiver = <ConstructorInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
139            {
140                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
141                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
142                    panic!(
143                        "unity: virtual slot {}
144 out of range (vtable len {}
145) on the runtime class behind {}
146 (method `{}
147`)",
148                        2usize,
149                        __vt.len(),
150                        <ConstructorInfo as ::unity::ClassIdentity>::NAME,
151                        "GetHashCode",
152                    )
153                });
154                let __inner: extern "C" fn(ConstructorInfo, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
155                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
156                __inner(__receiver, __mi)
157            }
158        }
159    }
160}
161
162#[cfg(feature = "system-reflection-constructorinfo")]
163impl<__T: IConstructorInfo> IConstructorInfoMethods for __T {}
164
165#[cfg(feature = "system-reflection-constructorinfo")]
166impl ConstructorInfo {
167    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
169    }
170
171    pub fn get_member_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
172        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
173    }
174
175    pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
176        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
177    }
178
179    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
181    }
182
183    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
184        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
185    }
186
187    pub fn op_equality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
189    }
190
191    pub fn op_inequality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
192        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
193    }
194
195    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
197    }
198}
199
200#[cfg(feature = "system-reflection-constructorinfo")]
201impl ConstructorInfo {
202    #[doc = "Direct (non-virtual) call to `ConstructorInfo`'s own `get_MemberType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
203    pub unsafe fn get_member_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::membertypes::MemberTypes {
204        let __mi = Self::get_member_type_method_info();
205        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::membertypes::MemberTypes =
206            ::core::mem::transmute(__mi.method_ptr);
207        __inner(this.into(), ::core::option::Option::None)
208    }
209
210    #[doc = "Direct (non-virtual) call to `ConstructorInfo`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
211    pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
212        let __mi = Self::equals_method_info();
213        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
214            ::core::mem::transmute(__mi.method_ptr);
215        __inner(this.into(), obj, ::core::option::Option::None)
216    }
217
218    #[doc = "Direct (non-virtual) call to `ConstructorInfo`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
219    pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
220        let __mi = Self::get_hash_code_method_info();
221        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
222        __inner(this.into(), ::core::option::Option::None)
223    }
224}
225
226#[cfg(feature = "system-reflection-constructorinfo")]
227impl ConstructorInfo {
228    #[doc = "`.ctor()` — no args"]
229    pub fn new() -> Self {
230        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
231            panic!(
232                "{}
233::{}
234 failed to instantiate",
235                ::core::stringify!(ConstructorInfo),
236                ::core::stringify!(new),
237            )
238        });
239        <Self as IConstructorInfoMethods>::ctor(this);
240        this
241    }
242}
243
244#[cfg(feature = "system-reflection-constructorinfo")]
245#[doc(hidden)]
246pub mod prelude {
247    pub use super::{ConstructorInfo, IConstructorInfo, IConstructorInfoMethods};
248    #[cfg(feature = "system-object")]
249    pub use crate::system::object::IObjectMethods;
250    #[cfg(feature = "system-reflection-memberinfo")]
251    pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
252    #[cfg(feature = "system-reflection-methodbase")]
253    pub use crate::system::reflection::methodbase::IMethodBaseMethods;
254    pub use crate::system::{
255        object::IObject,
256        reflection::{memberinfo::IMemberInfo, methodbase::IMethodBase},
257    };
258}