Skip to main content

engage/generated/system/reflection/
runtimeassembly.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-runtimeassembly-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        reflection::assembly::{Assembly, IAssembly},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/runtimeassembly/RuntimeAssembly.md"))]
14    #[::unity::class(namespace = "System.Reflection", name = "RuntimeAssembly")]
15    #[parent(crate::system::reflection::assembly::Assembly)]
16    pub struct RuntimeAssembly {}
17}
18
19#[cfg(feature = "system-reflection-runtimeassembly-types")]
20pub use __types::*;
21
22#[cfg(feature = "system-reflection-runtimeassembly")]
23pub trait IRuntimeAssemblyMethods: IRuntimeAssembly {
24    #[doc = "`GetName(bool)` overload"]
25    fn get_name(self, copied_name: impl ::core::convert::Into<bool>) -> crate::system::reflection::assemblyname::AssemblyName {
26        unsafe {
27            let __receiver = <RuntimeAssembly as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
28            {
29                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
30                let __vi = *__vt.get(18usize).unwrap_or_else(|| {
31                    panic!(
32                        "unity: virtual slot {}
33 out of range (vtable len {}
34) on the runtime class behind {}
35 (method `{}
36`)",
37                        18usize,
38                        __vt.len(),
39                        <RuntimeAssembly as ::unity::ClassIdentity>::NAME,
40                        "GetName",
41                    )
42                });
43                let __inner: extern "C" fn(RuntimeAssembly, bool, ::unity::OptionalMethod) -> crate::system::reflection::assemblyname::AssemblyName =
44                    ::core::mem::transmute(__vi.method_ptr);
45                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
46                __inner(__receiver, ::core::convert::Into::into(copied_name), __mi)
47            }
48        }
49    }
50    #[doc = "`.ctor()` overload"]
51    fn ctor(self) -> () {
52        unsafe {
53            let __receiver = <RuntimeAssembly as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54            ::unity::il2cpp_call!((::unity::module_base()+0x2fd3940usize)as*mut u8,();
55(RuntimeAssembly)__receiver)
56        }
57    }
58}
59
60#[cfg(feature = "system-reflection-runtimeassembly")]
61impl<__T: IRuntimeAssembly> IRuntimeAssemblyMethods for __T {}
62
63#[cfg(feature = "system-reflection-runtimeassembly")]
64impl RuntimeAssembly {
65    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
66        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
67    }
68
69    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
70        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
71    }
72}
73
74#[cfg(feature = "system-reflection-runtimeassembly")]
75impl RuntimeAssembly {
76    #[doc = "Direct (non-virtual) call to `RuntimeAssembly`'s own `GetName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
77    pub unsafe fn get_name(
78        this: impl ::core::convert::Into<::unity::IlInstance>,
79        copied_name: bool,
80    ) -> crate::system::reflection::assemblyname::AssemblyName {
81        let __mi = Self::get_name_method_info();
82        let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> crate::system::reflection::assemblyname::AssemblyName =
83            ::core::mem::transmute(__mi.method_ptr);
84        __inner(this.into(), copied_name, ::core::option::Option::None)
85    }
86}
87
88#[cfg(feature = "system-reflection-runtimeassembly")]
89impl RuntimeAssembly {
90    #[doc = "`.ctor()` — no args"]
91    pub fn new() -> Self {
92        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
93            panic!(
94                "{}
95::{}
96 failed to instantiate",
97                ::core::stringify!(RuntimeAssembly),
98                ::core::stringify!(new),
99            )
100        });
101        <Self as IRuntimeAssemblyMethods>::ctor(this);
102        this
103    }
104}
105
106#[cfg(feature = "system-reflection-runtimeassembly")]
107#[doc(hidden)]
108pub mod prelude {
109    pub use super::{IRuntimeAssembly, IRuntimeAssemblyMethods, RuntimeAssembly};
110    #[cfg(feature = "system-object")]
111    pub use crate::system::object::IObjectMethods;
112    #[cfg(feature = "system-reflection-assembly")]
113    pub use crate::system::reflection::assembly::IAssemblyMethods;
114    pub use crate::system::{object::IObject, reflection::assembly::IAssembly};
115}