engage/generated/system/collections/object_model/
collection_1.rs1#[cfg(feature = "system-collections-object_model-collection_1-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/object_model/collection_1/Collection_1.md"))]
11 #[::unity::class(namespace = "System.Collections.ObjectModel", name = "Collection`1")]
12 #[parent(crate::system::object::Object)]
13 pub struct Collection_1<T0: ::unity::ClassIdentity> {
14 #[rename(name = "items")]
15 pub items: crate::system::collections::generic::ilist_1_interface::IList_1_Interface<T0>,
16 #[rename(name = "_syncRoot")]
17 pub sync_root: ::unity::IlInstance,
18 }
19}
20
21#[cfg(feature = "system-collections-object_model-collection_1-types")]
22pub use __types::*;
23
24#[cfg(feature = "system-collections-object_model-collection_1")]
25#[::unity::methods]
26impl<T0: ::unity::ClassIdentity> Collection_1<T0> {
27 #[doc = "`.ctor()` overload"]
28 #[method(name = ".ctor", args = 0)]
29 pub fn ctor(self) -> ();
30
31 #[doc = "`.ctor(crate::system::collections::generic::ilist_1_interface::IList_1_Interface<T0>)` overload"]
32 #[method(name = ".ctor", args = 1)]
33 pub fn ctor_2(self, list: crate::system::collections::generic::ilist_1_interface::IList_1_Interface<T0>) -> ();
34
35 #[doc = "`get_Count()` overload"]
36 #[method(name = "get_Count", args = 0)]
37 pub fn get_count(self) -> i32;
38
39 #[doc = "`get_Item(i32)` overload"]
40 #[method(name = "get_Item", args = 1)]
41 pub fn get_item(self, index: i32) -> T0;
42
43 #[doc = "`set_Item(i32, T0)` overload"]
44 #[method(name = "set_Item", args = 2)]
45 pub fn set_item(self, index: i32, value: T0) -> ();
46
47 #[doc = "`Add(T0)` overload"]
48 #[method(name = "Add", args = 1)]
49 pub fn add(self, item: T0) -> ();
50
51 #[doc = "`Clear()` overload"]
52 #[method(name = "Clear", args = 0)]
53 pub fn clear(self) -> ();
54
55 #[doc = "`CopyTo(::unity::Array<T0>, i32)` overload"]
56 #[method(name = "CopyTo", args = 2)]
57 pub fn copy_to(self, array: ::unity::Array<T0>, index: i32) -> ();
58
59 #[doc = "`Contains(T0)` overload"]
60 #[method(name = "Contains", args = 1)]
61 pub fn contains(self, item: T0) -> bool;
62
63 #[doc = "`GetEnumerator()` overload"]
64 #[method(name = "GetEnumerator", args = 0)]
65 pub fn get_enumerator(self) -> crate::system::collections::generic::ienumerator_1::IEnumerator_1<T0>;
66
67 #[doc = "`IndexOf(T0)` overload"]
68 #[method(name = "IndexOf", args = 1)]
69 pub fn index_of(self, item: T0) -> i32;
70
71 #[doc = "`Insert(i32, T0)` overload"]
72 #[method(name = "Insert", args = 2)]
73 pub fn insert(self, index: i32, item: T0) -> ();
74
75 #[doc = "`Remove(T0)` overload"]
76 #[method(name = "Remove", args = 1)]
77 pub fn remove(self, item: T0) -> bool;
78
79 #[doc = "`RemoveAt(i32)` overload"]
80 #[method(name = "RemoveAt", args = 1)]
81 pub fn remove_at(self, index: i32) -> ();
82
83 #[doc = "`ClearItems()` overload"]
84 #[method(name = "ClearItems", args = 0)]
85 pub fn clear_items(self) -> ();
86
87 #[doc = "`InsertItem(i32, T0)` overload"]
88 #[method(name = "InsertItem", args = 2)]
89 pub fn insert_item(self, index: i32, item: T0) -> ();
90
91 #[doc = "`RemoveItem(i32)` overload"]
92 #[method(name = "RemoveItem", args = 1)]
93 pub fn remove_item(self, index: i32) -> ();
94
95 #[doc = "`System.Collections.IEnumerable.GetEnumerator()` overload"]
96 #[method(name = "System.Collections.IEnumerable.GetEnumerator", args = 0)]
97 pub fn system_collections_i_enumerable_get_enumerator(self) -> crate::system::collections::ienumerator::IEnumerator;
98
99 #[doc = "`System.Collections.ICollection.get_IsSynchronized()` overload"]
100 #[method(name = "System.Collections.ICollection.get_IsSynchronized", args = 0)]
101 pub fn system_collections_i_collection_get_is_synchronized(self) -> bool;
102
103 #[doc = "`System.Collections.ICollection.get_SyncRoot()` overload"]
104 #[method(name = "System.Collections.ICollection.get_SyncRoot", args = 0)]
105 pub fn system_collections_i_collection_get_sync_root(self) -> crate::system::object::Object;
106
107 #[doc = "`System.Collections.ICollection.CopyTo(::unity::IlInstance, i32)` overload"]
108 #[method(name = "System.Collections.ICollection.CopyTo", args = 2)]
109 pub fn system_collections_i_collection_copy_to(self, array: ::unity::IlInstance, index: i32) -> ();
110
111 #[doc = "`System.Collections.IList.get_Item(i32)` overload"]
112 #[method(name = "System.Collections.IList.get_Item", args = 1)]
113 pub fn system_collections_i_list_get_item(self, index: i32) -> crate::system::object::Object;
114
115 #[doc = "`System.Collections.IList.set_Item(i32, crate::system::object::Object)` overload"]
116 #[method(name = "System.Collections.IList.set_Item", args = 2)]
117 pub fn system_collections_i_list_set_item(self, index: i32, value: crate::system::object::Object) -> ();
118
119 #[doc = "`System.Collections.IList.get_IsReadOnly()` overload"]
120 #[method(name = "System.Collections.IList.get_IsReadOnly", args = 0)]
121 pub fn system_collections_i_list_get_is_read_only(self) -> bool;
122
123 #[doc = "`System.Collections.IList.Add(crate::system::object::Object)` overload"]
124 #[method(name = "System.Collections.IList.Add", args = 1)]
125 pub fn system_collections_i_list_add(self, value: crate::system::object::Object) -> i32;
126
127 #[doc = "`System.Collections.IList.Contains(crate::system::object::Object)` overload"]
128 #[method(name = "System.Collections.IList.Contains", args = 1)]
129 pub fn system_collections_i_list_contains(self, value: crate::system::object::Object) -> bool;
130
131 #[doc = "`System.Collections.IList.IndexOf(crate::system::object::Object)` overload"]
132 #[method(name = "System.Collections.IList.IndexOf", args = 1)]
133 pub fn system_collections_i_list_index_of(self, value: crate::system::object::Object) -> i32;
134
135 #[doc = "`System.Collections.IList.Insert(i32, crate::system::object::Object)` overload"]
136 #[method(name = "System.Collections.IList.Insert", args = 2)]
137 pub fn system_collections_i_list_insert(self, index: i32, value: crate::system::object::Object) -> ();
138
139 #[doc = "`System.Collections.IList.Remove(crate::system::object::Object)` overload"]
140 #[method(name = "System.Collections.IList.Remove", args = 1)]
141 pub fn system_collections_i_list_remove(self, value: crate::system::object::Object) -> ();
142
143 #[doc = "`IsCompatibleObject(crate::system::object::Object)` overload"]
144 #[method(name = "IsCompatibleObject", args = 1)]
145 pub fn is_compatible_object(value: crate::system::object::Object) -> bool;
146}
147
148#[cfg(feature = "system-collections-object_model-collection_1")]
149impl<T0: ::unity::ClassIdentity> Collection_1<T0> {
150 #[doc = "`.ctor()` — no args"]
151 pub fn new() -> Self {
152 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
153 panic!(
154 "{}
155::{}
156 failed to instantiate",
157 ::core::stringify!(Collection_1),
158 ::core::stringify!(new),
159 )
160 });
161 <Self as ICollection_1Methods<T0>>::ctor(this);
162 this
163 }
164
165 #[doc = "`.ctor(crate::system::collections::generic::ilist_1_interface::IList_1_Interface<T0>)` — overload selector"]
166 pub fn new_2(list: crate::system::collections::generic::ilist_1_interface::IList_1_Interface<T0>) -> Self {
167 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
168 panic!(
169 "{}
170::{}
171 failed to instantiate",
172 ::core::stringify!(Collection_1),
173 ::core::stringify!(new_2),
174 )
175 });
176 <Self as ICollection_1Methods<T0>>::ctor_2(this, list);
177 this
178 }
179}
180
181#[cfg(feature = "system-collections-object_model-collection_1")]
182#[doc(hidden)]
183pub mod prelude {
184 pub use super::{Collection_1, ICollection_1, ICollection_1Methods};
185 pub use crate::system::object::IObject;
186 #[cfg(feature = "system-object")]
187 pub use crate::system::object::IObjectMethods;
188}