Skip to main content

engage/generated/moon_sharp/interpreter/interop/
propertytableassigner.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner-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/moon_sharp/interpreter/interop/propertytableassigner/PropertyTableAssigner.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.Interop", name = "PropertyTableAssigner")]
12    #[parent(crate::system::object::Object)]
13    pub struct PropertyTableAssigner {
14        #[offset(16)]
15        #[rename(name = "m_Type")]
16        pub m_type: ::unity::SystemType,
17        #[offset(24)]
18        #[rename(name = "m_PropertyMap")]
19        pub m_property_map: crate::system::collections::generic::dictionary_2::Dictionary_2<
20            ::unity::Il2CppString,
21            crate::system::reflection::propertyinfo::PropertyInfo,
22        >,
23        #[offset(32)]
24        #[rename(name = "m_SubAssigners")]
25        pub m_sub_assigners: crate::system::collections::generic::dictionary_2::Dictionary_2<
26            ::unity::SystemType,
27            crate::moon_sharp::interpreter::interop::ipropertytableassigner_interface::IPropertyTableAssigner_Interface,
28        >,
29    }
30}
31
32#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner-types")]
33pub use __types::*;
34
35#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner")]
36#[doc(hidden)]
37#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
38mod __PropertyTableAssigner_unity_raw {
39    use super::*;
40    #[doc(hidden)]
41    #[allow(non_snake_case)]
42    pub mod __lookup_ctor {
43        use super::*;
44        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
45            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
46                <::unity::SystemType as ::unity::IlType>::il_type(),
47                <::unity::Array<::unity::Il2CppString> as ::unity::IlType>::il_type(),
48            ];
49            ::unity::lookup::method_info_on_class_with_signature(
50                <PropertyTableAssigner as ::unity::ClassIdentity>::class(),
51                ".ctor",
52                2,
53                param_types,
54                false,
55            )
56        });
57        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
58            match &*METHOD {
59                ::core::result::Result::Ok(mi) => *mi,
60                ::core::result::Result::Err(e) => {
61                    panic!(
62                        "method lookup failed: {}
63::{}
64: {}
65",
66                        <PropertyTableAssigner as ::unity::ClassIdentity>::NAME,
67                        ".ctor",
68                        e
69                    )
70                },
71            }
72        }
73    }
74    #[doc(hidden)]
75    #[allow(non_snake_case)]
76    pub mod __lookup_add_expected_missing_property {
77        use super::*;
78        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
79            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<::unity::Il2CppString as ::unity::IlType>::il_type()];
80            ::unity::lookup::method_info_on_class_with_signature(
81                <PropertyTableAssigner as ::unity::ClassIdentity>::class(),
82                "AddExpectedMissingProperty",
83                1,
84                param_types,
85                false,
86            )
87        });
88        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
89            match &*METHOD {
90                ::core::result::Result::Ok(mi) => *mi,
91                ::core::result::Result::Err(e) => {
92                    panic!(
93                        "method lookup failed: {}
94::{}
95: {}
96",
97                        <PropertyTableAssigner as ::unity::ClassIdentity>::NAME,
98                        "AddExpectedMissingProperty",
99                        e
100                    )
101                },
102            }
103        }
104    }
105    #[doc(hidden)]
106    #[allow(non_snake_case)]
107    pub mod __lookup_try_assign_property {
108        use super::*;
109        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
110            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
111                <crate::system::object::Object as ::unity::IlType>::il_type(),
112                <::unity::Il2CppString as ::unity::IlType>::il_type(),
113                <crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type(),
114            ];
115            ::unity::lookup::method_info_on_class_with_signature(
116                <PropertyTableAssigner as ::unity::ClassIdentity>::class(),
117                "TryAssignProperty",
118                3,
119                param_types,
120                false,
121            )
122        });
123        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
124            match &*METHOD {
125                ::core::result::Result::Ok(mi) => *mi,
126                ::core::result::Result::Err(e) => {
127                    panic!(
128                        "method lookup failed: {}
129::{}
130: {}
131",
132                        <PropertyTableAssigner as ::unity::ClassIdentity>::NAME,
133                        "TryAssignProperty",
134                        e
135                    )
136                },
137            }
138        }
139    }
140    #[doc(hidden)]
141    #[allow(non_snake_case)]
142    pub mod __lookup_assign_property {
143        use super::*;
144        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
145            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
146                <crate::system::object::Object as ::unity::IlType>::il_type(),
147                <::unity::Il2CppString as ::unity::IlType>::il_type(),
148                <crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type(),
149            ];
150            ::unity::lookup::method_info_on_class_with_signature(
151                <PropertyTableAssigner as ::unity::ClassIdentity>::class(),
152                "AssignProperty",
153                3,
154                param_types,
155                false,
156            )
157        });
158        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
159            match &*METHOD {
160                ::core::result::Result::Ok(mi) => *mi,
161                ::core::result::Result::Err(e) => {
162                    panic!(
163                        "method lookup failed: {}
164::{}
165: {}
166",
167                        <PropertyTableAssigner as ::unity::ClassIdentity>::NAME,
168                        "AssignProperty",
169                        e
170                    )
171                },
172            }
173        }
174    }
175    #[doc(hidden)]
176    #[allow(non_snake_case)]
177    pub mod __lookup_assign_object {
178        use super::*;
179        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
180            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
181                <crate::system::object::Object as ::unity::IlType>::il_type(),
182                <crate::moon_sharp::interpreter::table::Table as ::unity::IlType>::il_type(),
183            ];
184            ::unity::lookup::method_info_on_class_with_signature(
185                <PropertyTableAssigner as ::unity::ClassIdentity>::class(),
186                "AssignObject",
187                2,
188                param_types,
189                false,
190            )
191        });
192        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
193            match &*METHOD {
194                ::core::result::Result::Ok(mi) => *mi,
195                ::core::result::Result::Err(e) => {
196                    panic!(
197                        "method lookup failed: {}
198::{}
199: {}
200",
201                        <PropertyTableAssigner as ::unity::ClassIdentity>::NAME,
202                        "AssignObject",
203                        e
204                    )
205                },
206            }
207        }
208    }
209    #[doc(hidden)]
210    #[allow(non_snake_case)]
211    pub mod __lookup_set_subassigner_for_type {
212        use super::*;
213        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
214            let param_types: &[& 'static::unity::il2cpp::Il2CppType]= &[< ::unity::SystemType as::unity::IlType> ::il_type(), <crate::moon_sharp::interpreter::interop::ipropertytableassigner_interface::IPropertyTableAssigner_Interface as::unity::IlType> ::il_type()];
215            ::unity::lookup::method_info_on_class_with_signature(
216                <PropertyTableAssigner as ::unity::ClassIdentity>::class(),
217                "SetSubassignerForType",
218                2,
219                param_types,
220                false,
221            )
222        });
223        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224            match &*METHOD {
225                ::core::result::Result::Ok(mi) => *mi,
226                ::core::result::Result::Err(e) => {
227                    panic!(
228                        "method lookup failed: {}
229::{}
230: {}
231",
232                        <PropertyTableAssigner as ::unity::ClassIdentity>::NAME,
233                        "SetSubassignerForType",
234                        e
235                    )
236                },
237            }
238        }
239    }
240}
241
242#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner")]
243pub trait IPropertyTableAssignerMethods: IPropertyTableAssigner {
244    #[doc = "`.ctor(::unity::SystemType, ::unity::Array<::unity::Il2CppString>)` overload"]
245    fn ctor(
246        self,
247        r#type: impl ::core::convert::Into<::unity::SystemType>,
248        expected_missing_properties: impl ::core::convert::Into<::unity::Array<::unity::Il2CppString>>,
249    ) -> () {
250        unsafe {
251            let __receiver = <PropertyTableAssigner as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
252            ::unity::il2cpp_call!(__PropertyTableAssigner_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
253(PropertyTableAssigner)__receiver,(::unity::SystemType)::core::convert::Into::into(r#type),(::unity::Array< ::unity::Il2CppString>)::core::convert::Into::into(expected_missing_properties))
254        }
255    }
256    #[doc = "`AddExpectedMissingProperty(::unity::Il2CppString)` overload"]
257    fn add_expected_missing_property(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
258        unsafe {
259            let __receiver = <PropertyTableAssigner as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
260            ::unity::il2cpp_call!(__PropertyTableAssigner_unity_raw::__lookup_add_expected_missing_property::get_method_info().method_ptr,();
261(PropertyTableAssigner)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
262        }
263    }
264    #[doc = "`TryAssignProperty(crate::system::object::Object, ::unity::Il2CppString, crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
265    fn try_assign_property(
266        self,
267        obj: impl ::core::convert::Into<crate::system::object::Object>,
268        name: impl ::core::convert::Into<::unity::Il2CppString>,
269        value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
270    ) -> bool {
271        unsafe {
272            let __receiver = <PropertyTableAssigner as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
273            ::unity::il2cpp_call!(__PropertyTableAssigner_unity_raw::__lookup_try_assign_property::get_method_info().method_ptr,bool;
274(PropertyTableAssigner)__receiver,(crate::system::object::Object)::core::convert::Into::into(obj),(::unity::Il2CppString)::core::convert::Into::into(name),(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
275        }
276    }
277    #[doc = "`AssignProperty(crate::system::object::Object, ::unity::Il2CppString, crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
278    fn assign_property(
279        self,
280        obj: impl ::core::convert::Into<crate::system::object::Object>,
281        name: impl ::core::convert::Into<::unity::Il2CppString>,
282        value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
283    ) -> () {
284        unsafe {
285            let __receiver = <PropertyTableAssigner as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
286            ::unity::il2cpp_call!(__PropertyTableAssigner_unity_raw::__lookup_assign_property::get_method_info().method_ptr,();
287(PropertyTableAssigner)__receiver,(crate::system::object::Object)::core::convert::Into::into(obj),(::unity::Il2CppString)::core::convert::Into::into(name),(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
288        }
289    }
290    #[doc = "`AssignObject(crate::system::object::Object, crate::moon_sharp::interpreter::table::Table)` overload"]
291    fn assign_object(
292        self,
293        obj: impl ::core::convert::Into<crate::system::object::Object>,
294        data: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>,
295    ) -> () {
296        unsafe {
297            let __receiver = <PropertyTableAssigner as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
298            ::unity::il2cpp_call!(__PropertyTableAssigner_unity_raw::__lookup_assign_object::get_method_info().method_ptr,();
299(PropertyTableAssigner)__receiver,(crate::system::object::Object)::core::convert::Into::into(obj),(crate::moon_sharp::interpreter::table::Table)::core::convert::Into::into(data))
300        }
301    }
302    #[doc = "`SetSubassignerForType(::unity::SystemType, crate::moon_sharp::interpreter::interop::ipropertytableassigner_interface::IPropertyTableAssigner_Interface)` overload"]
303    fn set_subassigner_for_type(
304        self,
305        property_type: impl ::core::convert::Into<::unity::SystemType>,
306        assigner: impl ::core::convert::Into<crate::moon_sharp::interpreter::interop::ipropertytableassigner_interface::IPropertyTableAssigner_Interface>,
307    ) -> () {
308        unsafe {
309            let __receiver = <PropertyTableAssigner as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
310            ::unity::il2cpp_call!(__PropertyTableAssigner_unity_raw::__lookup_set_subassigner_for_type::get_method_info().method_ptr,();
311(PropertyTableAssigner)__receiver,(::unity::SystemType)::core::convert::Into::into(property_type),(crate::moon_sharp::interpreter::interop::ipropertytableassigner_interface::IPropertyTableAssigner_Interface)::core::convert::Into::into(assigner))
312        }
313    }
314    #[doc = "`MoonSharp.Interpreter.Interop.IPropertyTableAssigner.AssignObjectUnchecked(crate::system::object::Object, crate::moon_sharp::interpreter::table::Table)` overload"]
315    fn moon_sharp_interpreter_interop_i_property_table_assigner_assign_object_unchecked(
316        self,
317        obj: impl ::core::convert::Into<crate::system::object::Object>,
318        data: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>,
319    ) -> () {
320        unsafe {
321            let __receiver = <PropertyTableAssigner as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
322            {
323                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
324                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
325                    panic!(
326                        "unity: virtual slot {}
327 out of range (vtable len {}
328) on the runtime class behind {}
329 (method `{}
330`)",
331                        4usize,
332                        __vt.len(),
333                        <PropertyTableAssigner as ::unity::ClassIdentity>::NAME,
334                        "MoonSharp.Interpreter.Interop.IPropertyTableAssigner.AssignObjectUnchecked",
335                    )
336                });
337                let __inner: extern "C" fn(
338                    PropertyTableAssigner,
339                    crate::system::object::Object,
340                    crate::moon_sharp::interpreter::table::Table,
341                    ::unity::OptionalMethod,
342                ) -> () = ::core::mem::transmute(__vi.method_ptr);
343                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
344                __inner(__receiver, ::core::convert::Into::into(obj), ::core::convert::Into::into(data), __mi)
345            }
346        }
347    }
348}
349
350#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner")]
351impl<__T: IPropertyTableAssigner> IPropertyTableAssignerMethods for __T {}
352
353#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner")]
354impl PropertyTableAssigner {
355    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
356        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
357    }
358
359    pub fn add_expected_missing_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
360        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
361    }
362
363    pub fn try_assign_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
364        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
365    }
366
367    pub fn assign_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
368        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
369    }
370
371    pub fn assign_object_method_info() -> &'static ::unity::il2cpp::MethodInfo {
372        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
373    }
374
375    pub fn set_subassigner_for_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
376        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
377    }
378
379    pub fn moon_sharp_interpreter_interop_i_property_table_assigner_assign_object_unchecked_method_info() -> &'static ::unity::il2cpp::MethodInfo {
380        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
381    }
382}
383
384#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner")]
385impl PropertyTableAssigner {
386    #[doc = "Direct (non-virtual) call to `PropertyTableAssigner`'s own `MoonSharp.Interpreter.Interop.IPropertyTableAssigner.AssignObjectUnchecked`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
387    pub unsafe fn moon_sharp_interpreter_interop_i_property_table_assigner_assign_object_unchecked(
388        this: impl ::core::convert::Into<::unity::IlInstance>,
389        obj: crate::system::object::Object,
390        data: crate::moon_sharp::interpreter::table::Table,
391    ) -> () {
392        let __mi = Self::moon_sharp_interpreter_interop_i_property_table_assigner_assign_object_unchecked_method_info();
393        let __inner: extern "C" fn(
394            ::unity::IlInstance,
395            crate::system::object::Object,
396            crate::moon_sharp::interpreter::table::Table,
397            ::unity::OptionalMethod,
398        ) -> () = ::core::mem::transmute(__mi.method_ptr);
399        __inner(this.into(), obj, data, ::core::option::Option::None)
400    }
401}
402
403#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner")]
404impl PropertyTableAssigner {
405    #[doc = "`.ctor(::unity::SystemType, ::unity::Array<::unity::Il2CppString>)` — overload selector"]
406    pub fn new(r#type: ::unity::SystemType, expected_missing_properties: ::unity::Array<::unity::Il2CppString>) -> Self {
407        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
408            panic!(
409                "{}
410::{}
411 failed to instantiate",
412                ::core::stringify!(PropertyTableAssigner),
413                ::core::stringify!(new),
414            )
415        });
416        <Self as IPropertyTableAssignerMethods>::ctor(this, r#type, expected_missing_properties);
417        this
418    }
419}
420
421#[cfg(feature = "moon_sharp-interpreter-interop-propertytableassigner")]
422#[doc(hidden)]
423pub mod prelude {
424    pub use super::{IPropertyTableAssigner, IPropertyTableAssignerMethods, PropertyTableAssigner};
425    pub use crate::system::object::IObject;
426    #[cfg(feature = "system-object")]
427    pub use crate::system::object::IObjectMethods;
428}