Skip to main content

engage/generated/system/reflection/
memberfilter.rs

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