engage/generated/system/reflection/emit/
constructorbuilder.rs1#[cfg(feature = "system-reflection-emit-constructorbuilder-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 constructorinfo::{ConstructorInfo, IConstructorInfo},
12 memberinfo::{IMemberInfo, MemberInfo},
13 methodbase::{IMethodBase, MethodBase},
14 },
15 };
16
17 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/emit/constructorbuilder/ConstructorBuilder.md"))]
18 #[::unity::class(namespace = "System.Reflection.Emit", name = "ConstructorBuilder")]
19 #[parent(crate::system::reflection::constructorinfo::ConstructorInfo)]
20 pub struct ConstructorBuilder {}
21}
22
23#[cfg(feature = "system-reflection-emit-constructorbuilder-types")]
24pub use __types::*;
25
26#[cfg(feature = "system-reflection-emit-constructorbuilder")]
27pub trait IConstructorBuilderMethods: IConstructorBuilder {
28 #[doc = "`get_Attributes()` overload"]
29 fn get_attributes(self) -> crate::system::reflection::methodattributes::MethodAttributes {
30 unsafe {
31 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32 {
33 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
34 let __vi = *__vt.get(20usize).unwrap_or_else(|| {
35 panic!(
36 "unity: virtual slot {}
37 out of range (vtable len {}
38) on the runtime class behind {}
39 (method `{}
40`)",
41 20usize,
42 __vt.len(),
43 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
44 "get_Attributes",
45 )
46 });
47 let __inner: extern "C" fn(
48 ConstructorBuilder,
49 ::unity::OptionalMethod,
50 ) -> crate::system::reflection::methodattributes::MethodAttributes = ::core::mem::transmute(__vi.method_ptr);
51 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
52 __inner(__receiver, __mi)
53 }
54 }
55 }
56 #[doc = "`get_DeclaringType()` overload"]
57 fn get_declaring_type(self) -> ::unity::SystemType {
58 unsafe {
59 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
60 {
61 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
62 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
63 panic!(
64 "unity: virtual slot {}
65 out of range (vtable len {}
66) on the runtime class behind {}
67 (method `{}
68`)",
69 8usize,
70 __vt.len(),
71 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
72 "get_DeclaringType",
73 )
74 });
75 let __inner: extern "C" fn(ConstructorBuilder, ::unity::OptionalMethod) -> ::unity::SystemType =
76 ::core::mem::transmute(__vi.method_ptr);
77 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
78 __inner(__receiver, __mi)
79 }
80 }
81 }
82 #[doc = "`get_Name()` overload"]
83 fn get_name(self) -> ::unity::Il2CppString {
84 unsafe {
85 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86 {
87 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
88 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
89 panic!(
90 "unity: virtual slot {}
91 out of range (vtable len {}
92) on the runtime class behind {}
93 (method `{}
94`)",
95 7usize,
96 __vt.len(),
97 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
98 "get_Name",
99 )
100 });
101 let __inner: extern "C" fn(ConstructorBuilder, ::unity::OptionalMethod) -> ::unity::Il2CppString =
102 ::core::mem::transmute(__vi.method_ptr);
103 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
104 __inner(__receiver, __mi)
105 }
106 }
107 }
108 #[doc = "`GetParameters()` overload"]
109 fn get_parameters(self) -> ::unity::Array<crate::system::reflection::parameterinfo::ParameterInfo> {
110 unsafe {
111 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
112 {
113 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
114 let __vi = *__vt.get(17usize).unwrap_or_else(|| {
115 panic!(
116 "unity: virtual slot {}
117 out of range (vtable len {}
118) on the runtime class behind {}
119 (method `{}
120`)",
121 17usize,
122 __vt.len(),
123 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
124 "GetParameters",
125 )
126 });
127 let __inner: extern "C" fn(
128 ConstructorBuilder,
129 ::unity::OptionalMethod,
130 ) -> ::unity::Array<crate::system::reflection::parameterinfo::ParameterInfo> = ::core::mem::transmute(__vi.method_ptr);
131 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
132 __inner(__receiver, __mi)
133 }
134 }
135 }
136 #[doc = "`get_ReflectedType()` overload"]
137 fn get_reflected_type(self) -> ::unity::SystemType {
138 unsafe {
139 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 {
141 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
142 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
143 panic!(
144 "unity: virtual slot {}
145 out of range (vtable len {}
146) on the runtime class behind {}
147 (method `{}
148`)",
149 9usize,
150 __vt.len(),
151 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
152 "get_ReflectedType",
153 )
154 });
155 let __inner: extern "C" fn(ConstructorBuilder, ::unity::OptionalMethod) -> ::unity::SystemType =
156 ::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 = "`GetCustomAttributes(bool)` overload"]
163 fn get_custom_attributes(self, inherit: impl ::core::convert::Into<bool>) -> ::unity::Array<crate::system::object::Object> {
164 unsafe {
165 let __receiver = <ConstructorBuilder 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(10usize).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 10usize,
176 __vt.len(),
177 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
178 "GetCustomAttributes",
179 )
180 });
181 let __inner: extern "C" fn(ConstructorBuilder, bool, ::unity::OptionalMethod) -> ::unity::Array<crate::system::object::Object> =
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, ::core::convert::Into::into(inherit), __mi)
185 }
186 }
187 }
188 #[doc = "`GetCustomAttributes(::unity::SystemType, bool)` overload"]
189 fn get_custom_attributes_2(
190 self,
191 attribute_type: impl ::core::convert::Into<::unity::SystemType>,
192 inherit: impl ::core::convert::Into<bool>,
193 ) -> ::unity::Array<crate::system::object::Object> {
194 unsafe {
195 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
196 {
197 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
198 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
199 panic!(
200 "unity: virtual slot {}
201 out of range (vtable len {}
202) on the runtime class behind {}
203 (method `{}
204`)",
205 11usize,
206 __vt.len(),
207 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
208 "GetCustomAttributes",
209 )
210 });
211 let __inner: extern "C" fn(
212 ConstructorBuilder,
213 ::unity::SystemType,
214 bool,
215 ::unity::OptionalMethod,
216 ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__vi.method_ptr);
217 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
218 __inner(
219 __receiver,
220 ::core::convert::Into::into(attribute_type),
221 ::core::convert::Into::into(inherit),
222 __mi,
223 )
224 }
225 }
226 }
227 #[doc = "`GetMethodImplementationFlags()` overload"]
228 fn get_method_implementation_flags(self) -> crate::system::reflection::methodimplattributes::MethodImplAttributes {
229 unsafe {
230 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
231 {
232 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
233 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
234 panic!(
235 "unity: virtual slot {}
236 out of range (vtable len {}
237) on the runtime class behind {}
238 (method `{}
239`)",
240 18usize,
241 __vt.len(),
242 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
243 "GetMethodImplementationFlags",
244 )
245 });
246 let __inner: extern "C" fn(
247 ConstructorBuilder,
248 ::unity::OptionalMethod,
249 ) -> crate::system::reflection::methodimplattributes::MethodImplAttributes = ::core::mem::transmute(__vi.method_ptr);
250 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
251 __inner(__receiver, __mi)
252 }
253 }
254 }
255 #[doc = "`IsDefined(::unity::SystemType, bool)` overload"]
256 fn is_defined(self, attribute_type: impl ::core::convert::Into<::unity::SystemType>, inherit: impl ::core::convert::Into<bool>) -> bool {
257 unsafe {
258 let __receiver = <ConstructorBuilder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
259 {
260 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
261 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
262 panic!(
263 "unity: virtual slot {}
264 out of range (vtable len {}
265) on the runtime class behind {}
266 (method `{}
267`)",
268 12usize,
269 __vt.len(),
270 <ConstructorBuilder as ::unity::ClassIdentity>::NAME,
271 "IsDefined",
272 )
273 });
274 let __inner: extern "C" fn(ConstructorBuilder, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
275 ::core::mem::transmute(__vi.method_ptr);
276 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
277 __inner(
278 __receiver,
279 ::core::convert::Into::into(attribute_type),
280 ::core::convert::Into::into(inherit),
281 __mi,
282 )
283 }
284 }
285 }
286}
287
288#[cfg(feature = "system-reflection-emit-constructorbuilder")]
289impl<__T: IConstructorBuilder> IConstructorBuilderMethods for __T {}
290
291#[cfg(feature = "system-reflection-emit-constructorbuilder")]
292impl ConstructorBuilder {
293 pub fn get_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
295 }
296
297 pub fn get_declaring_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
299 }
300
301 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
303 }
304
305 pub fn get_parameters_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
307 }
308
309 pub fn get_reflected_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
311 }
312
313 pub fn get_custom_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
315 }
316
317 pub fn get_custom_attributes_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
319 }
320
321 pub fn get_method_implementation_flags_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
323 }
324
325 pub fn is_defined_method_info() -> &'static ::unity::il2cpp::MethodInfo {
326 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
327 }
328}
329
330#[cfg(feature = "system-reflection-emit-constructorbuilder")]
331impl ConstructorBuilder {
332 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `get_Attributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
333 pub unsafe fn get_attributes(
334 this: impl ::core::convert::Into<::unity::IlInstance>,
335 ) -> crate::system::reflection::methodattributes::MethodAttributes {
336 let __mi = Self::get_attributes_method_info();
337 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::methodattributes::MethodAttributes =
338 ::core::mem::transmute(__mi.method_ptr);
339 __inner(this.into(), ::core::option::Option::None)
340 }
341
342 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `get_DeclaringType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
343 pub unsafe fn get_declaring_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
344 let __mi = Self::get_declaring_type_method_info();
345 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
346 __inner(this.into(), ::core::option::Option::None)
347 }
348
349 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
350 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
351 let __mi = Self::get_name_method_info();
352 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
353 __inner(this.into(), ::core::option::Option::None)
354 }
355
356 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `GetParameters`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
357 pub unsafe fn get_parameters(
358 this: impl ::core::convert::Into<::unity::IlInstance>,
359 ) -> ::unity::Array<crate::system::reflection::parameterinfo::ParameterInfo> {
360 let __mi = Self::get_parameters_method_info();
361 let __inner: extern "C" fn(
362 ::unity::IlInstance,
363 ::unity::OptionalMethod,
364 ) -> ::unity::Array<crate::system::reflection::parameterinfo::ParameterInfo> = ::core::mem::transmute(__mi.method_ptr);
365 __inner(this.into(), ::core::option::Option::None)
366 }
367
368 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `get_ReflectedType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
369 pub unsafe fn get_reflected_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
370 let __mi = Self::get_reflected_type_method_info();
371 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
372 __inner(this.into(), ::core::option::Option::None)
373 }
374
375 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
376 pub unsafe fn get_custom_attributes(
377 this: impl ::core::convert::Into<::unity::IlInstance>,
378 inherit: bool,
379 ) -> ::unity::Array<crate::system::object::Object> {
380 let __mi = Self::get_custom_attributes_method_info();
381 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> ::unity::Array<crate::system::object::Object> =
382 ::core::mem::transmute(__mi.method_ptr);
383 __inner(this.into(), inherit, ::core::option::Option::None)
384 }
385
386 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
387 pub unsafe fn get_custom_attributes_2(
388 this: impl ::core::convert::Into<::unity::IlInstance>,
389 attribute_type: ::unity::SystemType,
390 inherit: bool,
391 ) -> ::unity::Array<crate::system::object::Object> {
392 let __mi = Self::get_custom_attributes_2_method_info();
393 let __inner: extern "C" fn(
394 ::unity::IlInstance,
395 ::unity::SystemType,
396 bool,
397 ::unity::OptionalMethod,
398 ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__mi.method_ptr);
399 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
400 }
401
402 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `GetMethodImplementationFlags`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
403 pub unsafe fn get_method_implementation_flags(
404 this: impl ::core::convert::Into<::unity::IlInstance>,
405 ) -> crate::system::reflection::methodimplattributes::MethodImplAttributes {
406 let __mi = Self::get_method_implementation_flags_method_info();
407 let __inner: extern "C" fn(
408 ::unity::IlInstance,
409 ::unity::OptionalMethod,
410 ) -> crate::system::reflection::methodimplattributes::MethodImplAttributes = ::core::mem::transmute(__mi.method_ptr);
411 __inner(this.into(), ::core::option::Option::None)
412 }
413
414 #[doc = "Direct (non-virtual) call to `ConstructorBuilder`'s own `IsDefined`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
415 pub unsafe fn is_defined(this: impl ::core::convert::Into<::unity::IlInstance>, attribute_type: ::unity::SystemType, inherit: bool) -> bool {
416 let __mi = Self::is_defined_method_info();
417 let __inner: extern "C" fn(::unity::IlInstance, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
418 ::core::mem::transmute(__mi.method_ptr);
419 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
420 }
421}
422
423#[cfg(feature = "system-reflection-emit-constructorbuilder")]
424#[doc(hidden)]
425pub mod prelude {
426 pub use super::{ConstructorBuilder, IConstructorBuilder, IConstructorBuilderMethods};
427 #[cfg(feature = "system-object")]
428 pub use crate::system::object::IObjectMethods;
429 #[cfg(feature = "system-reflection-constructorinfo")]
430 pub use crate::system::reflection::constructorinfo::IConstructorInfoMethods;
431 #[cfg(feature = "system-reflection-memberinfo")]
432 pub use crate::system::reflection::memberinfo::IMemberInfoMethods;
433 #[cfg(feature = "system-reflection-methodbase")]
434 pub use crate::system::reflection::methodbase::IMethodBaseMethods;
435 pub use crate::system::{
436 object::IObject,
437 reflection::{constructorinfo::IConstructorInfo, memberinfo::IMemberInfo, methodbase::IMethodBase},
438 };
439}