engage/generated/system/reflection/
monoparameterinfo.rs1#[cfg(feature = "system-reflection-monoparameterinfo-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 reflection::{
11 parameterinfo::{IParameterInfo, ParameterInfo},
12 runtimeparameterinfo::{IRuntimeParameterInfo, RuntimeParameterInfo},
13 },
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/monoparameterinfo/MonoParameterInfo.md"))]
17 #[::unity::class(namespace = "System.Reflection", name = "MonoParameterInfo")]
18 #[parent(crate::system::reflection::runtimeparameterinfo::RuntimeParameterInfo)]
19 pub struct MonoParameterInfo {}
20}
21
22#[cfg(feature = "system-reflection-monoparameterinfo-types")]
23pub use __types::*;
24
25#[cfg(feature = "system-reflection-monoparameterinfo")]
26pub trait IMonoParameterInfoMethods: IMonoParameterInfo {
27 #[doc = "`.ctor(crate::system::reflection::parameterinfo::ParameterInfo, crate::system::reflection::memberinfo::MemberInfo)` overload"]
28 fn ctor(
29 self,
30 pinfo: impl ::core::convert::Into<crate::system::reflection::parameterinfo::ParameterInfo>,
31 member: impl ::core::convert::Into<crate::system::reflection::memberinfo::MemberInfo>,
32 ) -> () {
33 unsafe {
34 let __receiver = <MonoParameterInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35 ::unity::il2cpp_call!((::unity::module_base()+0x3383390usize)as*mut u8,();
36(MonoParameterInfo)__receiver,(crate::system::reflection::parameterinfo::ParameterInfo)::core::convert::Into::into(pinfo),(crate::system::reflection::memberinfo::MemberInfo)::core::convert::Into::into(member))
37 }
38 }
39 #[doc = "`get_DefaultValue()` overload"]
40 fn get_default_value(self) -> crate::system::object::Object {
41 unsafe {
42 let __receiver = <MonoParameterInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
43 {
44 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
45 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
46 panic!(
47 "unity: virtual slot {}
48 out of range (vtable len {}
49) on the runtime class behind {}
50 (method `{}
51`)",
52 11usize,
53 __vt.len(),
54 <MonoParameterInfo as ::unity::ClassIdentity>::NAME,
55 "get_DefaultValue",
56 )
57 });
58 let __inner: extern "C" fn(MonoParameterInfo, ::unity::OptionalMethod) -> crate::system::object::Object =
59 ::core::mem::transmute(__vi.method_ptr);
60 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
61 __inner(__receiver, __mi)
62 }
63 }
64 }
65 #[doc = "`GetCustomAttributes(::unity::SystemType, bool)` overload"]
66 fn get_custom_attributes(
67 self,
68 attribute_type: impl ::core::convert::Into<::unity::SystemType>,
69 inherit: impl ::core::convert::Into<bool>,
70 ) -> ::unity::Array<crate::system::object::Object> {
71 unsafe {
72 let __receiver = <MonoParameterInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
73 {
74 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
75 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
76 panic!(
77 "unity: virtual slot {}
78 out of range (vtable len {}
79) on the runtime class behind {}
80 (method `{}
81`)",
82 12usize,
83 __vt.len(),
84 <MonoParameterInfo as ::unity::ClassIdentity>::NAME,
85 "GetCustomAttributes",
86 )
87 });
88 let __inner: extern "C" fn(
89 MonoParameterInfo,
90 ::unity::SystemType,
91 bool,
92 ::unity::OptionalMethod,
93 ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__vi.method_ptr);
94 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
95 __inner(
96 __receiver,
97 ::core::convert::Into::into(attribute_type),
98 ::core::convert::Into::into(inherit),
99 __mi,
100 )
101 }
102 }
103 }
104 #[doc = "`IsDefined(::unity::SystemType, bool)` overload"]
105 fn is_defined(self, attribute_type: impl ::core::convert::Into<::unity::SystemType>, inherit: impl ::core::convert::Into<bool>) -> bool {
106 unsafe {
107 let __receiver = <MonoParameterInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108 {
109 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
110 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
111 panic!(
112 "unity: virtual slot {}
113 out of range (vtable len {}
114) on the runtime class behind {}
115 (method `{}
116`)",
117 13usize,
118 __vt.len(),
119 <MonoParameterInfo as ::unity::ClassIdentity>::NAME,
120 "IsDefined",
121 )
122 });
123 let __inner: extern "C" fn(MonoParameterInfo, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
124 ::core::mem::transmute(__vi.method_ptr);
125 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
126 __inner(
127 __receiver,
128 ::core::convert::Into::into(attribute_type),
129 ::core::convert::Into::into(inherit),
130 __mi,
131 )
132 }
133 }
134 }
135}
136
137#[cfg(feature = "system-reflection-monoparameterinfo")]
138impl<__T: IMonoParameterInfo> IMonoParameterInfoMethods for __T {}
139
140#[cfg(feature = "system-reflection-monoparameterinfo")]
141impl MonoParameterInfo {
142 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
143 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
144 }
145
146 pub fn get_default_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
147 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
148 }
149
150 pub fn get_custom_attributes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
151 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
152 }
153
154 pub fn is_defined_method_info() -> &'static ::unity::il2cpp::MethodInfo {
155 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
156 }
157}
158
159#[cfg(feature = "system-reflection-monoparameterinfo")]
160impl MonoParameterInfo {
161 #[doc = "Direct (non-virtual) call to `MonoParameterInfo`'s own `get_DefaultValue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
162 pub unsafe fn get_default_value(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::object::Object {
163 let __mi = Self::get_default_value_method_info();
164 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
165 ::core::mem::transmute(__mi.method_ptr);
166 __inner(this.into(), ::core::option::Option::None)
167 }
168
169 #[doc = "Direct (non-virtual) call to `MonoParameterInfo`'s own `GetCustomAttributes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
170 pub unsafe fn get_custom_attributes(
171 this: impl ::core::convert::Into<::unity::IlInstance>,
172 attribute_type: ::unity::SystemType,
173 inherit: bool,
174 ) -> ::unity::Array<crate::system::object::Object> {
175 let __mi = Self::get_custom_attributes_method_info();
176 let __inner: extern "C" fn(
177 ::unity::IlInstance,
178 ::unity::SystemType,
179 bool,
180 ::unity::OptionalMethod,
181 ) -> ::unity::Array<crate::system::object::Object> = ::core::mem::transmute(__mi.method_ptr);
182 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
183 }
184
185 #[doc = "Direct (non-virtual) call to `MonoParameterInfo`'s own `IsDefined`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
186 pub unsafe fn is_defined(this: impl ::core::convert::Into<::unity::IlInstance>, attribute_type: ::unity::SystemType, inherit: bool) -> bool {
187 let __mi = Self::is_defined_method_info();
188 let __inner: extern "C" fn(::unity::IlInstance, ::unity::SystemType, bool, ::unity::OptionalMethod) -> bool =
189 ::core::mem::transmute(__mi.method_ptr);
190 __inner(this.into(), attribute_type, inherit, ::core::option::Option::None)
191 }
192}
193
194#[cfg(feature = "system-reflection-monoparameterinfo")]
195impl MonoParameterInfo {
196 #[doc = "`.ctor(crate::system::reflection::parameterinfo::ParameterInfo, crate::system::reflection::memberinfo::MemberInfo)` — overload selector"]
197 pub fn new(pinfo: crate::system::reflection::parameterinfo::ParameterInfo, member: crate::system::reflection::memberinfo::MemberInfo) -> Self {
198 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
199 panic!(
200 "{}
201::{}
202 failed to instantiate",
203 ::core::stringify!(MonoParameterInfo),
204 ::core::stringify!(new),
205 )
206 });
207 <Self as IMonoParameterInfoMethods>::ctor(this, pinfo, member);
208 this
209 }
210}
211
212#[cfg(feature = "system-reflection-monoparameterinfo")]
213#[doc(hidden)]
214pub mod prelude {
215 pub use super::{IMonoParameterInfo, IMonoParameterInfoMethods, MonoParameterInfo};
216 #[cfg(feature = "system-object")]
217 pub use crate::system::object::IObjectMethods;
218 #[cfg(feature = "system-reflection-parameterinfo")]
219 pub use crate::system::reflection::parameterinfo::IParameterInfoMethods;
220 #[cfg(feature = "system-reflection-runtimeparameterinfo")]
221 pub use crate::system::reflection::runtimeparameterinfo::IRuntimeParameterInfoMethods;
222 pub use crate::system::{
223 object::IObject,
224 reflection::{parameterinfo::IParameterInfo, runtimeparameterinfo::IRuntimeParameterInfo},
225 };
226}