Skip to main content

engage/generated/system/collections/
idictionary.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-collections-idictionary-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/idictionary/IDictionary.md"))]
10    #[::unity::class(namespace = "System.Collections", name = "IDictionary")]
11    pub struct IDictionary {}
12}
13
14#[cfg(feature = "system-collections-idictionary-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-collections-idictionary")]
18pub trait IIDictionaryMethods: IIDictionary {
19    #[doc = "`get_Item(crate::system::object::Object)` overload"]
20    fn get_item(self, key: impl ::core::convert::Into<crate::system::object::Object>) -> crate::system::object::Object {
21        unsafe {
22            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
23            {
24                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
25                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
26                    panic!(
27                        "unity: virtual slot {}
28 out of range (vtable len {}
29) on the runtime class behind {}
30 (method `{}
31`)",
32                        0usize,
33                        __vt.len(),
34                        <IDictionary as ::unity::ClassIdentity>::NAME,
35                        "get_Item",
36                    )
37                });
38                let __inner: extern "C" fn(IDictionary, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
39                    ::core::mem::transmute(__vi.method_ptr);
40                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
41                __inner(__receiver, ::core::convert::Into::into(key), __mi)
42            }
43        }
44    }
45    #[doc = "`set_Item(crate::system::object::Object, crate::system::object::Object)` overload"]
46    fn set_item(
47        self,
48        key: impl ::core::convert::Into<crate::system::object::Object>,
49        value: impl ::core::convert::Into<crate::system::object::Object>,
50    ) -> () {
51        unsafe {
52            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
53            {
54                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
55                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
56                    panic!(
57                        "unity: virtual slot {}
58 out of range (vtable len {}
59) on the runtime class behind {}
60 (method `{}
61`)",
62                        1usize,
63                        __vt.len(),
64                        <IDictionary as ::unity::ClassIdentity>::NAME,
65                        "set_Item",
66                    )
67                });
68                let __inner: extern "C" fn(IDictionary, crate::system::object::Object, crate::system::object::Object, ::unity::OptionalMethod) -> () =
69                    ::core::mem::transmute(__vi.method_ptr);
70                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
71                __inner(__receiver, ::core::convert::Into::into(key), ::core::convert::Into::into(value), __mi)
72            }
73        }
74    }
75    #[doc = "`get_Keys()` overload"]
76    fn get_keys(self) -> crate::system::collections::icollection::ICollection {
77        unsafe {
78            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79            {
80                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
81                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
82                    panic!(
83                        "unity: virtual slot {}
84 out of range (vtable len {}
85) on the runtime class behind {}
86 (method `{}
87`)",
88                        2usize,
89                        __vt.len(),
90                        <IDictionary as ::unity::ClassIdentity>::NAME,
91                        "get_Keys",
92                    )
93                });
94                let __inner: extern "C" fn(IDictionary, ::unity::OptionalMethod) -> crate::system::collections::icollection::ICollection =
95                    ::core::mem::transmute(__vi.method_ptr);
96                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
97                __inner(__receiver, __mi)
98            }
99        }
100    }
101    #[doc = "`get_Values()` overload"]
102    fn get_values(self) -> crate::system::collections::icollection::ICollection {
103        unsafe {
104            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
105            {
106                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
107                let __vi = *__vt.get(3usize).unwrap_or_else(|| {
108                    panic!(
109                        "unity: virtual slot {}
110 out of range (vtable len {}
111) on the runtime class behind {}
112 (method `{}
113`)",
114                        3usize,
115                        __vt.len(),
116                        <IDictionary as ::unity::ClassIdentity>::NAME,
117                        "get_Values",
118                    )
119                });
120                let __inner: extern "C" fn(IDictionary, ::unity::OptionalMethod) -> crate::system::collections::icollection::ICollection =
121                    ::core::mem::transmute(__vi.method_ptr);
122                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
123                __inner(__receiver, __mi)
124            }
125        }
126    }
127    #[doc = "`Contains(crate::system::object::Object)` overload"]
128    fn contains(self, key: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
129        unsafe {
130            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
131            {
132                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
133                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
134                    panic!(
135                        "unity: virtual slot {}
136 out of range (vtable len {}
137) on the runtime class behind {}
138 (method `{}
139`)",
140                        4usize,
141                        __vt.len(),
142                        <IDictionary as ::unity::ClassIdentity>::NAME,
143                        "Contains",
144                    )
145                });
146                let __inner: extern "C" fn(IDictionary, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
147                    ::core::mem::transmute(__vi.method_ptr);
148                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
149                __inner(__receiver, ::core::convert::Into::into(key), __mi)
150            }
151        }
152    }
153    #[doc = "`Add(crate::system::object::Object, crate::system::object::Object)` overload"]
154    fn add(
155        self,
156        key: impl ::core::convert::Into<crate::system::object::Object>,
157        value: impl ::core::convert::Into<crate::system::object::Object>,
158    ) -> () {
159        unsafe {
160            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
161            {
162                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
163                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
164                    panic!(
165                        "unity: virtual slot {}
166 out of range (vtable len {}
167) on the runtime class behind {}
168 (method `{}
169`)",
170                        5usize,
171                        __vt.len(),
172                        <IDictionary as ::unity::ClassIdentity>::NAME,
173                        "Add",
174                    )
175                });
176                let __inner: extern "C" fn(IDictionary, crate::system::object::Object, crate::system::object::Object, ::unity::OptionalMethod) -> () =
177                    ::core::mem::transmute(__vi.method_ptr);
178                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
179                __inner(__receiver, ::core::convert::Into::into(key), ::core::convert::Into::into(value), __mi)
180            }
181        }
182    }
183    #[doc = "`get_IsReadOnly()` overload"]
184    fn get_is_read_only(self) -> bool {
185        unsafe {
186            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187            {
188                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
189                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
190                    panic!(
191                        "unity: virtual slot {}
192 out of range (vtable len {}
193) on the runtime class behind {}
194 (method `{}
195`)",
196                        6usize,
197                        __vt.len(),
198                        <IDictionary as ::unity::ClassIdentity>::NAME,
199                        "get_IsReadOnly",
200                    )
201                });
202                let __inner: extern "C" fn(IDictionary, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
203                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
204                __inner(__receiver, __mi)
205            }
206        }
207    }
208    #[doc = "`get_IsFixedSize()` overload"]
209    fn get_is_fixed_size(self) -> bool {
210        unsafe {
211            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
212            {
213                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
214                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
215                    panic!(
216                        "unity: virtual slot {}
217 out of range (vtable len {}
218) on the runtime class behind {}
219 (method `{}
220`)",
221                        7usize,
222                        __vt.len(),
223                        <IDictionary as ::unity::ClassIdentity>::NAME,
224                        "get_IsFixedSize",
225                    )
226                });
227                let __inner: extern "C" fn(IDictionary, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
228                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
229                __inner(__receiver, __mi)
230            }
231        }
232    }
233    #[doc = "`GetEnumerator()` overload"]
234    fn get_enumerator(self) -> crate::system::collections::idictionaryenumerator::IDictionaryEnumerator {
235        unsafe {
236            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
237            {
238                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
239                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
240                    panic!(
241                        "unity: virtual slot {}
242 out of range (vtable len {}
243) on the runtime class behind {}
244 (method `{}
245`)",
246                        8usize,
247                        __vt.len(),
248                        <IDictionary as ::unity::ClassIdentity>::NAME,
249                        "GetEnumerator",
250                    )
251                });
252                let __inner: extern "C" fn(
253                    IDictionary,
254                    ::unity::OptionalMethod,
255                ) -> crate::system::collections::idictionaryenumerator::IDictionaryEnumerator = ::core::mem::transmute(__vi.method_ptr);
256                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
257                __inner(__receiver, __mi)
258            }
259        }
260    }
261    #[doc = "`Remove(crate::system::object::Object)` overload"]
262    fn remove(self, key: impl ::core::convert::Into<crate::system::object::Object>) -> () {
263        unsafe {
264            let __receiver = <IDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
265            {
266                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
267                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
268                    panic!(
269                        "unity: virtual slot {}
270 out of range (vtable len {}
271) on the runtime class behind {}
272 (method `{}
273`)",
274                        9usize,
275                        __vt.len(),
276                        <IDictionary as ::unity::ClassIdentity>::NAME,
277                        "Remove",
278                    )
279                });
280                let __inner: extern "C" fn(IDictionary, crate::system::object::Object, ::unity::OptionalMethod) -> () =
281                    ::core::mem::transmute(__vi.method_ptr);
282                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
283                __inner(__receiver, ::core::convert::Into::into(key), __mi)
284            }
285        }
286    }
287}
288
289#[cfg(feature = "system-collections-idictionary")]
290impl<__T: IIDictionary> IIDictionaryMethods for __T {}
291
292#[cfg(feature = "system-collections-idictionary")]
293impl IDictionary {
294    pub fn get_item_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
296    }
297
298    pub fn set_item_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
300    }
301
302    pub fn get_keys_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
304    }
305
306    pub fn get_values_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
308    }
309
310    pub fn contains_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
312    }
313
314    pub fn add_method_info() -> &'static ::unity::il2cpp::MethodInfo {
315        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
316    }
317
318    pub fn get_is_read_only_method_info() -> &'static ::unity::il2cpp::MethodInfo {
319        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
320    }
321
322    pub fn get_is_fixed_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
323        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
324    }
325
326    pub fn get_enumerator_method_info() -> &'static ::unity::il2cpp::MethodInfo {
327        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
328    }
329
330    pub fn remove_method_info() -> &'static ::unity::il2cpp::MethodInfo {
331        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
332    }
333}
334
335#[cfg(feature = "system-collections-idictionary")]
336impl IDictionary {
337    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `get_Item`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
338    pub unsafe fn get_item(
339        this: impl ::core::convert::Into<::unity::IlInstance>,
340        key: crate::system::object::Object,
341    ) -> crate::system::object::Object {
342        let __mi = Self::get_item_method_info();
343        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> crate::system::object::Object =
344            ::core::mem::transmute(__mi.method_ptr);
345        __inner(this.into(), key, ::core::option::Option::None)
346    }
347
348    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `set_Item`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
349    pub unsafe fn set_item(
350        this: impl ::core::convert::Into<::unity::IlInstance>,
351        key: crate::system::object::Object,
352        value: crate::system::object::Object,
353    ) -> () {
354        let __mi = Self::set_item_method_info();
355        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, crate::system::object::Object, ::unity::OptionalMethod) -> () =
356            ::core::mem::transmute(__mi.method_ptr);
357        __inner(this.into(), key, value, ::core::option::Option::None)
358    }
359
360    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `get_Keys`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
361    pub unsafe fn get_keys(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::collections::icollection::ICollection {
362        let __mi = Self::get_keys_method_info();
363        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::collections::icollection::ICollection =
364            ::core::mem::transmute(__mi.method_ptr);
365        __inner(this.into(), ::core::option::Option::None)
366    }
367
368    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `get_Values`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
369    pub unsafe fn get_values(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::collections::icollection::ICollection {
370        let __mi = Self::get_values_method_info();
371        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::collections::icollection::ICollection =
372            ::core::mem::transmute(__mi.method_ptr);
373        __inner(this.into(), ::core::option::Option::None)
374    }
375
376    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `Contains`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
377    pub unsafe fn contains(this: impl ::core::convert::Into<::unity::IlInstance>, key: crate::system::object::Object) -> bool {
378        let __mi = Self::contains_method_info();
379        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
380            ::core::mem::transmute(__mi.method_ptr);
381        __inner(this.into(), key, ::core::option::Option::None)
382    }
383
384    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `Add`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
385    pub unsafe fn add(
386        this: impl ::core::convert::Into<::unity::IlInstance>,
387        key: crate::system::object::Object,
388        value: crate::system::object::Object,
389    ) -> () {
390        let __mi = Self::add_method_info();
391        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, crate::system::object::Object, ::unity::OptionalMethod) -> () =
392            ::core::mem::transmute(__mi.method_ptr);
393        __inner(this.into(), key, value, ::core::option::Option::None)
394    }
395
396    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `get_IsReadOnly`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
397    pub unsafe fn get_is_read_only(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
398        let __mi = Self::get_is_read_only_method_info();
399        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
400        __inner(this.into(), ::core::option::Option::None)
401    }
402
403    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `get_IsFixedSize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
404    pub unsafe fn get_is_fixed_size(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
405        let __mi = Self::get_is_fixed_size_method_info();
406        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
407        __inner(this.into(), ::core::option::Option::None)
408    }
409
410    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `GetEnumerator`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
411    pub unsafe fn get_enumerator(
412        this: impl ::core::convert::Into<::unity::IlInstance>,
413    ) -> crate::system::collections::idictionaryenumerator::IDictionaryEnumerator {
414        let __mi = Self::get_enumerator_method_info();
415        let __inner: extern "C" fn(
416            ::unity::IlInstance,
417            ::unity::OptionalMethod,
418        ) -> crate::system::collections::idictionaryenumerator::IDictionaryEnumerator = ::core::mem::transmute(__mi.method_ptr);
419        __inner(this.into(), ::core::option::Option::None)
420    }
421
422    #[doc = "Direct (non-virtual) call to `IDictionary`'s own `Remove`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
423    pub unsafe fn remove(this: impl ::core::convert::Into<::unity::IlInstance>, key: crate::system::object::Object) -> () {
424        let __mi = Self::remove_method_info();
425        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> () =
426            ::core::mem::transmute(__mi.method_ptr);
427        __inner(this.into(), key, ::core::option::Option::None)
428    }
429}
430
431#[cfg(feature = "system-collections-idictionary")]
432#[doc(hidden)]
433pub mod prelude {
434    pub use super::{IDictionary, IIDictionary, IIDictionaryMethods};
435}