engage/generated/system/reflection/
binder.rs1#[cfg(feature = "system-reflection-binder-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/binder/Binder.md"))]
11 #[::unity::class(namespace = "System.Reflection", name = "Binder")]
12 #[parent(crate::system::object::Object)]
13 pub struct Binder {}
14}
15
16#[cfg(feature = "system-reflection-binder-types")]
17pub use __types::*;
18
19#[cfg(feature = "system-reflection-binder")]
20pub trait IBinderMethods: IBinder {
21 #[doc = "`SelectMethod(crate::system::reflection::bindingflags::BindingFlags, ::unity::Array<crate::system::reflection::methodbase::MethodBase>, ::unity::Array<::unity::SystemType>, ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>)` overload"]
22 fn select_method(
23 self,
24 binding_attr: impl ::core::convert::Into<crate::system::reflection::bindingflags::BindingFlags>,
25 r#match: impl ::core::convert::Into<::unity::Array<crate::system::reflection::methodbase::MethodBase>>,
26 types: impl ::core::convert::Into<::unity::Array<::unity::SystemType>>,
27 modifiers: impl ::core::convert::Into<::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>>,
28 ) -> crate::system::reflection::methodbase::MethodBase {
29 unsafe {
30 let __receiver = <Binder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31 {
32 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
33 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
34 panic!(
35 "unity: virtual slot {}
36 out of range (vtable len {}
37) on the runtime class behind {}
38 (method `{}
39`)",
40 6usize,
41 __vt.len(),
42 <Binder as ::unity::ClassIdentity>::NAME,
43 "SelectMethod",
44 )
45 });
46 let __inner: extern "C" fn(
47 Binder,
48 crate::system::reflection::bindingflags::BindingFlags,
49 ::unity::Array<crate::system::reflection::methodbase::MethodBase>,
50 ::unity::Array<::unity::SystemType>,
51 ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>,
52 ::unity::OptionalMethod,
53 ) -> crate::system::reflection::methodbase::MethodBase = ::core::mem::transmute(__vi.method_ptr);
54 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
55 __inner(
56 __receiver,
57 ::core::convert::Into::into(binding_attr),
58 ::core::convert::Into::into(r#match),
59 ::core::convert::Into::into(types),
60 ::core::convert::Into::into(modifiers),
61 __mi,
62 )
63 }
64 }
65 }
66 #[doc = "`SelectProperty(crate::system::reflection::bindingflags::BindingFlags, ::unity::Array<crate::system::reflection::propertyinfo::PropertyInfo>, ::unity::SystemType, ::unity::Array<::unity::SystemType>, ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>)` overload"]
67 fn select_property(
68 self,
69 binding_attr: impl ::core::convert::Into<crate::system::reflection::bindingflags::BindingFlags>,
70 r#match: impl ::core::convert::Into<::unity::Array<crate::system::reflection::propertyinfo::PropertyInfo>>,
71 return_type: impl ::core::convert::Into<::unity::SystemType>,
72 indexes: impl ::core::convert::Into<::unity::Array<::unity::SystemType>>,
73 modifiers: impl ::core::convert::Into<::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>>,
74 ) -> crate::system::reflection::propertyinfo::PropertyInfo {
75 unsafe {
76 let __receiver = <Binder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
77 {
78 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
79 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
80 panic!(
81 "unity: virtual slot {}
82 out of range (vtable len {}
83) on the runtime class behind {}
84 (method `{}
85`)",
86 7usize,
87 __vt.len(),
88 <Binder as ::unity::ClassIdentity>::NAME,
89 "SelectProperty",
90 )
91 });
92 let __inner: extern "C" fn(
93 Binder,
94 crate::system::reflection::bindingflags::BindingFlags,
95 ::unity::Array<crate::system::reflection::propertyinfo::PropertyInfo>,
96 ::unity::SystemType,
97 ::unity::Array<::unity::SystemType>,
98 ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>,
99 ::unity::OptionalMethod,
100 ) -> crate::system::reflection::propertyinfo::PropertyInfo = ::core::mem::transmute(__vi.method_ptr);
101 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
102 __inner(
103 __receiver,
104 ::core::convert::Into::into(binding_attr),
105 ::core::convert::Into::into(r#match),
106 ::core::convert::Into::into(return_type),
107 ::core::convert::Into::into(indexes),
108 ::core::convert::Into::into(modifiers),
109 __mi,
110 )
111 }
112 }
113 }
114 #[doc = "`ReorderArgumentArray(*mut::unity::Array<crate::system::object::Object>, crate::system::object::Object)` overload"]
115 fn reorder_argument_array(
116 self,
117 state: impl ::core::convert::Into<crate::system::object::Object>,
118 ) -> ::unity::Array<crate::system::object::Object> {
119 unsafe {
120 let __receiver = <Binder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
121 let mut __out_0 = ::core::mem::MaybeUninit::<::unity::Array<crate::system::object::Object>>::uninit();
122 {
123 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
125 panic!(
126 "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131 9usize,
132 __vt.len(),
133 <Binder as ::unity::ClassIdentity>::NAME,
134 "ReorderArgumentArray",
135 )
136 });
137 let __inner: extern "C" fn(
138 Binder,
139 *mut ::unity::Array<crate::system::object::Object>,
140 crate::system::object::Object,
141 ::unity::OptionalMethod,
142 ) -> () = ::core::mem::transmute(__vi.method_ptr);
143 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
144 __inner(__receiver, __out_0.as_mut_ptr(), ::core::convert::Into::into(state), __mi)
145 };
146 __out_0.assume_init()
147 }
148 }
149 #[doc = "`.ctor()` overload"]
150 fn ctor(self) -> () {
151 unsafe {
152 let __receiver = <Binder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
153 ::unity::il2cpp_call!((::unity::module_base()+0x3390c10usize)as*mut u8,();
154(Binder)__receiver)
155 }
156 }
157}
158
159#[cfg(feature = "system-reflection-binder")]
160impl<__T: IBinder> IBinderMethods for __T {}
161
162#[cfg(feature = "system-reflection-binder")]
163impl Binder {
164 pub fn select_method_method_info() -> &'static ::unity::il2cpp::MethodInfo {
165 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
166 }
167
168 pub fn select_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
169 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
170 }
171
172 pub fn reorder_argument_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
173 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
174 }
175
176 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
177 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
178 }
179}
180
181#[cfg(feature = "system-reflection-binder")]
182impl Binder {
183 #[doc = "Direct (non-virtual) call to `Binder`'s own `SelectMethod`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
184 pub unsafe fn select_method(
185 this: impl ::core::convert::Into<::unity::IlInstance>,
186 binding_attr: crate::system::reflection::bindingflags::BindingFlags,
187 r#match: ::unity::Array<crate::system::reflection::methodbase::MethodBase>,
188 types: ::unity::Array<::unity::SystemType>,
189 modifiers: ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>,
190 ) -> crate::system::reflection::methodbase::MethodBase {
191 let __mi = Self::select_method_method_info();
192 let __inner: extern "C" fn(
193 ::unity::IlInstance,
194 crate::system::reflection::bindingflags::BindingFlags,
195 ::unity::Array<crate::system::reflection::methodbase::MethodBase>,
196 ::unity::Array<::unity::SystemType>,
197 ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>,
198 ::unity::OptionalMethod,
199 ) -> crate::system::reflection::methodbase::MethodBase = ::core::mem::transmute(__mi.method_ptr);
200 __inner(this.into(), binding_attr, r#match, types, modifiers, ::core::option::Option::None)
201 }
202
203 #[doc = "Direct (non-virtual) call to `Binder`'s own `SelectProperty`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
204 pub unsafe fn select_property(
205 this: impl ::core::convert::Into<::unity::IlInstance>,
206 binding_attr: crate::system::reflection::bindingflags::BindingFlags,
207 r#match: ::unity::Array<crate::system::reflection::propertyinfo::PropertyInfo>,
208 return_type: ::unity::SystemType,
209 indexes: ::unity::Array<::unity::SystemType>,
210 modifiers: ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>,
211 ) -> crate::system::reflection::propertyinfo::PropertyInfo {
212 let __mi = Self::select_property_method_info();
213 let __inner: extern "C" fn(
214 ::unity::IlInstance,
215 crate::system::reflection::bindingflags::BindingFlags,
216 ::unity::Array<crate::system::reflection::propertyinfo::PropertyInfo>,
217 ::unity::SystemType,
218 ::unity::Array<::unity::SystemType>,
219 ::unity::Array<crate::system::reflection::parametermodifier::ParameterModifier>,
220 ::unity::OptionalMethod,
221 ) -> crate::system::reflection::propertyinfo::PropertyInfo = ::core::mem::transmute(__mi.method_ptr);
222 __inner(
223 this.into(),
224 binding_attr,
225 r#match,
226 return_type,
227 indexes,
228 modifiers,
229 ::core::option::Option::None,
230 )
231 }
232
233 #[doc = "Direct (non-virtual) call to `Binder`'s own `ReorderArgumentArray`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
234 pub unsafe fn reorder_argument_array(
235 this: impl ::core::convert::Into<::unity::IlInstance>,
236 args: *mut ::unity::Array<crate::system::object::Object>,
237 state: crate::system::object::Object,
238 ) -> () {
239 let __mi = Self::reorder_argument_array_method_info();
240 let __inner: extern "C" fn(
241 ::unity::IlInstance,
242 *mut ::unity::Array<crate::system::object::Object>,
243 crate::system::object::Object,
244 ::unity::OptionalMethod,
245 ) -> () = ::core::mem::transmute(__mi.method_ptr);
246 __inner(this.into(), args, state, ::core::option::Option::None)
247 }
248}
249
250#[cfg(feature = "system-reflection-binder")]
251impl Binder {
252 #[doc = "`.ctor()` — no args"]
253 pub fn new() -> Self {
254 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
255 panic!(
256 "{}
257::{}
258 failed to instantiate",
259 ::core::stringify!(Binder),
260 ::core::stringify!(new),
261 )
262 });
263 <Self as IBinderMethods>::ctor(this);
264 this
265 }
266}
267
268#[cfg(feature = "system-reflection-binder")]
269#[doc(hidden)]
270pub mod prelude {
271 pub use super::{Binder, IBinder, IBinderMethods};
272 pub use crate::system::object::IObject;
273 #[cfg(feature = "system-object")]
274 pub use crate::system::object::IObjectMethods;
275}