1#[cfg(feature = "system-collections-generic-list_1-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 valuetype::{IValueType, ValueType},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/list_1/List_1.md"))]
14 #[::unity::class(namespace = "System.Collections.Generic", name = "List`1")]
15 #[parent(crate::system::object::Object)]
16 pub struct List_1<T0: ::unity::ClassIdentity> {
17 #[static_field]
18 #[rename(name = "_defaultCapacity")]
19 pub default_capacity: i32,
20 #[rename(name = "_items")]
21 pub items: ::unity::Array<T0>,
22 #[rename(name = "_size")]
23 pub size: i32,
24 #[rename(name = "_version")]
25 pub version: i32,
26 #[rename(name = "_syncRoot")]
27 pub sync_root: ::unity::IlInstance,
28 #[static_field]
29 #[rename(name = "_emptyArray")]
30 pub empty_array: ::unity::Array<T0>,
31 }
32
33 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/list_1/List_1_Enumerator.md"))]
34 #[repr(C)]
35 #[derive(::core::clone::Clone, ::core::marker::Copy)]
36 pub struct List_1_Enumerator<T0> {
37 pub _phantom: ::core::marker::PhantomData<(T0,)>,
38 }
39 impl<T0: ::unity::ClassIdentity> ::unity::ClassIdentity for List_1_Enumerator<T0> {
40 const NAME: &'static str = "List`1.Enumerator";
41 const NAMESPACE: &'static str = "System.Collections.Generic";
42
43 fn class() -> ::unity::Class {
44 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
45 *CACHE.get_or_init(|| {
46 ::unity::Class::lookup(Self::NAMESPACE, Self::NAME)
47 .make_generic(&[<T0 as ::unity::ClassIdentity>::class()])
48 .expect("generic instantiation")
49 })
50 }
51 }
52 impl<T0: ::unity::ClassIdentity> ::unity::IlType for List_1_Enumerator<T0> {
53 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
54 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
55 }
56 }
57}
58
59#[cfg(feature = "system-collections-generic-list_1-types")]
60pub use __types::*;
61
62#[cfg(feature = "system-collections-generic-list_1")]
63#[::unity::methods]
64impl<T0: ::unity::ClassIdentity> List_1<T0> {
65 #[doc = "`.ctor()` overload"]
66 #[method(name = ".ctor", args = 0)]
67 pub fn ctor(self) -> ();
68
69 #[doc = "`.ctor(i32)` overload"]
70 #[method(name = ".ctor", args = 1)]
71 pub fn ctor_2(self, capacity: i32) -> ();
72
73 #[doc = "`.ctor(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
74 #[method(name = ".ctor", args = 1)]
75 pub fn ctor_3(self, collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> ();
76
77 #[doc = "`get_Capacity()` overload"]
78 #[method(name = "get_Capacity", args = 0)]
79 pub fn get_capacity(self) -> i32;
80
81 #[doc = "`set_Capacity(i32)` overload"]
82 #[method(name = "set_Capacity", args = 1)]
83 pub fn set_capacity(self, value: i32) -> ();
84
85 #[doc = "`get_Count()` overload"]
86 #[method(name = "get_Count", args = 0)]
87 pub fn get_count(self) -> i32;
88
89 #[doc = "`System.Collections.IList.get_IsReadOnly()` overload"]
90 #[method(name = "System.Collections.IList.get_IsReadOnly", args = 0)]
91 pub fn system_collections_i_list_get_is_read_only(self) -> bool;
92
93 #[doc = "`System.Collections.ICollection.get_IsSynchronized()` overload"]
94 #[method(name = "System.Collections.ICollection.get_IsSynchronized", args = 0)]
95 pub fn system_collections_i_collection_get_is_synchronized(self) -> bool;
96
97 #[doc = "`System.Collections.ICollection.get_SyncRoot()` overload"]
98 #[method(name = "System.Collections.ICollection.get_SyncRoot", args = 0)]
99 pub fn system_collections_i_collection_get_sync_root(self) -> crate::system::object::Object;
100
101 #[doc = "`get_Item(i32)` overload"]
102 #[method(name = "get_Item", args = 1)]
103 pub fn get_item(self, index: i32) -> T0;
104
105 #[doc = "`set_Item(i32, T0)` overload"]
106 #[method(name = "set_Item", args = 2)]
107 pub fn set_item(self, index: i32, value: T0) -> ();
108
109 #[doc = "`IsCompatibleObject(crate::system::object::Object)` overload"]
110 #[method(name = "IsCompatibleObject", args = 1)]
111 pub fn is_compatible_object(value: crate::system::object::Object) -> bool;
112
113 #[doc = "`System.Collections.IList.get_Item(i32)` overload"]
114 #[method(name = "System.Collections.IList.get_Item", args = 1)]
115 pub fn system_collections_i_list_get_item(self, index: i32) -> crate::system::object::Object;
116
117 #[doc = "`System.Collections.IList.set_Item(i32, crate::system::object::Object)` overload"]
118 #[method(name = "System.Collections.IList.set_Item", args = 2)]
119 pub fn system_collections_i_list_set_item(self, index: i32, value: crate::system::object::Object) -> ();
120
121 #[doc = "`Add(T0)` overload"]
122 #[method(name = "Add", args = 1)]
123 pub fn add(self, item: T0) -> ();
124
125 #[doc = "`System.Collections.IList.Add(crate::system::object::Object)` overload"]
126 #[method(name = "System.Collections.IList.Add", args = 1)]
127 pub fn system_collections_i_list_add(self, item: crate::system::object::Object) -> i32;
128
129 #[doc = "`AddRange(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
130 #[method(name = "AddRange", args = 1)]
131 pub fn add_range(self, collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> ();
132
133 #[doc = "`AsReadOnly()` overload"]
134 #[method(name = "AsReadOnly", args = 0)]
135 pub fn as_read_only(self) -> crate::system::collections::object_model::readonlycollection_1::ReadOnlyCollection_1<T0>;
136
137 #[doc = "`BinarySearch(i32, i32, T0, crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>)` overload"]
138 #[method(name = "BinarySearch", args = 4)]
139 pub fn binary_search(
140 self,
141 index: i32,
142 count: i32,
143 item: T0,
144 comparer: crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>,
145 ) -> i32;
146
147 #[doc = "`BinarySearch(T0, crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>)` overload"]
148 #[method(name = "BinarySearch", args = 2)]
149 pub fn binary_search_2(self, item: T0, comparer: crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>) -> i32;
150
151 #[doc = "`Clear()` overload"]
152 #[method(name = "Clear", args = 0)]
153 pub fn clear(self) -> ();
154
155 #[doc = "`Contains(T0)` overload"]
156 #[method(name = "Contains", args = 1)]
157 pub fn contains(self, item: T0) -> bool;
158
159 #[doc = "`System.Collections.IList.Contains(crate::system::object::Object)` overload"]
160 #[method(name = "System.Collections.IList.Contains", args = 1)]
161 pub fn system_collections_i_list_contains(self, item: crate::system::object::Object) -> bool;
162
163 #[doc = "`CopyTo(::unity::Array<T0>)` overload"]
164 #[method(name = "CopyTo", args = 1)]
165 pub fn copy_to(self, array: ::unity::Array<T0>) -> ();
166
167 #[doc = "`System.Collections.ICollection.CopyTo(::unity::IlInstance, i32)` overload"]
168 #[method(name = "System.Collections.ICollection.CopyTo", args = 2)]
169 pub fn system_collections_i_collection_copy_to(self, array: ::unity::IlInstance, array_index: i32) -> ();
170
171 #[doc = "`CopyTo(i32, ::unity::Array<T0>, i32, i32)` overload"]
172 #[method(name = "CopyTo", args = 4)]
173 pub fn copy_to_2(self, index: i32, array: ::unity::Array<T0>, array_index: i32, count: i32) -> ();
174
175 #[doc = "`CopyTo(::unity::Array<T0>, i32)` overload"]
176 #[method(name = "CopyTo", args = 2)]
177 pub fn copy_to_3(self, array: ::unity::Array<T0>, array_index: i32) -> ();
178
179 #[doc = "`EnsureCapacity(i32)` overload"]
180 #[method(name = "EnsureCapacity", args = 1)]
181 pub fn ensure_capacity(self, min: i32) -> ();
182
183 #[doc = "`Exists(crate::system::predicate_1::Predicate_1<T0>)` overload"]
184 #[method(name = "Exists", args = 1)]
185 pub fn exists(self, r#match: crate::system::predicate_1::Predicate_1<T0>) -> bool;
186
187 #[doc = "`Find(crate::system::predicate_1::Predicate_1<T0>)` overload"]
188 #[method(name = "Find", args = 1)]
189 pub fn find(self, r#match: crate::system::predicate_1::Predicate_1<T0>) -> T0;
190
191 #[doc = "`FindAll(crate::system::predicate_1::Predicate_1<T0>)` overload"]
192 #[method(name = "FindAll", args = 1)]
193 pub fn find_all(self, r#match: crate::system::predicate_1::Predicate_1<T0>) -> crate::system::collections::generic::list_1::List_1<T0>;
194
195 #[doc = "`FindIndex(crate::system::predicate_1::Predicate_1<T0>)` overload"]
196 #[method(name = "FindIndex", args = 1)]
197 pub fn find_index(self, r#match: crate::system::predicate_1::Predicate_1<T0>) -> i32;
198
199 #[doc = "`FindIndex(i32, i32, crate::system::predicate_1::Predicate_1<T0>)` overload"]
200 #[method(name = "FindIndex", args = 3)]
201 pub fn find_index_2(self, start_index: i32, count: i32, r#match: crate::system::predicate_1::Predicate_1<T0>) -> i32;
202
203 #[doc = "`ForEach(crate::system::action_1::Action_1<T0>)` overload"]
204 #[method(name = "ForEach", args = 1)]
205 pub fn for_each(self, action: crate::system::action_1::Action_1<T0>) -> ();
206
207 #[doc = "`GetEnumerator()` overload"]
208 #[method(name = "GetEnumerator", args = 0)]
209 pub fn get_enumerator(self) -> crate::system::collections::generic::list_1::List_1_Enumerator<T0>;
210
211 #[doc = "`System.Collections.IEnumerable.GetEnumerator()` overload"]
212 #[method(name = "System.Collections.IEnumerable.GetEnumerator", args = 0)]
213 pub fn system_collections_i_enumerable_get_enumerator(self) -> crate::system::collections::ienumerator::IEnumerator;
214
215 #[doc = "`IndexOf(T0)` overload"]
216 #[method(name = "IndexOf", args = 1)]
217 pub fn index_of(self, item: T0) -> i32;
218
219 #[doc = "`System.Collections.IList.IndexOf(crate::system::object::Object)` overload"]
220 #[method(name = "System.Collections.IList.IndexOf", args = 1)]
221 pub fn system_collections_i_list_index_of(self, item: crate::system::object::Object) -> i32;
222
223 #[doc = "`Insert(i32, T0)` overload"]
224 #[method(name = "Insert", args = 2)]
225 pub fn insert(self, index: i32, item: T0) -> ();
226
227 #[doc = "`System.Collections.IList.Insert(i32, crate::system::object::Object)` overload"]
228 #[method(name = "System.Collections.IList.Insert", args = 2)]
229 pub fn system_collections_i_list_insert(self, index: i32, item: crate::system::object::Object) -> ();
230
231 #[doc = "`InsertRange(i32, crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` overload"]
232 #[method(name = "InsertRange", args = 2)]
233 pub fn insert_range(self, index: i32, collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> ();
234
235 #[doc = "`Remove(T0)` overload"]
236 #[method(name = "Remove", args = 1)]
237 pub fn remove(self, item: T0) -> bool;
238
239 #[doc = "`System.Collections.IList.Remove(crate::system::object::Object)` overload"]
240 #[method(name = "System.Collections.IList.Remove", args = 1)]
241 pub fn system_collections_i_list_remove(self, item: crate::system::object::Object) -> ();
242
243 #[doc = "`RemoveAll(crate::system::predicate_1::Predicate_1<T0>)` overload"]
244 #[method(name = "RemoveAll", args = 1)]
245 pub fn remove_all(self, r#match: crate::system::predicate_1::Predicate_1<T0>) -> i32;
246
247 #[doc = "`RemoveAt(i32)` overload"]
248 #[method(name = "RemoveAt", args = 1)]
249 pub fn remove_at(self, index: i32) -> ();
250
251 #[doc = "`RemoveRange(i32, i32)` overload"]
252 #[method(name = "RemoveRange", args = 2)]
253 pub fn remove_range(self, index: i32, count: i32) -> ();
254
255 #[doc = "`Reverse()` overload"]
256 #[method(name = "Reverse", args = 0)]
257 pub fn reverse(self) -> ();
258
259 #[doc = "`Reverse(i32, i32)` overload"]
260 #[method(name = "Reverse", args = 2)]
261 pub fn reverse_2(self, index: i32, count: i32) -> ();
262
263 #[doc = "`Sort()` overload"]
264 #[method(name = "Sort", args = 0)]
265 pub fn sort(self) -> ();
266
267 #[doc = "`Sort(crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>)` overload"]
268 #[method(name = "Sort", args = 1)]
269 pub fn sort_2(self, comparer: crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>) -> ();
270
271 #[doc = "`Sort(i32, i32, crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>)` overload"]
272 #[method(name = "Sort", args = 3)]
273 pub fn sort_3(
274 self,
275 index: i32,
276 count: i32,
277 comparer: crate::system::collections::generic::icomparer_1_interface::IComparer_1_Interface<T0>,
278 ) -> ();
279
280 #[doc = "`Sort(crate::system::comparison_1::Comparison_1<T0>)` overload"]
281 #[method(name = "Sort", args = 1)]
282 pub fn sort_4(self, comparison: crate::system::comparison_1::Comparison_1<T0>) -> ();
283
284 #[doc = "`ToArray()` overload"]
285 #[method(name = "ToArray", args = 0)]
286 pub fn to_array(self) -> ::unity::Array<T0>;
287
288 #[doc = "`.cctor()` overload"]
289 #[method(name = ".cctor", args = 0)]
290 pub fn cctor() -> ();
291}
292
293#[cfg(feature = "system-collections-generic-list_1")]
294impl<T0: ::unity::ClassIdentity> List_1<T0> {
295 #[doc = "`.ctor()` — no args"]
296 pub fn new() -> Self {
297 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
298 panic!(
299 "{}
300::{}
301 failed to instantiate",
302 ::core::stringify!(List_1),
303 ::core::stringify!(new),
304 )
305 });
306 <Self as IList_1Methods<T0>>::ctor(this);
307 this
308 }
309
310 #[doc = "`.ctor(i32)` — overload selector"]
311 pub fn new_2(capacity: i32) -> Self {
312 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
313 panic!(
314 "{}
315::{}
316 failed to instantiate",
317 ::core::stringify!(List_1),
318 ::core::stringify!(new_2),
319 )
320 });
321 <Self as IList_1Methods<T0>>::ctor_2(this, capacity);
322 this
323 }
324
325 #[doc = "`.ctor(crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>)` — overload selector"]
326 pub fn new_3(collection: crate::system::collections::generic::ienumerable_1::IEnumerable_1<T0>) -> Self {
327 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
328 panic!(
329 "{}
330::{}
331 failed to instantiate",
332 ::core::stringify!(List_1),
333 ::core::stringify!(new_3),
334 )
335 });
336 <Self as IList_1Methods<T0>>::ctor_3(this, collection);
337 this
338 }
339}
340
341#[cfg(feature = "system-collections-generic-list_1")]
342#[::unity::methods(value)]
343impl<T0: ::unity::ClassIdentity> List_1_Enumerator<T0> {
344 #[doc = "`.ctor(crate::system::collections::generic::list_1::List_1<T0>)` overload"]
345 #[method(name = ".ctor", args = 1)]
346 pub fn ctor(self, list: crate::system::collections::generic::list_1::List_1<T0>) -> ();
347
348 #[doc = "`Dispose()` overload"]
349 #[method(name = "Dispose", args = 0)]
350 pub fn dispose(self) -> ();
351
352 #[doc = "`MoveNext()` overload"]
353 #[method(name = "MoveNext", args = 0)]
354 pub fn move_next(self) -> bool;
355
356 #[doc = "`MoveNextRare()` overload"]
357 #[method(name = "MoveNextRare", args = 0)]
358 pub fn move_next_rare(self) -> bool;
359
360 #[doc = "`get_Current()` overload"]
361 #[method(name = "get_Current", args = 0)]
362 pub fn get_current(self) -> T0;
363
364 #[doc = "`System.Collections.IEnumerator.get_Current()` overload"]
365 #[method(name = "System.Collections.IEnumerator.get_Current", args = 0)]
366 pub fn system_collections_i_enumerator_get_current(self) -> crate::system::object::Object;
367
368 #[doc = "`System.Collections.IEnumerator.Reset()` overload"]
369 #[method(name = "System.Collections.IEnumerator.Reset", args = 0)]
370 pub fn system_collections_i_enumerator_reset(self) -> ();
371}
372
373#[cfg(feature = "system-collections-generic-list_1")]
374#[doc(hidden)]
375pub mod prelude {
376 pub use super::{IList_1, IList_1Methods, List_1, List_1_Enumerator};
377 #[cfg(feature = "system-object")]
378 pub use crate::system::object::IObjectMethods;
379 #[cfg(feature = "system-valuetype")]
380 pub use crate::system::valuetype::IValueTypeMethods;
381 pub use crate::system::{object::IObject, valuetype::IValueType};
382}