Skip to main content

engage/generated/moon_sharp/interpreter/
closure.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-closure-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        moon_sharp::interpreter::refidobject::{IRefIdObject, RefIdObject},
10        system::{
11            object::{IObject, Object},
12            r#enum::{Enum, IEnum},
13            valuetype::{IValueType, ValueType},
14        },
15    };
16
17    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/closure/Closure_UpvaluesType.md"))]
18    #[repr(C)]
19    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
20    pub struct Closure_UpvaluesType {
21        pub value: i32,
22    }
23    impl ::unity::ClassIdentity for Closure_UpvaluesType {
24        const NAME: &'static str = "Closure.UpvaluesType";
25        const NAMESPACE: &'static str = "MoonSharp.Interpreter";
26
27        fn class() -> ::unity::Class {
28            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
29            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
30        }
31    }
32    impl ::unity::IlType for Closure_UpvaluesType {
33        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
34            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
35        }
36    }
37    impl Closure_UpvaluesType {
38        pub fn none() -> Self {
39            Self { value: 0 }
40        }
41
42        pub fn environment() -> Self {
43            Self { value: 1 }
44        }
45
46        pub fn closure() -> Self {
47            Self { value: 2 }
48        }
49    }
50
51    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/closure/Closure.md"))]
52    #[::unity::class(namespace = "MoonSharp.Interpreter", name = "Closure")]
53    #[parent(crate::moon_sharp::interpreter::refidobject::RefIdObject)]
54    pub struct Closure {
55        #[static_field]
56        #[rename(name = "emptyClosure")]
57        pub empty_closure: crate::moon_sharp::interpreter::execution::closurecontext::ClosureContext,
58    }
59}
60
61#[cfg(feature = "moon_sharp-interpreter-closure-types")]
62pub use __types::*;
63
64#[cfg(feature = "moon_sharp-interpreter-closure")]
65#[doc(hidden)]
66#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
67mod __Closure_unity_raw {
68    use super::*;
69    #[doc(hidden)]
70    #[allow(non_snake_case)]
71    pub mod __lookup_get_entry_point_byte_code_location {
72        use super::*;
73        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
74            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
75            ::unity::lookup::method_info_on_class_with_signature(
76                <Closure as ::unity::ClassIdentity>::class(),
77                "get_EntryPointByteCodeLocation",
78                0,
79                param_types,
80                false,
81            )
82        });
83        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
84            match &*METHOD {
85                ::core::result::Result::Ok(mi) => *mi,
86                ::core::result::Result::Err(e) => {
87                    panic!(
88                        "method lookup failed: {}
89::{}
90: {}
91",
92                        <Closure as ::unity::ClassIdentity>::NAME,
93                        "get_EntryPointByteCodeLocation",
94                        e
95                    )
96                },
97            }
98        }
99    }
100    #[doc(hidden)]
101    #[allow(non_snake_case)]
102    pub mod __lookup_set_entry_point_byte_code_location {
103        use super::*;
104        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
105            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<i32 as ::unity::IlType>::il_type()];
106            ::unity::lookup::method_info_on_class_with_signature(
107                <Closure as ::unity::ClassIdentity>::class(),
108                "set_EntryPointByteCodeLocation",
109                1,
110                param_types,
111                false,
112            )
113        });
114        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115            match &*METHOD {
116                ::core::result::Result::Ok(mi) => *mi,
117                ::core::result::Result::Err(e) => {
118                    panic!(
119                        "method lookup failed: {}
120::{}
121: {}
122",
123                        <Closure as ::unity::ClassIdentity>::NAME,
124                        "set_EntryPointByteCodeLocation",
125                        e
126                    )
127                },
128            }
129        }
130    }
131    #[doc(hidden)]
132    #[allow(non_snake_case)]
133    pub mod __lookup_set_owner_script {
134        use super::*;
135        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
136            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
137                &[<crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type()];
138            ::unity::lookup::method_info_on_class_with_signature(
139                <Closure as ::unity::ClassIdentity>::class(),
140                "set_OwnerScript",
141                1,
142                param_types,
143                false,
144            )
145        });
146        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
147            match &*METHOD {
148                ::core::result::Result::Ok(mi) => *mi,
149                ::core::result::Result::Err(e) => {
150                    panic!(
151                        "method lookup failed: {}
152::{}
153: {}
154",
155                        <Closure as ::unity::ClassIdentity>::NAME,
156                        "set_OwnerScript",
157                        e
158                    )
159                },
160            }
161        }
162    }
163    #[doc(hidden)]
164    #[allow(non_snake_case)]
165    pub mod __lookup_get_closure_context {
166        use super::*;
167        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
168            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
169            ::unity::lookup::method_info_on_class_with_signature(
170                <Closure as ::unity::ClassIdentity>::class(),
171                "get_ClosureContext",
172                0,
173                param_types,
174                false,
175            )
176        });
177        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178            match &*METHOD {
179                ::core::result::Result::Ok(mi) => *mi,
180                ::core::result::Result::Err(e) => {
181                    panic!(
182                        "method lookup failed: {}
183::{}
184: {}
185",
186                        <Closure as ::unity::ClassIdentity>::NAME,
187                        "get_ClosureContext",
188                        e
189                    )
190                },
191            }
192        }
193    }
194    #[doc(hidden)]
195    #[allow(non_snake_case)]
196    pub mod __lookup_set_closure_context {
197        use super::*;
198        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
199            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
200                &[<crate::moon_sharp::interpreter::execution::closurecontext::ClosureContext as ::unity::IlType>::il_type()];
201            ::unity::lookup::method_info_on_class_with_signature(
202                <Closure as ::unity::ClassIdentity>::class(),
203                "set_ClosureContext",
204                1,
205                param_types,
206                false,
207            )
208        });
209        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210            match &*METHOD {
211                ::core::result::Result::Ok(mi) => *mi,
212                ::core::result::Result::Err(e) => {
213                    panic!(
214                        "method lookup failed: {}
215::{}
216: {}
217",
218                        <Closure as ::unity::ClassIdentity>::NAME,
219                        "set_ClosureContext",
220                        e
221                    )
222                },
223            }
224        }
225    }
226    #[doc(hidden)]
227    #[allow(non_snake_case)]
228    pub mod __lookup_ctor {
229        use super::*;
230        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
231            let param_types: &[& 'static::unity::il2cpp::Il2CppType]= &[<crate::moon_sharp::interpreter::script::Script as::unity::IlType> ::il_type(), <i32 as::unity::IlType> ::il_type(), < ::unity::Array<crate::moon_sharp::interpreter::symbolref::SymbolRef>as::unity::IlType> ::il_type(), <crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::moon_sharp::interpreter::dynvalue::DynValue>as::unity::IlType> ::il_type()];
232            ::unity::lookup::method_info_on_class_with_signature(<Closure as ::unity::ClassIdentity>::class(), ".ctor", 4, param_types, false)
233        });
234        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
235            match &*METHOD {
236                ::core::result::Result::Ok(mi) => *mi,
237                ::core::result::Result::Err(e) => {
238                    panic!(
239                        "method lookup failed: {}
240::{}
241: {}
242",
243                        <Closure as ::unity::ClassIdentity>::NAME,
244                        ".ctor",
245                        e
246                    )
247                },
248            }
249        }
250    }
251    #[doc(hidden)]
252    #[allow(non_snake_case)]
253    pub mod __lookup_call {
254        use super::*;
255        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
256            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
257            ::unity::lookup::method_info_on_class_with_signature(<Closure as ::unity::ClassIdentity>::class(), "Call", 0, param_types, false)
258        });
259        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
260            match &*METHOD {
261                ::core::result::Result::Ok(mi) => *mi,
262                ::core::result::Result::Err(e) => {
263                    panic!(
264                        "method lookup failed: {}
265::{}
266: {}
267",
268                        <Closure as ::unity::ClassIdentity>::NAME,
269                        "Call",
270                        e
271                    )
272                },
273            }
274        }
275    }
276    #[doc(hidden)]
277    #[allow(non_snake_case)]
278    pub mod __lookup_call_2 {
279        use super::*;
280        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
281            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
282                &[<::unity::Array<crate::system::object::Object> as ::unity::IlType>::il_type()];
283            ::unity::lookup::method_info_on_class_with_signature(<Closure as ::unity::ClassIdentity>::class(), "Call", 1, param_types, false)
284        });
285        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286            match &*METHOD {
287                ::core::result::Result::Ok(mi) => *mi,
288                ::core::result::Result::Err(e) => {
289                    panic!(
290                        "method lookup failed: {}
291::{}
292: {}
293",
294                        <Closure as ::unity::ClassIdentity>::NAME,
295                        "Call",
296                        e
297                    )
298                },
299            }
300        }
301    }
302    #[doc(hidden)]
303    #[allow(non_snake_case)]
304    pub mod __lookup_call_3 {
305        use super::*;
306        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
307            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
308                &[<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue> as ::unity::IlType>::il_type()];
309            ::unity::lookup::method_info_on_class_with_signature(<Closure as ::unity::ClassIdentity>::class(), "Call", 1, param_types, false)
310        });
311        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
312            match &*METHOD {
313                ::core::result::Result::Ok(mi) => *mi,
314                ::core::result::Result::Err(e) => {
315                    panic!(
316                        "method lookup failed: {}
317::{}
318: {}
319",
320                        <Closure as ::unity::ClassIdentity>::NAME,
321                        "Call",
322                        e
323                    )
324                },
325            }
326        }
327    }
328    #[doc(hidden)]
329    #[allow(non_snake_case)]
330    pub mod __lookup_get_delegate {
331        use super::*;
332        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
333            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
334            ::unity::lookup::method_info_on_class_with_signature(<Closure as ::unity::ClassIdentity>::class(), "GetDelegate", 0, param_types, false)
335        });
336        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
337            match &*METHOD {
338                ::core::result::Result::Ok(mi) => *mi,
339                ::core::result::Result::Err(e) => {
340                    panic!(
341                        "method lookup failed: {}
342::{}
343: {}
344",
345                        <Closure as ::unity::ClassIdentity>::NAME,
346                        "GetDelegate",
347                        e
348                    )
349                },
350            }
351        }
352    }
353    #[doc(hidden)]
354    #[allow(non_snake_case)]
355    pub mod __lookup_get_upvalues_count {
356        use super::*;
357        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
358            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
359            ::unity::lookup::method_info_on_class_with_signature(
360                <Closure as ::unity::ClassIdentity>::class(),
361                "GetUpvaluesCount",
362                0,
363                param_types,
364                false,
365            )
366        });
367        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
368            match &*METHOD {
369                ::core::result::Result::Ok(mi) => *mi,
370                ::core::result::Result::Err(e) => {
371                    panic!(
372                        "method lookup failed: {}
373::{}
374: {}
375",
376                        <Closure as ::unity::ClassIdentity>::NAME,
377                        "GetUpvaluesCount",
378                        e
379                    )
380                },
381            }
382        }
383    }
384    #[doc(hidden)]
385    #[allow(non_snake_case)]
386    pub mod __lookup_get_upvalue_name {
387        use super::*;
388        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
389            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<i32 as ::unity::IlType>::il_type()];
390            ::unity::lookup::method_info_on_class_with_signature(
391                <Closure as ::unity::ClassIdentity>::class(),
392                "GetUpvalueName",
393                1,
394                param_types,
395                false,
396            )
397        });
398        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
399            match &*METHOD {
400                ::core::result::Result::Ok(mi) => *mi,
401                ::core::result::Result::Err(e) => {
402                    panic!(
403                        "method lookup failed: {}
404::{}
405: {}
406",
407                        <Closure as ::unity::ClassIdentity>::NAME,
408                        "GetUpvalueName",
409                        e
410                    )
411                },
412            }
413        }
414    }
415    #[doc(hidden)]
416    #[allow(non_snake_case)]
417    pub mod __lookup_get_upvalue {
418        use super::*;
419        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
420            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<i32 as ::unity::IlType>::il_type()];
421            ::unity::lookup::method_info_on_class_with_signature(<Closure as ::unity::ClassIdentity>::class(), "GetUpvalue", 1, param_types, false)
422        });
423        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
424            match &*METHOD {
425                ::core::result::Result::Ok(mi) => *mi,
426                ::core::result::Result::Err(e) => {
427                    panic!(
428                        "method lookup failed: {}
429::{}
430: {}
431",
432                        <Closure as ::unity::ClassIdentity>::NAME,
433                        "GetUpvalue",
434                        e
435                    )
436                },
437            }
438        }
439    }
440    #[doc(hidden)]
441    #[allow(non_snake_case)]
442    pub mod __lookup_get_upvalues_type {
443        use super::*;
444        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
445            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
446            ::unity::lookup::method_info_on_class_with_signature(
447                <Closure as ::unity::ClassIdentity>::class(),
448                "GetUpvaluesType",
449                0,
450                param_types,
451                false,
452            )
453        });
454        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
455            match &*METHOD {
456                ::core::result::Result::Ok(mi) => *mi,
457                ::core::result::Result::Err(e) => {
458                    panic!(
459                        "method lookup failed: {}
460::{}
461: {}
462",
463                        <Closure as ::unity::ClassIdentity>::NAME,
464                        "GetUpvaluesType",
465                        e
466                    )
467                },
468            }
469        }
470    }
471    #[doc(hidden)]
472    #[allow(non_snake_case)]
473    pub mod __lookup_cctor {
474        use super::*;
475        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
476            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
477            ::unity::lookup::method_info_on_class_with_signature(<Closure as ::unity::ClassIdentity>::class(), ".cctor", 0, param_types, true)
478        });
479        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
480            match &*METHOD {
481                ::core::result::Result::Ok(mi) => *mi,
482                ::core::result::Result::Err(e) => {
483                    panic!(
484                        "method lookup failed: {}
485::{}
486: {}
487",
488                        <Closure as ::unity::ClassIdentity>::NAME,
489                        ".cctor",
490                        e
491                    )
492                },
493            }
494        }
495    }
496}
497
498#[cfg(feature = "moon_sharp-interpreter-closure")]
499impl Closure {
500    #[doc = "`.cctor()` overload"]
501    pub fn cctor() -> () {
502        unsafe {
503            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_cctor::get_method_info().method_ptr,();
504            )
505        }
506    }
507}
508
509#[cfg(feature = "moon_sharp-interpreter-closure")]
510pub trait IClosureMethods: IClosure {
511    #[doc = "`get_EntryPointByteCodeLocation()` overload"]
512    fn get_entry_point_byte_code_location(self) -> i32 {
513        unsafe {
514            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
515            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_get_entry_point_byte_code_location::get_method_info().method_ptr,i32;
516(Closure)__receiver)
517        }
518    }
519    #[doc = "`set_EntryPointByteCodeLocation(i32)` overload"]
520    fn set_entry_point_byte_code_location(self, value: impl ::core::convert::Into<i32>) -> () {
521        unsafe {
522            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
523            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_set_entry_point_byte_code_location::get_method_info().method_ptr,();
524(Closure)__receiver,(i32)::core::convert::Into::into(value))
525        }
526    }
527    #[doc = "`get_OwnerScript()` overload"]
528    fn get_owner_script(self) -> crate::moon_sharp::interpreter::script::Script {
529        unsafe {
530            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
531            {
532                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
533                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
534                    panic!(
535                        "unity: virtual slot {}
536 out of range (vtable len {}
537) on the runtime class behind {}
538 (method `{}
539`)",
540                        4usize,
541                        __vt.len(),
542                        <Closure as ::unity::ClassIdentity>::NAME,
543                        "get_OwnerScript",
544                    )
545                });
546                let __inner: extern "C" fn(Closure, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
547                    ::core::mem::transmute(__vi.method_ptr);
548                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
549                __inner(__receiver, __mi)
550            }
551        }
552    }
553    #[doc = "`set_OwnerScript(crate::moon_sharp::interpreter::script::Script)` overload"]
554    fn set_owner_script(self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>) -> () {
555        unsafe {
556            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
557            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_set_owner_script::get_method_info().method_ptr,();
558(Closure)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(value))
559        }
560    }
561    #[doc = "`get_ClosureContext()` overload"]
562    fn get_closure_context(self) -> crate::moon_sharp::interpreter::execution::closurecontext::ClosureContext {
563        unsafe {
564            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
565            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_get_closure_context::get_method_info().method_ptr,crate::moon_sharp::interpreter::execution::closurecontext::ClosureContext;
566(Closure)__receiver)
567        }
568    }
569    #[doc = "`set_ClosureContext(crate::moon_sharp::interpreter::execution::closurecontext::ClosureContext)` overload"]
570    fn set_closure_context(self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::closurecontext::ClosureContext>) -> () {
571        unsafe {
572            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
573            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_set_closure_context::get_method_info().method_ptr,();
574(Closure)__receiver,(crate::moon_sharp::interpreter::execution::closurecontext::ClosureContext)::core::convert::Into::into(value))
575        }
576    }
577    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, i32, ::unity::Array<crate::moon_sharp::interpreter::symbolref::SymbolRef>, crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::moon_sharp::interpreter::dynvalue::DynValue>)` overload"]
578    fn ctor(
579        self,
580        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
581        idx: impl ::core::convert::Into<i32>,
582        symbols: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::symbolref::SymbolRef>>,
583        resolved_locals: impl ::core::convert::Into<
584            crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::moon_sharp::interpreter::dynvalue::DynValue>,
585        >,
586    ) -> () {
587        unsafe {
588            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
589            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
590(Closure)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(i32)::core::convert::Into::into(idx),(::unity::Array<crate::moon_sharp::interpreter::symbolref::SymbolRef>)::core::convert::Into::into(symbols),(crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(resolved_locals))
591        }
592    }
593    #[doc = "`Call()` overload"]
594    fn call(self) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
595        unsafe {
596            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
597            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_call::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
598(Closure)__receiver)
599        }
600    }
601    #[doc = "`Call(::unity::Array<crate::system::object::Object>)` overload"]
602    fn call_2(
603        self,
604        args: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>,
605    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
606        unsafe {
607            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
608            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_call_2::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
609(Closure)__receiver,(::unity::Array<crate::system::object::Object>)::core::convert::Into::into(args))
610        }
611    }
612    #[doc = "`Call(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)` overload"]
613    fn call_3(
614        self,
615        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
616    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
617        unsafe {
618            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
619            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_call_3::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
620(Closure)__receiver,(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args))
621        }
622    }
623    #[doc = "`GetDelegate()` overload"]
624    fn get_delegate(self) -> crate::moon_sharp::interpreter::scriptfunctiondelegate::ScriptFunctionDelegate {
625        unsafe {
626            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
627            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_get_delegate::get_method_info().method_ptr,crate::moon_sharp::interpreter::scriptfunctiondelegate::ScriptFunctionDelegate;
628(Closure)__receiver)
629        }
630    }
631    #[doc = "`GetUpvaluesCount()` overload"]
632    fn get_upvalues_count(self) -> i32 {
633        unsafe {
634            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
635            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_get_upvalues_count::get_method_info().method_ptr,i32;
636(Closure)__receiver)
637        }
638    }
639    #[doc = "`GetUpvalueName(i32)` overload"]
640    fn get_upvalue_name(self, idx: impl ::core::convert::Into<i32>) -> ::unity::Il2CppString {
641        unsafe {
642            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
643            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_get_upvalue_name::get_method_info().method_ptr, ::unity::Il2CppString;
644(Closure)__receiver,(i32)::core::convert::Into::into(idx))
645        }
646    }
647    #[doc = "`GetUpvalue(i32)` overload"]
648    fn get_upvalue(self, idx: impl ::core::convert::Into<i32>) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
649        unsafe {
650            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
651            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_get_upvalue::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
652(Closure)__receiver,(i32)::core::convert::Into::into(idx))
653        }
654    }
655    #[doc = "`GetUpvaluesType()` overload"]
656    fn get_upvalues_type(self) -> crate::moon_sharp::interpreter::closure::Closure_UpvaluesType {
657        unsafe {
658            let __receiver = <Closure as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
659            ::unity::il2cpp_call!(__Closure_unity_raw::__lookup_get_upvalues_type::get_method_info().method_ptr,crate::moon_sharp::interpreter::closure::Closure_UpvaluesType;
660(Closure)__receiver)
661        }
662    }
663}
664
665#[cfg(feature = "moon_sharp-interpreter-closure")]
666impl<__T: IClosure> IClosureMethods for __T {}
667
668#[cfg(feature = "moon_sharp-interpreter-closure")]
669impl Closure {
670    pub fn get_entry_point_byte_code_location_method_info() -> &'static ::unity::il2cpp::MethodInfo {
671        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
672    }
673
674    pub fn set_entry_point_byte_code_location_method_info() -> &'static ::unity::il2cpp::MethodInfo {
675        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
676    }
677
678    pub fn get_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
679        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
680    }
681
682    pub fn set_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
683        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
684    }
685
686    pub fn get_closure_context_method_info() -> &'static ::unity::il2cpp::MethodInfo {
687        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
688    }
689
690    pub fn set_closure_context_method_info() -> &'static ::unity::il2cpp::MethodInfo {
691        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
692    }
693
694    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
695        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
696    }
697
698    pub fn call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
699        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
700    }
701
702    pub fn call_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
703        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
704    }
705
706    pub fn call_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
707        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
708    }
709
710    pub fn get_delegate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
711        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
712    }
713
714    pub fn get_upvalues_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
715        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
716    }
717
718    pub fn get_upvalue_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
719        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
720    }
721
722    pub fn get_upvalue_method_info() -> &'static ::unity::il2cpp::MethodInfo {
723        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
724    }
725
726    pub fn get_upvalues_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
727        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
728    }
729
730    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
731        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
732    }
733}
734
735#[cfg(feature = "moon_sharp-interpreter-closure")]
736impl Closure {
737    #[doc = "Direct (non-virtual) call to `Closure`'s own `get_OwnerScript`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
738    pub unsafe fn get_owner_script(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::moon_sharp::interpreter::script::Script {
739        let __mi = Self::get_owner_script_method_info();
740        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
741            ::core::mem::transmute(__mi.method_ptr);
742        __inner(this.into(), ::core::option::Option::None)
743    }
744}
745
746#[cfg(feature = "moon_sharp-interpreter-closure")]
747impl Closure {
748    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, i32, ::unity::Array<crate::moon_sharp::interpreter::symbolref::SymbolRef>, crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::moon_sharp::interpreter::dynvalue::DynValue>)` — overload selector"]
749    pub fn new(
750        script: crate::moon_sharp::interpreter::script::Script,
751        idx: i32,
752        symbols: ::unity::Array<crate::moon_sharp::interpreter::symbolref::SymbolRef>,
753        resolved_locals: crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::moon_sharp::interpreter::dynvalue::DynValue>,
754    ) -> Self {
755        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
756            panic!(
757                "{}
758::{}
759 failed to instantiate",
760                ::core::stringify!(Closure),
761                ::core::stringify!(new),
762            )
763        });
764        <Self as IClosureMethods>::ctor(this, script, idx, symbols, resolved_locals);
765        this
766    }
767}
768
769#[cfg(feature = "moon_sharp-interpreter-closure")]
770#[doc(hidden)]
771pub mod prelude {
772    pub use super::{Closure, Closure_UpvaluesType, IClosure, IClosureMethods};
773    #[cfg(feature = "moon_sharp-interpreter-refidobject")]
774    pub use crate::moon_sharp::interpreter::refidobject::IRefIdObjectMethods;
775    #[cfg(feature = "system-object")]
776    pub use crate::system::object::IObjectMethods;
777    #[cfg(feature = "system-enum")]
778    pub use crate::system::r#enum::IEnumMethods;
779    #[cfg(feature = "system-valuetype")]
780    pub use crate::system::valuetype::IValueTypeMethods;
781    pub use crate::{
782        moon_sharp::interpreter::refidobject::IRefIdObject,
783        system::{object::IObject, r#enum::IEnum, valuetype::IValueType},
784    };
785}