Skip to main content

engage/generated/system/
delegate.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-delegate-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/delegate/Delegate.md"))]
11    #[::unity::class(namespace = "System", name = "Delegate")]
12    #[parent(crate::system::object::Object)]
13    pub struct Delegate {
14        #[offset(16)]
15        #[rename(name = "method_ptr")]
16        pub method_ptr: ::unity::IntPtr,
17        #[offset(24)]
18        #[rename(name = "invoke_impl")]
19        pub invoke_impl: ::unity::IntPtr,
20        #[offset(32)]
21        #[rename(name = "m_target")]
22        pub m_target: ::unity::IlInstance,
23        #[offset(40)]
24        #[rename(name = "method")]
25        pub method: ::unity::IntPtr,
26        #[offset(48)]
27        #[rename(name = "delegate_trampoline")]
28        pub delegate_trampoline: ::unity::IntPtr,
29        #[offset(56)]
30        #[rename(name = "extra_arg")]
31        pub extra_arg: ::unity::IntPtr,
32        #[offset(64)]
33        #[rename(name = "method_code")]
34        pub method_code: ::unity::IntPtr,
35        #[offset(72)]
36        #[rename(name = "method_info")]
37        pub method_info: crate::system::reflection::methodinfo::MethodInfo,
38        #[offset(80)]
39        #[rename(name = "original_method_info")]
40        pub original_method_info: crate::system::reflection::methodinfo::MethodInfo,
41        #[offset(96)]
42        #[rename(name = "method_is_virtual")]
43        pub method_is_virtual: bool,
44    }
45}
46
47#[cfg(feature = "system-delegate-types")]
48pub use __types::*;
49
50#[cfg(feature = "system-delegate")]
51impl Delegate {
52    #[doc = "`CreateDelegate_internal(::unity::SystemType, crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo, bool)` overload"]
53    pub fn create_delegate_internal(
54        r#type: impl ::core::convert::Into<::unity::SystemType>,
55        target: impl ::core::convert::Into<crate::system::object::Object>,
56        info: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
57        throw_on_bind_failure: impl ::core::convert::Into<bool>,
58    ) -> crate::system::delegate::Delegate {
59        unsafe {
60            ::unity::il2cpp_call!((::unity::module_base()+0x3639bb0usize)as*mut u8,crate::system::delegate::Delegate;
61(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(target),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(info),(bool)::core::convert::Into::into(throw_on_bind_failure))
62        }
63    }
64
65    #[doc = "`arg_type_match(::unity::SystemType, ::unity::SystemType)` overload"]
66    pub fn arg_type_match(
67        del_arg_type: impl ::core::convert::Into<::unity::SystemType>,
68        arg_type: impl ::core::convert::Into<::unity::SystemType>,
69    ) -> bool {
70        unsafe {
71            ::unity::il2cpp_call!((::unity::module_base()+0x3639bc0usize)as*mut u8,bool;
72(::unity::SystemType)::core::convert::Into::into(del_arg_type),(::unity::SystemType)::core::convert::Into::into(arg_type))
73        }
74    }
75
76    #[doc = "`arg_type_match_this(::unity::SystemType, ::unity::SystemType, bool)` overload"]
77    pub fn arg_type_match_this(
78        del_arg_type: impl ::core::convert::Into<::unity::SystemType>,
79        arg_type: impl ::core::convert::Into<::unity::SystemType>,
80        boxed_this: impl ::core::convert::Into<bool>,
81    ) -> bool {
82        unsafe {
83            ::unity::il2cpp_call!((::unity::module_base()+0x3639d80usize)as*mut u8,bool;
84(::unity::SystemType)::core::convert::Into::into(del_arg_type),(::unity::SystemType)::core::convert::Into::into(arg_type),(bool)::core::convert::Into::into(boxed_this))
85        }
86    }
87
88    #[doc = "`return_type_match(::unity::SystemType, ::unity::SystemType)` overload"]
89    pub fn return_type_match(
90        del_return_type: impl ::core::convert::Into<::unity::SystemType>,
91        return_type: impl ::core::convert::Into<::unity::SystemType>,
92    ) -> bool {
93        unsafe {
94            ::unity::il2cpp_call!((::unity::module_base()+0x3639ef0usize)as*mut u8,bool;
95(::unity::SystemType)::core::convert::Into::into(del_return_type),(::unity::SystemType)::core::convert::Into::into(return_type))
96        }
97    }
98
99    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo, bool)` overload"]
100    pub fn create_delegate(
101        r#type: impl ::core::convert::Into<::unity::SystemType>,
102        first_argument: impl ::core::convert::Into<crate::system::object::Object>,
103        method: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
104        throw_on_bind_failure: impl ::core::convert::Into<bool>,
105    ) -> crate::system::delegate::Delegate {
106        unsafe {
107            ::unity::il2cpp_call!((::unity::module_base()+0x363a130usize)as*mut u8,crate::system::delegate::Delegate;
108(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(first_argument),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(method),(bool)::core::convert::Into::into(throw_on_bind_failure))
109        }
110    }
111
112    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo, bool, bool)` overload"]
113    pub fn create_delegate_2(
114        r#type: impl ::core::convert::Into<::unity::SystemType>,
115        first_argument: impl ::core::convert::Into<crate::system::object::Object>,
116        method: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
117        throw_on_bind_failure: impl ::core::convert::Into<bool>,
118        allow_closed: impl ::core::convert::Into<bool>,
119    ) -> crate::system::delegate::Delegate {
120        unsafe {
121            ::unity::il2cpp_call!((::unity::module_base()+0x363a140usize)as*mut u8,crate::system::delegate::Delegate;
122(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(first_argument),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(method),(bool)::core::convert::Into::into(throw_on_bind_failure),(bool)::core::convert::Into::into(allow_closed))
123        }
124    }
125
126    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo)` overload"]
127    pub fn create_delegate_3(
128        r#type: impl ::core::convert::Into<::unity::SystemType>,
129        first_argument: impl ::core::convert::Into<crate::system::object::Object>,
130        method: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
131    ) -> crate::system::delegate::Delegate {
132        unsafe {
133            ::unity::il2cpp_call!((::unity::module_base()+0x363a930usize)as*mut u8,crate::system::delegate::Delegate;
134(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(first_argument),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(method))
135        }
136    }
137
138    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::reflection::methodinfo::MethodInfo, bool)` overload"]
139    pub fn create_delegate_4(
140        r#type: impl ::core::convert::Into<::unity::SystemType>,
141        method: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
142        throw_on_bind_failure: impl ::core::convert::Into<bool>,
143    ) -> crate::system::delegate::Delegate {
144        unsafe {
145            ::unity::il2cpp_call!((::unity::module_base()+0x363a940usize)as*mut u8,crate::system::delegate::Delegate;
146(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(method),(bool)::core::convert::Into::into(throw_on_bind_failure))
147        }
148    }
149
150    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::reflection::methodinfo::MethodInfo)` overload"]
151    pub fn create_delegate_5(
152        r#type: impl ::core::convert::Into<::unity::SystemType>,
153        method: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
154    ) -> crate::system::delegate::Delegate {
155        unsafe {
156            ::unity::il2cpp_call!((::unity::module_base()+0x363a960usize)as*mut u8,crate::system::delegate::Delegate;
157(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(method))
158        }
159    }
160
161    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object, ::unity::Il2CppString)` overload"]
162    pub fn create_delegate_6(
163        r#type: impl ::core::convert::Into<::unity::SystemType>,
164        target: impl ::core::convert::Into<crate::system::object::Object>,
165        method: impl ::core::convert::Into<::unity::Il2CppString>,
166    ) -> crate::system::delegate::Delegate {
167        unsafe {
168            ::unity::il2cpp_call!((::unity::module_base()+0x363a980usize)as*mut u8,crate::system::delegate::Delegate;
169(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(target),(::unity::Il2CppString)::core::convert::Into::into(method))
170        }
171    }
172
173    #[doc = "`GetCandidateMethod(::unity::SystemType, ::unity::SystemType, ::unity::Il2CppString, crate::system::reflection::bindingflags::BindingFlags, bool, bool)` overload"]
174    pub fn get_candidate_method(
175        r#type: impl ::core::convert::Into<::unity::SystemType>,
176        target: impl ::core::convert::Into<::unity::SystemType>,
177        method: impl ::core::convert::Into<::unity::Il2CppString>,
178        bflags: impl ::core::convert::Into<crate::system::reflection::bindingflags::BindingFlags>,
179        ignore_case: impl ::core::convert::Into<bool>,
180        throw_on_bind_failure: impl ::core::convert::Into<bool>,
181    ) -> crate::system::reflection::methodinfo::MethodInfo {
182        unsafe {
183            ::unity::il2cpp_call!((::unity::module_base()+0x363a9a0usize)as*mut u8,crate::system::reflection::methodinfo::MethodInfo;
184(::unity::SystemType)::core::convert::Into::into(r#type),(::unity::SystemType)::core::convert::Into::into(target),(::unity::Il2CppString)::core::convert::Into::into(method),(crate::system::reflection::bindingflags::BindingFlags)::core::convert::Into::into(bflags),(bool)::core::convert::Into::into(ignore_case),(bool)::core::convert::Into::into(throw_on_bind_failure))
185        }
186    }
187
188    #[doc = "`CreateDelegate(::unity::SystemType, ::unity::SystemType, ::unity::Il2CppString, bool, bool)` overload"]
189    pub fn create_delegate_7(
190        r#type: impl ::core::convert::Into<::unity::SystemType>,
191        target: impl ::core::convert::Into<::unity::SystemType>,
192        method: impl ::core::convert::Into<::unity::Il2CppString>,
193        ignore_case: impl ::core::convert::Into<bool>,
194        throw_on_bind_failure: impl ::core::convert::Into<bool>,
195    ) -> crate::system::delegate::Delegate {
196        unsafe {
197            ::unity::il2cpp_call!((::unity::module_base()+0x363ae00usize)as*mut u8,crate::system::delegate::Delegate;
198(::unity::SystemType)::core::convert::Into::into(r#type),(::unity::SystemType)::core::convert::Into::into(target),(::unity::Il2CppString)::core::convert::Into::into(method),(bool)::core::convert::Into::into(ignore_case),(bool)::core::convert::Into::into(throw_on_bind_failure))
199        }
200    }
201
202    #[doc = "`CreateDelegate(::unity::SystemType, ::unity::SystemType, ::unity::Il2CppString)` overload"]
203    pub fn create_delegate_8(
204        r#type: impl ::core::convert::Into<::unity::SystemType>,
205        target: impl ::core::convert::Into<::unity::SystemType>,
206        method: impl ::core::convert::Into<::unity::Il2CppString>,
207    ) -> crate::system::delegate::Delegate {
208        unsafe {
209            ::unity::il2cpp_call!((::unity::module_base()+0x363af40usize)as*mut u8,crate::system::delegate::Delegate;
210(::unity::SystemType)::core::convert::Into::into(r#type),(::unity::SystemType)::core::convert::Into::into(target),(::unity::Il2CppString)::core::convert::Into::into(method))
211        }
212    }
213
214    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object, ::unity::Il2CppString, bool, bool)` overload"]
215    pub fn create_delegate_9(
216        r#type: impl ::core::convert::Into<::unity::SystemType>,
217        target: impl ::core::convert::Into<crate::system::object::Object>,
218        method: impl ::core::convert::Into<::unity::Il2CppString>,
219        ignore_case: impl ::core::convert::Into<bool>,
220        throw_on_bind_failure: impl ::core::convert::Into<bool>,
221    ) -> crate::system::delegate::Delegate {
222        unsafe {
223            ::unity::il2cpp_call!((::unity::module_base()+0x363af50usize)as*mut u8,crate::system::delegate::Delegate;
224(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(target),(::unity::Il2CppString)::core::convert::Into::into(method),(bool)::core::convert::Into::into(ignore_case),(bool)::core::convert::Into::into(throw_on_bind_failure))
225        }
226    }
227
228    #[doc = "`CreateDelegate(::unity::SystemType, crate::system::object::Object, ::unity::Il2CppString, bool)` overload"]
229    pub fn create_delegate_10(
230        r#type: impl ::core::convert::Into<::unity::SystemType>,
231        target: impl ::core::convert::Into<crate::system::object::Object>,
232        method: impl ::core::convert::Into<::unity::Il2CppString>,
233        ignore_case: impl ::core::convert::Into<bool>,
234    ) -> crate::system::delegate::Delegate {
235        unsafe {
236            ::unity::il2cpp_call!((::unity::module_base()+0x363a990usize)as*mut u8,crate::system::delegate::Delegate;
237(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(target),(::unity::Il2CppString)::core::convert::Into::into(method),(bool)::core::convert::Into::into(ignore_case))
238        }
239    }
240
241    #[doc = "`Combine(crate::system::delegate::Delegate, crate::system::delegate::Delegate)` overload"]
242    pub fn combine(
243        a: impl ::core::convert::Into<crate::system::delegate::Delegate>,
244        b: impl ::core::convert::Into<crate::system::delegate::Delegate>,
245    ) -> crate::system::delegate::Delegate {
246        unsafe {
247            ::unity::il2cpp_call!((::unity::module_base()+0x363bad0usize)as*mut u8,crate::system::delegate::Delegate;
248(crate::system::delegate::Delegate)::core::convert::Into::into(a),(crate::system::delegate::Delegate)::core::convert::Into::into(b))
249        }
250    }
251
252    #[doc = "`Combine(::unity::Array<crate::system::delegate::Delegate>)` overload"]
253    pub fn combine_2(delegates: impl ::core::convert::Into<::unity::Array<crate::system::delegate::Delegate>>) -> crate::system::delegate::Delegate {
254        unsafe {
255            ::unity::il2cpp_call!((::unity::module_base()+0x363bc80usize)as*mut u8,crate::system::delegate::Delegate;
256(::unity::Array<crate::system::delegate::Delegate>)::core::convert::Into::into(delegates))
257        }
258    }
259
260    #[doc = "`Remove(crate::system::delegate::Delegate, crate::system::delegate::Delegate)` overload"]
261    pub fn remove(
262        source: impl ::core::convert::Into<crate::system::delegate::Delegate>,
263        value: impl ::core::convert::Into<crate::system::delegate::Delegate>,
264    ) -> crate::system::delegate::Delegate {
265        unsafe {
266            ::unity::il2cpp_call!((::unity::module_base()+0x363bd70usize)as*mut u8,crate::system::delegate::Delegate;
267(crate::system::delegate::Delegate)::core::convert::Into::into(source),(crate::system::delegate::Delegate)::core::convert::Into::into(value))
268        }
269    }
270
271    #[doc = "`op_Equality(crate::system::delegate::Delegate, crate::system::delegate::Delegate)` overload"]
272    pub fn op_equality(
273        d1: impl ::core::convert::Into<crate::system::delegate::Delegate>,
274        d2: impl ::core::convert::Into<crate::system::delegate::Delegate>,
275    ) -> bool {
276        unsafe {
277            ::unity::il2cpp_call!((::unity::module_base()+0x363bf50usize)as*mut u8,bool;
278(crate::system::delegate::Delegate)::core::convert::Into::into(d1),(crate::system::delegate::Delegate)::core::convert::Into::into(d2))
279        }
280    }
281
282    #[doc = "`CreateDelegateNoSecurityCheck(crate::system::runtimetype::RuntimeType, crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo)` overload"]
283    pub fn create_delegate_no_security_check(
284        r#type: impl ::core::convert::Into<crate::system::runtimetype::RuntimeType>,
285        first_argument: impl ::core::convert::Into<crate::system::object::Object>,
286        method: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
287    ) -> crate::system::delegate::Delegate {
288        unsafe {
289            ::unity::il2cpp_call!((::unity::module_base()+0x363bf80usize)as*mut u8,crate::system::delegate::Delegate;
290(crate::system::runtimetype::RuntimeType)::core::convert::Into::into(r#type),(crate::system::object::Object)::core::convert::Into::into(first_argument),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(method))
291        }
292    }
293
294    #[doc = "`AllocDelegateLike_internal(crate::system::delegate::Delegate)` overload"]
295    pub fn alloc_delegate_like_internal(
296        d: impl ::core::convert::Into<crate::system::delegate::Delegate>,
297    ) -> crate::system::multicastdelegate::MulticastDelegate {
298        unsafe {
299            ::unity::il2cpp_call!((::unity::module_base()+0x363bf90usize)as*mut u8,crate::system::multicastdelegate::MulticastDelegate;
300(crate::system::delegate::Delegate)::core::convert::Into::into(d))
301        }
302    }
303}
304
305#[cfg(feature = "system-delegate")]
306pub trait IDelegateMethods: IDelegate {
307    #[doc = "`get_Method()` overload"]
308    fn get_method(self) -> crate::system::reflection::methodinfo::MethodInfo {
309        unsafe {
310            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
311            ::unity::il2cpp_call!((::unity::module_base()+0x3639b80usize)as*mut u8,crate::system::reflection::methodinfo::MethodInfo;
312(Delegate)__receiver)
313        }
314    }
315    #[doc = "`GetVirtualMethod_internal()` overload"]
316    fn get_virtual_method_internal(self) -> crate::system::reflection::methodinfo::MethodInfo {
317        unsafe {
318            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
319            ::unity::il2cpp_call!((::unity::module_base()+0x3639b90usize)as*mut u8,crate::system::reflection::methodinfo::MethodInfo;
320(Delegate)__receiver)
321        }
322    }
323    #[doc = "`get_Target()` overload"]
324    fn get_target(self) -> crate::system::object::Object {
325        unsafe {
326            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
327            ::unity::il2cpp_call!((::unity::module_base()+0x3639ba0usize)as*mut u8,crate::system::object::Object;
328(Delegate)__receiver)
329        }
330    }
331    #[doc = "`DynamicInvoke(::unity::Array<crate::system::object::Object>)` overload"]
332    fn dynamic_invoke(self, args: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>) -> crate::system::object::Object {
333        unsafe {
334            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
335            ::unity::il2cpp_call!((::unity::module_base()+0x363b040usize)as*mut u8,crate::system::object::Object;
336(Delegate)__receiver,(::unity::Array<crate::system::object::Object>)::core::convert::Into::into(args))
337        }
338    }
339    #[doc = "`InitializeDelegateData()` overload"]
340    fn initialize_delegate_data(self) -> () {
341        unsafe {
342            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
343            ::unity::il2cpp_call!((::unity::module_base()+0x363b050usize)as*mut u8,();
344(Delegate)__receiver)
345        }
346    }
347    #[doc = "`DynamicInvokeImpl(::unity::Array<crate::system::object::Object>)` overload"]
348    fn dynamic_invoke_impl(self, args: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>) -> crate::system::object::Object {
349        unsafe {
350            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
351            {
352                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
353                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
354                    panic!(
355                        "unity: virtual slot {}
356 out of range (vtable len {}
357) on the runtime class behind {}
358 (method `{}
359`)",
360                        6usize,
361                        __vt.len(),
362                        <Delegate as ::unity::ClassIdentity>::NAME,
363                        "DynamicInvokeImpl",
364                    )
365                });
366                let __inner: extern "C" fn(
367                    Delegate,
368                    ::unity::Array<crate::system::object::Object>,
369                    ::unity::OptionalMethod,
370                ) -> crate::system::object::Object = ::core::mem::transmute(__vi.method_ptr);
371                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
372                __inner(__receiver, ::core::convert::Into::into(args), __mi)
373            }
374        }
375    }
376    #[doc = "`Clone()` overload"]
377    fn clone(self) -> crate::system::object::Object {
378        unsafe {
379            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
380            {
381                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
382                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
383                    panic!(
384                        "unity: virtual slot {}
385 out of range (vtable len {}
386) on the runtime class behind {}
387 (method `{}
388`)",
389                        7usize,
390                        __vt.len(),
391                        <Delegate as ::unity::ClassIdentity>::NAME,
392                        "Clone",
393                    )
394                });
395                let __inner: extern "C" fn(Delegate, ::unity::OptionalMethod) -> crate::system::object::Object =
396                    ::core::mem::transmute(__vi.method_ptr);
397                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
398                __inner(__receiver, __mi)
399            }
400        }
401    }
402    #[doc = "`Equals(crate::system::object::Object)` overload"]
403    fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
404        unsafe {
405            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
406            {
407                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
408                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
409                    panic!(
410                        "unity: virtual slot {}
411 out of range (vtable len {}
412) on the runtime class behind {}
413 (method `{}
414`)",
415                        0usize,
416                        __vt.len(),
417                        <Delegate as ::unity::ClassIdentity>::NAME,
418                        "Equals",
419                    )
420                });
421                let __inner: extern "C" fn(Delegate, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
422                    ::core::mem::transmute(__vi.method_ptr);
423                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
424                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
425            }
426        }
427    }
428    #[doc = "`GetHashCode()` overload"]
429    fn get_hash_code(self) -> i32 {
430        unsafe {
431            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
432            {
433                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
434                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
435                    panic!(
436                        "unity: virtual slot {}
437 out of range (vtable len {}
438) on the runtime class behind {}
439 (method `{}
440`)",
441                        2usize,
442                        __vt.len(),
443                        <Delegate as ::unity::ClassIdentity>::NAME,
444                        "GetHashCode",
445                    )
446                });
447                let __inner: extern "C" fn(Delegate, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
448                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
449                __inner(__receiver, __mi)
450            }
451        }
452    }
453    #[doc = "`GetMethodImpl()` overload"]
454    fn get_method_impl(self) -> crate::system::reflection::methodinfo::MethodInfo {
455        unsafe {
456            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
457            {
458                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
459                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
460                    panic!(
461                        "unity: virtual slot {}
462 out of range (vtable len {}
463) on the runtime class behind {}
464 (method `{}
465`)",
466                        8usize,
467                        __vt.len(),
468                        <Delegate as ::unity::ClassIdentity>::NAME,
469                        "GetMethodImpl",
470                    )
471                });
472                let __inner: extern "C" fn(Delegate, ::unity::OptionalMethod) -> crate::system::reflection::methodinfo::MethodInfo =
473                    ::core::mem::transmute(__vi.method_ptr);
474                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
475                __inner(__receiver, __mi)
476            }
477        }
478    }
479    #[doc = "`GetInvocationList()` overload"]
480    fn get_invocation_list(self) -> ::unity::Array<crate::system::delegate::Delegate> {
481        unsafe {
482            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
483            {
484                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
485                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
486                    panic!(
487                        "unity: virtual slot {}
488 out of range (vtable len {}
489) on the runtime class behind {}
490 (method `{}
491`)",
492                        10usize,
493                        __vt.len(),
494                        <Delegate as ::unity::ClassIdentity>::NAME,
495                        "GetInvocationList",
496                    )
497                });
498                let __inner: extern "C" fn(Delegate, ::unity::OptionalMethod) -> ::unity::Array<crate::system::delegate::Delegate> =
499                    ::core::mem::transmute(__vi.method_ptr);
500                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
501                __inner(__receiver, __mi)
502            }
503        }
504    }
505    #[doc = "`CombineImpl(crate::system::delegate::Delegate)` overload"]
506    fn combine_impl(self, d: impl ::core::convert::Into<crate::system::delegate::Delegate>) -> crate::system::delegate::Delegate {
507        unsafe {
508            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
509            {
510                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
511                let __vi = *__vt.get(11usize).unwrap_or_else(|| {
512                    panic!(
513                        "unity: virtual slot {}
514 out of range (vtable len {}
515) on the runtime class behind {}
516 (method `{}
517`)",
518                        11usize,
519                        __vt.len(),
520                        <Delegate as ::unity::ClassIdentity>::NAME,
521                        "CombineImpl",
522                    )
523                });
524                let __inner: extern "C" fn(
525                    Delegate,
526                    crate::system::delegate::Delegate,
527                    ::unity::OptionalMethod,
528                ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__vi.method_ptr);
529                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
530                __inner(__receiver, ::core::convert::Into::into(d), __mi)
531            }
532        }
533    }
534    #[doc = "`RemoveImpl(crate::system::delegate::Delegate)` overload"]
535    fn remove_impl(self, d: impl ::core::convert::Into<crate::system::delegate::Delegate>) -> crate::system::delegate::Delegate {
536        unsafe {
537            let __receiver = <Delegate as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
538            {
539                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
540                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
541                    panic!(
542                        "unity: virtual slot {}
543 out of range (vtable len {}
544) on the runtime class behind {}
545 (method `{}
546`)",
547                        12usize,
548                        __vt.len(),
549                        <Delegate as ::unity::ClassIdentity>::NAME,
550                        "RemoveImpl",
551                    )
552                });
553                let __inner: extern "C" fn(
554                    Delegate,
555                    crate::system::delegate::Delegate,
556                    ::unity::OptionalMethod,
557                ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__vi.method_ptr);
558                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
559                __inner(__receiver, ::core::convert::Into::into(d), __mi)
560            }
561        }
562    }
563}
564
565#[cfg(feature = "system-delegate")]
566impl<__T: IDelegate> IDelegateMethods for __T {}
567
568#[cfg(feature = "system-delegate")]
569impl Delegate {
570    pub fn get_method_method_info() -> &'static ::unity::il2cpp::MethodInfo {
571        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
572    }
573
574    pub fn get_virtual_method_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
575        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
576    }
577
578    pub fn get_target_method_info() -> &'static ::unity::il2cpp::MethodInfo {
579        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
580    }
581
582    pub fn create_delegate_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
583        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
584    }
585
586    pub fn arg_type_match_method_info() -> &'static ::unity::il2cpp::MethodInfo {
587        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
588    }
589
590    pub fn arg_type_match_this_method_info() -> &'static ::unity::il2cpp::MethodInfo {
591        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
592    }
593
594    pub fn return_type_match_method_info() -> &'static ::unity::il2cpp::MethodInfo {
595        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
596    }
597
598    pub fn create_delegate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
599        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
600    }
601
602    pub fn create_delegate_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
603        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
604    }
605
606    pub fn create_delegate_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
607        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
608    }
609
610    pub fn create_delegate_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
611        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
612    }
613
614    pub fn create_delegate_5_method_info() -> &'static ::unity::il2cpp::MethodInfo {
615        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
616    }
617
618    pub fn create_delegate_6_method_info() -> &'static ::unity::il2cpp::MethodInfo {
619        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
620    }
621
622    pub fn get_candidate_method_method_info() -> &'static ::unity::il2cpp::MethodInfo {
623        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
624    }
625
626    pub fn create_delegate_7_method_info() -> &'static ::unity::il2cpp::MethodInfo {
627        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
628    }
629
630    pub fn create_delegate_8_method_info() -> &'static ::unity::il2cpp::MethodInfo {
631        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
632    }
633
634    pub fn create_delegate_9_method_info() -> &'static ::unity::il2cpp::MethodInfo {
635        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
636    }
637
638    pub fn create_delegate_10_method_info() -> &'static ::unity::il2cpp::MethodInfo {
639        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
640    }
641
642    pub fn dynamic_invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
643        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
644    }
645
646    pub fn initialize_delegate_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
647        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
648    }
649
650    pub fn dynamic_invoke_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
651        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
652    }
653
654    pub fn clone_method_info() -> &'static ::unity::il2cpp::MethodInfo {
655        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
656    }
657
658    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
659        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
660    }
661
662    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
663        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
664    }
665
666    pub fn get_method_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
667        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
668    }
669
670    pub fn get_invocation_list_method_info() -> &'static ::unity::il2cpp::MethodInfo {
671        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
672    }
673
674    pub fn combine_method_info() -> &'static ::unity::il2cpp::MethodInfo {
675        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
676    }
677
678    pub fn combine_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
679        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
680    }
681
682    pub fn combine_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
683        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[29]
684    }
685
686    pub fn remove_method_info() -> &'static ::unity::il2cpp::MethodInfo {
687        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[30]
688    }
689
690    pub fn remove_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
691        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[31]
692    }
693
694    pub fn op_equality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
695        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[32]
696    }
697
698    pub fn create_delegate_no_security_check_method_info() -> &'static ::unity::il2cpp::MethodInfo {
699        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[33]
700    }
701
702    pub fn alloc_delegate_like_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
703        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[34]
704    }
705}
706
707#[cfg(feature = "system-delegate")]
708impl Delegate {
709    #[doc = "Direct (non-virtual) call to `Delegate`'s own `DynamicInvokeImpl`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
710    pub unsafe fn dynamic_invoke_impl(
711        this: impl ::core::convert::Into<::unity::IlInstance>,
712        args: ::unity::Array<crate::system::object::Object>,
713    ) -> crate::system::object::Object {
714        let __mi = Self::dynamic_invoke_impl_method_info();
715        let __inner: extern "C" fn(
716            ::unity::IlInstance,
717            ::unity::Array<crate::system::object::Object>,
718            ::unity::OptionalMethod,
719        ) -> crate::system::object::Object = ::core::mem::transmute(__mi.method_ptr);
720        __inner(this.into(), args, ::core::option::Option::None)
721    }
722
723    #[doc = "Direct (non-virtual) call to `Delegate`'s own `Clone`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
724    pub unsafe fn clone(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::object::Object {
725        let __mi = Self::clone_method_info();
726        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
727            ::core::mem::transmute(__mi.method_ptr);
728        __inner(this.into(), ::core::option::Option::None)
729    }
730
731    #[doc = "Direct (non-virtual) call to `Delegate`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
732    pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
733        let __mi = Self::equals_method_info();
734        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
735            ::core::mem::transmute(__mi.method_ptr);
736        __inner(this.into(), obj, ::core::option::Option::None)
737    }
738
739    #[doc = "Direct (non-virtual) call to `Delegate`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
740    pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
741        let __mi = Self::get_hash_code_method_info();
742        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
743        __inner(this.into(), ::core::option::Option::None)
744    }
745
746    #[doc = "Direct (non-virtual) call to `Delegate`'s own `GetMethodImpl`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
747    pub unsafe fn get_method_impl(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::reflection::methodinfo::MethodInfo {
748        let __mi = Self::get_method_impl_method_info();
749        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::reflection::methodinfo::MethodInfo =
750            ::core::mem::transmute(__mi.method_ptr);
751        __inner(this.into(), ::core::option::Option::None)
752    }
753
754    #[doc = "Direct (non-virtual) call to `Delegate`'s own `GetInvocationList`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
755    pub unsafe fn get_invocation_list(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Array<crate::system::delegate::Delegate> {
756        let __mi = Self::get_invocation_list_method_info();
757        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Array<crate::system::delegate::Delegate> =
758            ::core::mem::transmute(__mi.method_ptr);
759        __inner(this.into(), ::core::option::Option::None)
760    }
761
762    #[doc = "Direct (non-virtual) call to `Delegate`'s own `CombineImpl`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
763    pub unsafe fn combine_impl(
764        this: impl ::core::convert::Into<::unity::IlInstance>,
765        d: crate::system::delegate::Delegate,
766    ) -> crate::system::delegate::Delegate {
767        let __mi = Self::combine_impl_method_info();
768        let __inner: extern "C" fn(
769            ::unity::IlInstance,
770            crate::system::delegate::Delegate,
771            ::unity::OptionalMethod,
772        ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__mi.method_ptr);
773        __inner(this.into(), d, ::core::option::Option::None)
774    }
775
776    #[doc = "Direct (non-virtual) call to `Delegate`'s own `RemoveImpl`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
777    pub unsafe fn remove_impl(
778        this: impl ::core::convert::Into<::unity::IlInstance>,
779        d: crate::system::delegate::Delegate,
780    ) -> crate::system::delegate::Delegate {
781        let __mi = Self::remove_impl_method_info();
782        let __inner: extern "C" fn(
783            ::unity::IlInstance,
784            crate::system::delegate::Delegate,
785            ::unity::OptionalMethod,
786        ) -> crate::system::delegate::Delegate = ::core::mem::transmute(__mi.method_ptr);
787        __inner(this.into(), d, ::core::option::Option::None)
788    }
789}
790
791#[cfg(feature = "system-delegate")]
792#[doc(hidden)]
793pub mod prelude {
794    pub use super::{Delegate, IDelegate, IDelegateMethods};
795    pub use crate::system::object::IObject;
796    #[cfg(feature = "system-object")]
797    pub use crate::system::object::IObjectMethods;
798}