engage/generated/system/collections/specialized/
stringdictionary.rs1#[cfg(feature = "system-collections-specialized-stringdictionary-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/specialized/stringdictionary/StringDictionary.md"))]
11 #[::unity::class(namespace = "System.Collections.Specialized", name = "StringDictionary")]
12 #[parent(crate::system::object::Object)]
13 pub struct StringDictionary {
14 #[offset(16)]
15 #[rename(name = "contents")]
16 pub contents: crate::system::collections::hashtable::Hashtable,
17 }
18}
19
20#[cfg(feature = "system-collections-specialized-stringdictionary-types")]
21pub use __types::*;
22
23#[cfg(feature = "system-collections-specialized-stringdictionary")]
24pub trait IStringDictionaryMethods: IStringDictionary {
25 #[doc = "`.ctor()` overload"]
26 fn ctor(self) -> () {
27 unsafe {
28 let __receiver = <StringDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29 ::unity::il2cpp_call!((::unity::module_base()+0x2a27940usize)as*mut u8,();
30(StringDictionary)__receiver)
31 }
32 }
33 #[doc = "`Add(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
34 fn add(self, key: impl ::core::convert::Into<::unity::Il2CppString>, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
35 unsafe {
36 let __receiver = <StringDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
37 {
38 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
39 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
40 panic!(
41 "unity: virtual slot {}
42 out of range (vtable len {}
43) on the runtime class behind {}
44 (method `{}
45`)",
46 5usize,
47 __vt.len(),
48 <StringDictionary as ::unity::ClassIdentity>::NAME,
49 "Add",
50 )
51 });
52 let __inner: extern "C" fn(StringDictionary, ::unity::Il2CppString, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
53 ::core::mem::transmute(__vi.method_ptr);
54 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
55 __inner(__receiver, ::core::convert::Into::into(key), ::core::convert::Into::into(value), __mi)
56 }
57 }
58 }
59 #[doc = "`GetEnumerator()` overload"]
60 fn get_enumerator(self) -> crate::system::collections::ienumerator::IEnumerator {
61 unsafe {
62 let __receiver = <StringDictionary as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
63 {
64 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
65 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
66 panic!(
67 "unity: virtual slot {}
68 out of range (vtable len {}
69) on the runtime class behind {}
70 (method `{}
71`)",
72 6usize,
73 __vt.len(),
74 <StringDictionary as ::unity::ClassIdentity>::NAME,
75 "GetEnumerator",
76 )
77 });
78 let __inner: extern "C" fn(StringDictionary, ::unity::OptionalMethod) -> crate::system::collections::ienumerator::IEnumerator =
79 ::core::mem::transmute(__vi.method_ptr);
80 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
81 __inner(__receiver, __mi)
82 }
83 }
84 }
85}
86
87#[cfg(feature = "system-collections-specialized-stringdictionary")]
88impl<__T: IStringDictionary> IStringDictionaryMethods for __T {}
89
90#[cfg(feature = "system-collections-specialized-stringdictionary")]
91impl StringDictionary {
92 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
93 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
94 }
95
96 pub fn add_method_info() -> &'static ::unity::il2cpp::MethodInfo {
97 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
98 }
99
100 pub fn get_enumerator_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
102 }
103}
104
105#[cfg(feature = "system-collections-specialized-stringdictionary")]
106impl StringDictionary {
107 #[doc = "Direct (non-virtual) call to `StringDictionary`'s own `Add`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
108 pub unsafe fn add(this: impl ::core::convert::Into<::unity::IlInstance>, key: ::unity::Il2CppString, value: ::unity::Il2CppString) -> () {
109 let __mi = Self::add_method_info();
110 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
111 ::core::mem::transmute(__mi.method_ptr);
112 __inner(this.into(), key, value, ::core::option::Option::None)
113 }
114
115 #[doc = "Direct (non-virtual) call to `StringDictionary`'s own `GetEnumerator`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
116 pub unsafe fn get_enumerator(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::collections::ienumerator::IEnumerator {
117 let __mi = Self::get_enumerator_method_info();
118 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::collections::ienumerator::IEnumerator =
119 ::core::mem::transmute(__mi.method_ptr);
120 __inner(this.into(), ::core::option::Option::None)
121 }
122}
123
124#[cfg(feature = "system-collections-specialized-stringdictionary")]
125impl StringDictionary {
126 #[doc = "`.ctor()` — no args"]
127 pub fn new() -> Self {
128 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
129 panic!(
130 "{}
131::{}
132 failed to instantiate",
133 ::core::stringify!(StringDictionary),
134 ::core::stringify!(new),
135 )
136 });
137 <Self as IStringDictionaryMethods>::ctor(this);
138 this
139 }
140}
141
142#[cfg(feature = "system-collections-specialized-stringdictionary")]
143#[doc(hidden)]
144pub mod prelude {
145 pub use super::{IStringDictionary, IStringDictionaryMethods, StringDictionary};
146 pub use crate::system::object::IObject;
147 #[cfg(feature = "system-object")]
148 pub use crate::system::object::IObjectMethods;
149}