engage/generated/root/
listwithevents_1.rs1#[cfg(feature = "root-listwithevents_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/root/listwithevents_1/ListWithEvents_1.md"))]
11 #[::unity::class(namespace = "", name = "ListWithEvents`1")]
12 #[parent(crate::system::object::Object)]
13 pub struct ListWithEvents_1<T0: ::unity::ClassIdentity> {
14 #[rename(name = "m_List")]
15 pub m_list: crate::system::collections::generic::list_1::List_1<T0>,
16 #[rename(name = "OnElementAdded")]
17 pub on_element_added: crate::system::action_1::Action_1<T0>,
18 #[rename(name = "OnElementRemoved")]
19 pub on_element_removed: crate::system::action_1::Action_1<T0>,
20 }
21}
22
23#[cfg(feature = "root-listwithevents_1-types")]
24pub use __types::*;
25
26#[cfg(feature = "root-listwithevents_1")]
27#[::unity::methods]
28impl<T0: ::unity::ClassIdentity> ListWithEvents_1<T0> {
29 #[doc = "`add_OnElementAdded(crate::system::action_1::Action_1<T0>)` overload"]
30 #[method(name = "add_OnElementAdded", args = 1)]
31 pub fn add_on_element_added(self, value: crate::system::action_1::Action_1<T0>) -> ();
32
33 #[doc = "`remove_OnElementAdded(crate::system::action_1::Action_1<T0>)` overload"]
34 #[method(name = "remove_OnElementAdded", args = 1)]
35 pub fn remove_on_element_added(self, value: crate::system::action_1::Action_1<T0>) -> ();
36
37 #[doc = "`add_OnElementRemoved(crate::system::action_1::Action_1<T0>)` overload"]
38 #[method(name = "add_OnElementRemoved", args = 1)]
39 pub fn add_on_element_removed(self, value: crate::system::action_1::Action_1<T0>) -> ();
40
41 #[doc = "`remove_OnElementRemoved(crate::system::action_1::Action_1<T0>)` overload"]
42 #[method(name = "remove_OnElementRemoved", args = 1)]
43 pub fn remove_on_element_removed(self, value: crate::system::action_1::Action_1<T0>) -> ();
44
45 #[doc = "`InvokeAdded(T0)` overload"]
46 #[method(name = "InvokeAdded", args = 1)]
47 pub fn invoke_added(self, element: T0) -> ();
48
49 #[doc = "`InvokeRemoved(T0)` overload"]
50 #[method(name = "InvokeRemoved", args = 1)]
51 pub fn invoke_removed(self, element: T0) -> ();
52
53 #[doc = "`get_Item(i32)` overload"]
54 #[method(name = "get_Item", args = 1)]
55 pub fn get_item(self, index: i32) -> T0;
56
57 #[doc = "`set_Item(i32, T0)` overload"]
58 #[method(name = "set_Item", args = 2)]
59 pub fn set_item(self, index: i32, value: T0) -> ();
60
61 #[doc = "`get_Count()` overload"]
62 #[method(name = "get_Count", args = 0)]
63 pub fn get_count(self) -> i32;
64
65 #[doc = "`get_IsReadOnly()` overload"]
66 #[method(name = "get_IsReadOnly", args = 0)]
67 pub fn get_is_read_only(self) -> bool;
68
69 #[doc = "`Add(T0)` overload"]
70 #[method(name = "Add", args = 1)]
71 pub fn add(self, item: T0) -> ();
72
73 #[doc = "`Clear()` overload"]
74 #[method(name = "Clear", args = 0)]
75 pub fn clear(self) -> ();
76
77 #[doc = "`Contains(T0)` overload"]
78 #[method(name = "Contains", args = 1)]
79 pub fn contains(self, item: T0) -> bool;
80
81 #[doc = "`CopyTo(::unity::Array<T0>, i32)` overload"]
82 #[method(name = "CopyTo", args = 2)]
83 pub fn copy_to(self, array: ::unity::Array<T0>, array_index: i32) -> ();
84
85 #[doc = "`GetEnumerator()` overload"]
86 #[method(name = "GetEnumerator", args = 0)]
87 pub fn get_enumerator(self) -> crate::system::collections::generic::ienumerator_1::IEnumerator_1<T0>;
88
89 #[doc = "`IndexOf(T0)` overload"]
90 #[method(name = "IndexOf", args = 1)]
91 pub fn index_of(self, item: T0) -> i32;
92
93 #[doc = "`Insert(i32, T0)` overload"]
94 #[method(name = "Insert", args = 2)]
95 pub fn insert(self, index: i32, item: T0) -> ();
96
97 #[doc = "`Remove(T0)` overload"]
98 #[method(name = "Remove", args = 1)]
99 pub fn remove(self, item: T0) -> bool;
100
101 #[doc = "`RemoveAt(i32)` overload"]
102 #[method(name = "RemoveAt", args = 1)]
103 pub fn remove_at(self, index: i32) -> ();
104
105 #[doc = "`System.Collections.IEnumerable.GetEnumerator()` overload"]
106 #[method(name = "System.Collections.IEnumerable.GetEnumerator", args = 0)]
107 pub fn system_collections_i_enumerable_get_enumerator(self) -> crate::system::collections::ienumerator::IEnumerator;
108
109 #[doc = "`.ctor()` overload"]
110 #[method(name = ".ctor", args = 0)]
111 pub fn ctor(self) -> ();
112}
113
114#[cfg(feature = "root-listwithevents_1")]
115impl<T0: ::unity::ClassIdentity> ListWithEvents_1<T0> {
116 #[doc = "`.ctor()` — no args"]
117 pub fn new() -> Self {
118 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
119 panic!(
120 "{}
121::{}
122 failed to instantiate",
123 ::core::stringify!(ListWithEvents_1),
124 ::core::stringify!(new),
125 )
126 });
127 <Self as IListWithEvents_1Methods<T0>>::ctor(this);
128 this
129 }
130}
131
132#[cfg(feature = "root-listwithevents_1")]
133#[doc(hidden)]
134pub mod prelude {
135 pub use super::{IListWithEvents_1, IListWithEvents_1Methods, ListWithEvents_1};
136 pub use crate::system::object::IObject;
137 #[cfg(feature = "system-object")]
138 pub use crate::system::object::IObjectMethods;
139}