Skip to main content

engage/generated/system/collections/
readonlycollectionbase.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-collections-readonlycollectionbase-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/collections/readonlycollectionbase/ReadOnlyCollectionBase.md"))]
11    #[::unity::class(namespace = "System.Collections", name = "ReadOnlyCollectionBase")]
12    #[parent(crate::system::object::Object)]
13    pub struct ReadOnlyCollectionBase {
14        #[offset(16)]
15        #[rename(name = "list")]
16        pub list: crate::system::collections::arraylist::ArrayList,
17    }
18}
19
20#[cfg(feature = "system-collections-readonlycollectionbase-types")]
21pub use __types::*;
22
23#[cfg(feature = "system-collections-readonlycollectionbase")]
24pub trait IReadOnlyCollectionBaseMethods: IReadOnlyCollectionBase {
25    #[doc = "`get_InnerList()` overload"]
26    fn get_inner_list(self) -> crate::system::collections::arraylist::ArrayList {
27        unsafe {
28            let __receiver =
29                <ReadOnlyCollectionBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
30            ::unity::il2cpp_call!((::unity::module_base()+0x3ae48d0usize)as*mut u8,crate::system::collections::arraylist::ArrayList;
31(ReadOnlyCollectionBase)__receiver)
32        }
33    }
34    #[doc = "`get_Count()` overload"]
35    fn get_count(self) -> i32 {
36        unsafe {
37            let __receiver =
38                <ReadOnlyCollectionBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
39            {
40                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
41                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
42                    panic!(
43                        "unity: virtual slot {}
44 out of range (vtable len {}
45) on the runtime class behind {}
46 (method `{}
47`)",
48                        9usize,
49                        __vt.len(),
50                        <ReadOnlyCollectionBase as ::unity::ClassIdentity>::NAME,
51                        "get_Count",
52                    )
53                });
54                let __inner: extern "C" fn(ReadOnlyCollectionBase, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
55                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
56                __inner(__receiver, __mi)
57            }
58        }
59    }
60    #[doc = "`System.Collections.ICollection.get_IsSynchronized()` overload"]
61    fn system_collections_i_collection_get_is_synchronized(self) -> bool {
62        unsafe {
63            let __receiver =
64                <ReadOnlyCollectionBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65            {
66                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
67                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
68                    panic!(
69                        "unity: virtual slot {}
70 out of range (vtable len {}
71) on the runtime class behind {}
72 (method `{}
73`)",
74                        7usize,
75                        __vt.len(),
76                        <ReadOnlyCollectionBase as ::unity::ClassIdentity>::NAME,
77                        "System.Collections.ICollection.get_IsSynchronized",
78                    )
79                });
80                let __inner: extern "C" fn(ReadOnlyCollectionBase, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
81                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
82                __inner(__receiver, __mi)
83            }
84        }
85    }
86    #[doc = "`System.Collections.ICollection.get_SyncRoot()` overload"]
87    fn system_collections_i_collection_get_sync_root(self) -> crate::system::object::Object {
88        unsafe {
89            let __receiver =
90                <ReadOnlyCollectionBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
91            {
92                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
93                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
94                    panic!(
95                        "unity: virtual slot {}
96 out of range (vtable len {}
97) on the runtime class behind {}
98 (method `{}
99`)",
100                        6usize,
101                        __vt.len(),
102                        <ReadOnlyCollectionBase as ::unity::ClassIdentity>::NAME,
103                        "System.Collections.ICollection.get_SyncRoot",
104                    )
105                });
106                let __inner: extern "C" fn(ReadOnlyCollectionBase, ::unity::OptionalMethod) -> crate::system::object::Object =
107                    ::core::mem::transmute(__vi.method_ptr);
108                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
109                __inner(__receiver, __mi)
110            }
111        }
112    }
113    #[doc = "`System.Collections.ICollection.CopyTo(::unity::IlInstance, i32)` overload"]
114    fn system_collections_i_collection_copy_to(
115        self,
116        array: impl ::core::convert::Into<::unity::IlInstance>,
117        index: impl ::core::convert::Into<i32>,
118    ) -> () {
119        unsafe {
120            let __receiver =
121                <ReadOnlyCollectionBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122            {
123                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
125                    panic!(
126                        "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131                        4usize,
132                        __vt.len(),
133                        <ReadOnlyCollectionBase as ::unity::ClassIdentity>::NAME,
134                        "System.Collections.ICollection.CopyTo",
135                    )
136                });
137                let __inner: extern "C" fn(ReadOnlyCollectionBase, ::unity::IlInstance, i32, ::unity::OptionalMethod) -> () =
138                    ::core::mem::transmute(__vi.method_ptr);
139                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
140                __inner(__receiver, ::core::convert::Into::into(array), ::core::convert::Into::into(index), __mi)
141            }
142        }
143    }
144    #[doc = "`GetEnumerator()` overload"]
145    fn get_enumerator(self) -> crate::system::collections::ienumerator::IEnumerator {
146        unsafe {
147            let __receiver =
148                <ReadOnlyCollectionBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
149            {
150                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
151                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
152                    panic!(
153                        "unity: virtual slot {}
154 out of range (vtable len {}
155) on the runtime class behind {}
156 (method `{}
157`)",
158                        10usize,
159                        __vt.len(),
160                        <ReadOnlyCollectionBase as ::unity::ClassIdentity>::NAME,
161                        "GetEnumerator",
162                    )
163                });
164                let __inner: extern "C" fn(ReadOnlyCollectionBase, ::unity::OptionalMethod) -> crate::system::collections::ienumerator::IEnumerator =
165                    ::core::mem::transmute(__vi.method_ptr);
166                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
167                __inner(__receiver, __mi)
168            }
169        }
170    }
171    #[doc = "`.ctor()` overload"]
172    fn ctor(self) -> () {
173        unsafe {
174            let __receiver =
175                <ReadOnlyCollectionBase as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
176            ::unity::il2cpp_call!((::unity::module_base()+0x3ae4c00usize)as*mut u8,();
177(ReadOnlyCollectionBase)__receiver)
178        }
179    }
180}
181
182#[cfg(feature = "system-collections-readonlycollectionbase")]
183impl<__T: IReadOnlyCollectionBase> IReadOnlyCollectionBaseMethods for __T {}
184
185#[cfg(feature = "system-collections-readonlycollectionbase")]
186impl ReadOnlyCollectionBase {
187    pub fn get_inner_list_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
189    }
190
191    pub fn get_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
192        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
193    }
194
195    pub fn system_collections_i_collection_get_is_synchronized_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
197    }
198
199    pub fn system_collections_i_collection_get_sync_root_method_info() -> &'static ::unity::il2cpp::MethodInfo {
200        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
201    }
202
203    pub fn system_collections_i_collection_copy_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
204        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
205    }
206
207    pub fn get_enumerator_method_info() -> &'static ::unity::il2cpp::MethodInfo {
208        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
209    }
210
211    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
213    }
214}
215
216#[cfg(feature = "system-collections-readonlycollectionbase")]
217impl ReadOnlyCollectionBase {
218    #[doc = "Direct (non-virtual) call to `ReadOnlyCollectionBase`'s own `get_Count`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
219    pub unsafe fn get_count(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
220        let __mi = Self::get_count_method_info();
221        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
222        __inner(this.into(), ::core::option::Option::None)
223    }
224
225    #[doc = "Direct (non-virtual) call to `ReadOnlyCollectionBase`'s own `System.Collections.ICollection.get_IsSynchronized`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
226    pub unsafe fn system_collections_i_collection_get_is_synchronized(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
227        let __mi = Self::system_collections_i_collection_get_is_synchronized_method_info();
228        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
229        __inner(this.into(), ::core::option::Option::None)
230    }
231
232    #[doc = "Direct (non-virtual) call to `ReadOnlyCollectionBase`'s own `System.Collections.ICollection.get_SyncRoot`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
233    pub unsafe fn system_collections_i_collection_get_sync_root(
234        this: impl ::core::convert::Into<::unity::IlInstance>,
235    ) -> crate::system::object::Object {
236        let __mi = Self::system_collections_i_collection_get_sync_root_method_info();
237        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
238            ::core::mem::transmute(__mi.method_ptr);
239        __inner(this.into(), ::core::option::Option::None)
240    }
241
242    #[doc = "Direct (non-virtual) call to `ReadOnlyCollectionBase`'s own `System.Collections.ICollection.CopyTo`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
243    pub unsafe fn system_collections_i_collection_copy_to(
244        this: impl ::core::convert::Into<::unity::IlInstance>,
245        array: ::unity::IlInstance,
246        index: i32,
247    ) -> () {
248        let __mi = Self::system_collections_i_collection_copy_to_method_info();
249        let __inner: extern "C" fn(::unity::IlInstance, ::unity::IlInstance, i32, ::unity::OptionalMethod) -> () =
250            ::core::mem::transmute(__mi.method_ptr);
251        __inner(this.into(), array, index, ::core::option::Option::None)
252    }
253
254    #[doc = "Direct (non-virtual) call to `ReadOnlyCollectionBase`'s own `GetEnumerator`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
255    pub unsafe fn get_enumerator(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::collections::ienumerator::IEnumerator {
256        let __mi = Self::get_enumerator_method_info();
257        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::collections::ienumerator::IEnumerator =
258            ::core::mem::transmute(__mi.method_ptr);
259        __inner(this.into(), ::core::option::Option::None)
260    }
261}
262
263#[cfg(feature = "system-collections-readonlycollectionbase")]
264impl ReadOnlyCollectionBase {
265    #[doc = "`.ctor()` — no args"]
266    pub fn new() -> Self {
267        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
268            panic!(
269                "{}
270::{}
271 failed to instantiate",
272                ::core::stringify!(ReadOnlyCollectionBase),
273                ::core::stringify!(new),
274            )
275        });
276        <Self as IReadOnlyCollectionBaseMethods>::ctor(this);
277        this
278    }
279}
280
281#[cfg(feature = "system-collections-readonlycollectionbase")]
282#[doc(hidden)]
283pub mod prelude {
284    pub use super::{IReadOnlyCollectionBase, IReadOnlyCollectionBaseMethods, ReadOnlyCollectionBase};
285    pub use crate::system::object::IObject;
286    #[cfg(feature = "system-object")]
287    pub use crate::system::object::IObjectMethods;
288}