engage/generated/system/reflection/
monomodule.rs1#[cfg(feature = "system-reflection-monomodule-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 module::{IModule, Module},
12 runtimemodule::{IRuntimeModule, RuntimeModule},
13 },
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/monomodule/MonoModule.md"))]
17 #[::unity::class(namespace = "System.Reflection", name = "MonoModule")]
18 #[parent(crate::system::reflection::runtimemodule::RuntimeModule)]
19 pub struct MonoModule {}
20}
21
22#[cfg(feature = "system-reflection-monomodule-types")]
23pub use __types::*;
24
25#[cfg(feature = "system-reflection-monomodule")]
26pub trait IMonoModuleMethods: IMonoModule {
27 #[doc = "`get_Assembly()` overload"]
28 fn get_assembly(self) -> crate::system::reflection::assembly::Assembly {
29 unsafe {
30 let __receiver = <MonoModule 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(9usize).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 9usize,
41 __vt.len(),
42 <MonoModule as ::unity::ClassIdentity>::NAME,
43 "get_Assembly",
44 )
45 });
46 let __inner: extern "C" fn(MonoModule, ::unity::OptionalMethod) -> crate::system::reflection::assembly::Assembly =
47 ::core::mem::transmute(__vi.method_ptr);
48 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
49 __inner(__receiver, __mi)
50 }
51 }
52 }
53 #[doc = "`get_ScopeName()` overload"]
54 fn get_scope_name(self) -> ::unity::Il2CppString {
55 unsafe {
56 let __receiver = <MonoModule as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
57 {
58 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
59 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
60 panic!(
61 "unity: virtual slot {}
62 out of range (vtable len {}
63) on the runtime class behind {}
64 (method `{}
65`)",
66 10usize,
67 __vt.len(),
68 <MonoModule as ::unity::ClassIdentity>::NAME,
69 "get_ScopeName",
70 )
71 });
72 let __inner: extern "C" fn(MonoModule, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
73 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
74 __inner(__receiver, __mi)
75 }
76 }
77 }
78 #[doc = "`IsResource()` overload"]
79 fn is_resource(self) -> bool {
80 unsafe {
81 let __receiver = <MonoModule as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82 {
83 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
84 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
85 panic!(
86 "unity: virtual slot {}
87 out of range (vtable len {}
88) on the runtime class behind {}
89 (method `{}
90`)",
91 12usize,
92 __vt.len(),
93 <MonoModule as ::unity::ClassIdentity>::NAME,
94 "IsResource",
95 )
96 });
97 let __inner: extern "C" fn(MonoModule, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
98 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
99 __inner(__receiver, __mi)
100 }
101 }
102 }
103 #[doc = "`GetCustomAttributes(::unity::SystemType, bool)` overload"]
104 fn get_custom_attributes(
105 self,
106 attribute_type: impl ::core::convert::Into<::unity::SystemType>,
107 inherit: impl ::core::convert::Into<bool>,
108 ) -> ::unity::Array<crate::system::object::Object> {
109 unsafe {
110 let __receiver = <MonoModule as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
111 {
112 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
113 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
114 panic!(
115 "unity: virtual slot {}
116 out of range (vtable len {}
117) on the runtime class behind {}
118 (method `{}
119`)",
120 13usize,
121 __vt.len(),
122 <MonoModule as ::unity::ClassIdentity>::NAME,
123 "GetCustomAttributes",
124 )
125 });
126 let __inner: extern "C" fn(
127 MonoModule,
128 ::unity::SystemType,
129 bool,
130 ::unity::OptionalMethod,
131 ) -> ::unity::Array<crate::system::object::Object> = ::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(
134 __receiver,
135 ::core::convert::Into::into(attribute_type),
136 ::core::convert::Into::into(inherit),
137 __mi,
138 )
139 }
140 }
141 }
142 #[doc = "`IsDefined(::unity::SystemType, bool)` overload"]
143 fn is_defined(self, attribute_type: impl ::core::convert::Into<::unity::SystemType>, inherit: impl ::core::convert::Into<bool>) -> bool {
144 unsafe {
145 let __receiver = <MonoModule as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
146 {
147 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
148 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
149 panic!(
150 "unity: virtual slot {}
151 out of range (vtable len {}
152) on the runtime class behind {}
153 (method `{}
154`)",
155 14usize,
156 __vt.len(),
157 <MonoModule as ::unity::ClassIdentity>::NAME,
158 "IsDefined",
159 )
160 });
161 let __inner: extern "C" fn(MonoModule, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
162 ::core::mem::transmute(__vi.method_ptr);
163 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
164 __inner(
165 __receiver,
166 ::core::convert::Into::into(attribute_type),
167 ::core::convert::Into::into(inherit),
168 __mi,
169 )
170 }
171 }
172 }
173 #[doc = "`GetRuntimeAssembly()` overload"]
174 fn get_runtime_assembly(self) -> crate::system::reflection::runtimeassembly::RuntimeAssembly {
175 unsafe {
176 let __receiver = <MonoModule as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
177 ::unity::il2cpp_call!((::unity::module_base()+0x3383300usize)as*mut u8,crate::system::reflection::runtimeassembly::RuntimeAssembly;
178(MonoModule)__receiver)
179 }
180 }
181 #[doc = "`.ctor()` overload"]
182 fn ctor(self) -> () {
183 unsafe {
184 let __receiver = <MonoModule as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
185 ::unity::il2cpp_call!((::unity::module_base()+0x3383380usize)as*mut u8,();
186(MonoModule)__receiver)
187 }
188 }
189}
190
191#[cfg(feature = "system-reflection-monomodule")]
192impl<__T: IMonoModule> IMonoModuleMethods for __T {}
193
194#[cfg(feature = "system-reflection-monomodule")]
195impl MonoModule {
196 pub fn get_assembly_method_info() -> &'static ::unity::il2cpp::MethodInfo {
197 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
198 }
199
200 pub fn get_scope_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
201 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
202 }
203
204 pub fn is_resource_method_info() -> &'static ::unity::il2cpp::MethodInfo {
205 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
206 }
207
208 pub fn get_custom_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
210 }
211
212 pub fn is_defined_method_info() -> &'static ::unity::il2cpp::MethodInfo {
213 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
214 }
215
216 pub fn get_runtime_assembly_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
218 }
219
220 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
222 }
223}
224
225#[cfg(feature = "system-reflection-monomodule")]
226impl MonoModule {
227 #[doc = "Direct (non-virtual) call to `MonoModule`'s own `get_Assembly`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
228 pub unsafe fn get_assembly(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::assembly::Assembly {
229 let __mi = Self::get_assembly_method_info();
230 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::assembly::Assembly =
231 ::core::mem::transmute(__mi.method_ptr);
232 __inner(this.into(), ::core::option::Option::None)
233 }
234
235 #[doc = "Direct (non-virtual) call to `MonoModule`'s own `get_ScopeName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
236 pub unsafe fn get_scope_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
237 let __mi = Self::get_scope_name_method_info();
238 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
239 __inner(this.into(), ::core::option::Option::None)
240 }
241
242 #[doc = "Direct (non-virtual) call to `MonoModule`'s own `IsResource`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
243 pub unsafe fn is_resource(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
244 let __mi = Self::is_resource_method_info();
245 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
246 __inner(this.into(), ::core::option::Option::None)
247 }
248
249 #[doc = "Direct (non-virtual) call to `MonoModule`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
250 pub unsafe fn get_custom_attributes(
251 this: impl ::core::convert::Into<::unity::IlInstance>,
252 attribute_type: ::unity::SystemType,
253 inherit: bool,
254 ) -> ::unity::Array<crate::system::object::Object> {
255 let __mi = Self::get_custom_attributes_method_info();
256 let __inner: extern "C" fn(
257 ::unity::IlInstance,
258 ::unity::SystemType,
259 bool,
260 ::unity::OptionalMethod,
261 ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__mi.method_ptr);
262 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
263 }
264
265 #[doc = "Direct (non-virtual) call to `MonoModule`'s own `IsDefined`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
266 pub unsafe fn is_defined(this: impl ::core::convert::Into<::unity::IlInstance>, attribute_type: ::unity::SystemType, inherit: bool) -> bool {
267 let __mi = Self::is_defined_method_info();
268 let __inner: extern "C" fn(::unity::IlInstance, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
269 ::core::mem::transmute(__mi.method_ptr);
270 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
271 }
272}
273
274#[cfg(feature = "system-reflection-monomodule")]
275impl MonoModule {
276 #[doc = "`.ctor()` — no args"]
277 pub fn new() -> Self {
278 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
279 panic!(
280 "{}
281::{}
282 failed to instantiate",
283 ::core::stringify!(MonoModule),
284 ::core::stringify!(new),
285 )
286 });
287 <Self as IMonoModuleMethods>::ctor(this);
288 this
289 }
290}
291
292#[cfg(feature = "system-reflection-monomodule")]
293#[doc(hidden)]
294pub mod prelude {
295 pub use super::{IMonoModule, IMonoModuleMethods, MonoModule};
296 #[cfg(feature = "system-object")]
297 pub use crate::system::object::IObjectMethods;
298 #[cfg(feature = "system-reflection-module")]
299 pub use crate::system::reflection::module::IModuleMethods;
300 #[cfg(feature = "system-reflection-runtimemodule")]
301 pub use crate::system::reflection::runtimemodule::IRuntimeModuleMethods;
302 pub use crate::system::{
303 object::IObject,
304 reflection::{module::IModule, runtimemodule::IRuntimeModule},
305 };
306}