1#[cfg(feature = "moon_sharp-interpreter-callbackfunction-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 moon_sharp::interpreter::refidobject::{IRefIdObject, RefIdObject},
10 system::object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/callbackfunction/CallbackFunction.md"))]
14 #[::unity::class(namespace = "MoonSharp.Interpreter", name = "CallbackFunction")]
15 #[parent(crate::moon_sharp::interpreter::refidobject::RefIdObject)]
16 pub struct CallbackFunction {
17 #[static_field]
18 #[rename(name = "m_DefaultAccessMode")]
19 pub m_default_access_mode: crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode,
20 }
21}
22
23#[cfg(feature = "moon_sharp-interpreter-callbackfunction-types")]
24pub use __types::*;
25
26#[cfg(feature = "moon_sharp-interpreter-callbackfunction")]
27#[doc(hidden)]
28#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
29mod __CallbackFunction_unity_raw {
30 use super::*;
31 #[doc(hidden)]
32 #[allow(non_snake_case)]
33 pub mod __lookup_get_name {
34 use super::*;
35 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
36 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
37 ::unity::lookup::method_info_on_class_with_signature(
38 <CallbackFunction as ::unity::ClassIdentity>::class(),
39 "get_Name",
40 0,
41 param_types,
42 false,
43 )
44 });
45 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
46 match &*METHOD {
47 ::core::result::Result::Ok(mi) => *mi,
48 ::core::result::Result::Err(e) => {
49 panic!(
50 "method lookup failed: {}
51::{}
52: {}
53",
54 <CallbackFunction as ::unity::ClassIdentity>::NAME,
55 "get_Name",
56 e
57 )
58 },
59 }
60 }
61 }
62 #[doc(hidden)]
63 #[allow(non_snake_case)]
64 pub mod __lookup_set_name {
65 use super::*;
66 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
67 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<::unity::Il2CppString as ::unity::IlType>::il_type()];
68 ::unity::lookup::method_info_on_class_with_signature(
69 <CallbackFunction as ::unity::ClassIdentity>::class(),
70 "set_Name",
71 1,
72 param_types,
73 false,
74 )
75 });
76 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
77 match &*METHOD {
78 ::core::result::Result::Ok(mi) => *mi,
79 ::core::result::Result::Err(e) => {
80 panic!(
81 "method lookup failed: {}
82::{}
83: {}
84",
85 <CallbackFunction as ::unity::ClassIdentity>::NAME,
86 "set_Name",
87 e
88 )
89 },
90 }
91 }
92 }
93 #[doc(hidden)]
94 #[allow(non_snake_case)]
95 pub mod __lookup_get_clr_callback {
96 use super::*;
97 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
98 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
99 ::unity::lookup::method_info_on_class_with_signature(
100 <CallbackFunction as ::unity::ClassIdentity>::class(),
101 "get_ClrCallback",
102 0,
103 param_types,
104 false,
105 )
106 });
107 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
108 match &*METHOD {
109 ::core::result::Result::Ok(mi) => *mi,
110 ::core::result::Result::Err(e) => {
111 panic!(
112 "method lookup failed: {}
113::{}
114: {}
115",
116 <CallbackFunction as ::unity::ClassIdentity>::NAME,
117 "get_ClrCallback",
118 e
119 )
120 },
121 }
122 }
123 }
124 #[doc(hidden)]
125 #[allow(non_snake_case)]
126 pub mod __lookup_set_clr_callback {
127 use super::*;
128 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
129 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::func_3::Func_3<
130 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
131 crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,
132 crate::moon_sharp::interpreter::dynvalue::DynValue,
133 > as ::unity::IlType>::il_type()];
134 ::unity::lookup::method_info_on_class_with_signature(
135 <CallbackFunction as ::unity::ClassIdentity>::class(),
136 "set_ClrCallback",
137 1,
138 param_types,
139 false,
140 )
141 });
142 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
143 match &*METHOD {
144 ::core::result::Result::Ok(mi) => *mi,
145 ::core::result::Result::Err(e) => {
146 panic!(
147 "method lookup failed: {}
148::{}
149: {}
150",
151 <CallbackFunction as ::unity::ClassIdentity>::NAME,
152 "set_ClrCallback",
153 e
154 )
155 },
156 }
157 }
158 }
159 #[doc(hidden)]
160 #[allow(non_snake_case)]
161 pub mod __lookup_ctor {
162 use super::*;
163 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
164 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
165 <crate::system::func_3::Func_3<
166 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
167 crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,
168 crate::moon_sharp::interpreter::dynvalue::DynValue,
169 > as ::unity::IlType>::il_type(),
170 <::unity::Il2CppString as ::unity::IlType>::il_type(),
171 ];
172 ::unity::lookup::method_info_on_class_with_signature(
173 <CallbackFunction as ::unity::ClassIdentity>::class(),
174 ".ctor",
175 2,
176 param_types,
177 false,
178 )
179 });
180 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
181 match &*METHOD {
182 ::core::result::Result::Ok(mi) => *mi,
183 ::core::result::Result::Err(e) => {
184 panic!(
185 "method lookup failed: {}
186::{}
187: {}
188",
189 <CallbackFunction as ::unity::ClassIdentity>::NAME,
190 ".ctor",
191 e
192 )
193 },
194 }
195 }
196 }
197 #[doc(hidden)]
198 #[allow(non_snake_case)]
199 pub mod __lookup_invoke {
200 use super::*;
201 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
202 let param_types: &[& 'static::unity::il2cpp::Il2CppType]= &[<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as::unity::IlType> ::il_type(), <crate::system::collections::generic::ilist_1_interface::IList_1_Interface<crate::moon_sharp::interpreter::dynvalue::DynValue>as::unity::IlType> ::il_type(), <bool as::unity::IlType> ::il_type()];
203 ::unity::lookup::method_info_on_class_with_signature(
204 <CallbackFunction as ::unity::ClassIdentity>::class(),
205 "Invoke",
206 3,
207 param_types,
208 false,
209 )
210 });
211 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212 match &*METHOD {
213 ::core::result::Result::Ok(mi) => *mi,
214 ::core::result::Result::Err(e) => {
215 panic!(
216 "method lookup failed: {}
217::{}
218: {}
219",
220 <CallbackFunction as ::unity::ClassIdentity>::NAME,
221 "Invoke",
222 e
223 )
224 },
225 }
226 }
227 }
228 #[doc(hidden)]
229 #[allow(non_snake_case)]
230 pub mod __lookup_get_default_access_mode {
231 use super::*;
232 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
233 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
234 ::unity::lookup::method_info_on_class_with_signature(
235 <CallbackFunction as ::unity::ClassIdentity>::class(),
236 "get_DefaultAccessMode",
237 0,
238 param_types,
239 true,
240 )
241 });
242 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
243 match &*METHOD {
244 ::core::result::Result::Ok(mi) => *mi,
245 ::core::result::Result::Err(e) => {
246 panic!(
247 "method lookup failed: {}
248::{}
249: {}
250",
251 <CallbackFunction as ::unity::ClassIdentity>::NAME,
252 "get_DefaultAccessMode",
253 e
254 )
255 },
256 }
257 }
258 }
259 #[doc(hidden)]
260 #[allow(non_snake_case)]
261 pub mod __lookup_set_default_access_mode {
262 use super::*;
263 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
264 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
265 &[<crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode as ::unity::IlType>::il_type()];
266 ::unity::lookup::method_info_on_class_with_signature(
267 <CallbackFunction as ::unity::ClassIdentity>::class(),
268 "set_DefaultAccessMode",
269 1,
270 param_types,
271 true,
272 )
273 });
274 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
275 match &*METHOD {
276 ::core::result::Result::Ok(mi) => *mi,
277 ::core::result::Result::Err(e) => {
278 panic!(
279 "method lookup failed: {}
280::{}
281: {}
282",
283 <CallbackFunction as ::unity::ClassIdentity>::NAME,
284 "set_DefaultAccessMode",
285 e
286 )
287 },
288 }
289 }
290 }
291 #[doc(hidden)]
292 #[allow(non_snake_case)]
293 pub mod __lookup_from_delegate {
294 use super::*;
295 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
296 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
297 <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
298 <crate::system::delegate::Delegate as ::unity::IlType>::il_type(),
299 <crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode as ::unity::IlType>::il_type(),
300 ];
301 ::unity::lookup::method_info_on_class_with_signature(
302 <CallbackFunction as ::unity::ClassIdentity>::class(),
303 "FromDelegate",
304 3,
305 param_types,
306 true,
307 )
308 });
309 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 match &*METHOD {
311 ::core::result::Result::Ok(mi) => *mi,
312 ::core::result::Result::Err(e) => {
313 panic!(
314 "method lookup failed: {}
315::{}
316: {}
317",
318 <CallbackFunction as ::unity::ClassIdentity>::NAME,
319 "FromDelegate",
320 e
321 )
322 },
323 }
324 }
325 }
326 #[doc(hidden)]
327 #[allow(non_snake_case)]
328 pub mod __lookup_from_method_info {
329 use super::*;
330 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
331 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
332 <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
333 <crate::system::reflection::methodinfo::MethodInfo as ::unity::IlType>::il_type(),
334 <::unity::IlInstance as ::unity::IlType>::il_type(),
335 <crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode as ::unity::IlType>::il_type(),
336 ];
337 ::unity::lookup::method_info_on_class_with_signature(
338 <CallbackFunction as ::unity::ClassIdentity>::class(),
339 "FromMethodInfo",
340 4,
341 param_types,
342 true,
343 )
344 });
345 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
346 match &*METHOD {
347 ::core::result::Result::Ok(mi) => *mi,
348 ::core::result::Result::Err(e) => {
349 panic!(
350 "method lookup failed: {}
351::{}
352: {}
353",
354 <CallbackFunction as ::unity::ClassIdentity>::NAME,
355 "FromMethodInfo",
356 e
357 )
358 },
359 }
360 }
361 }
362 #[doc(hidden)]
363 #[allow(non_snake_case)]
364 pub mod __lookup_get_additional_data {
365 use super::*;
366 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
367 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
368 ::unity::lookup::method_info_on_class_with_signature(
369 <CallbackFunction as ::unity::ClassIdentity>::class(),
370 "get_AdditionalData",
371 0,
372 param_types,
373 false,
374 )
375 });
376 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
377 match &*METHOD {
378 ::core::result::Result::Ok(mi) => *mi,
379 ::core::result::Result::Err(e) => {
380 panic!(
381 "method lookup failed: {}
382::{}
383: {}
384",
385 <CallbackFunction as ::unity::ClassIdentity>::NAME,
386 "get_AdditionalData",
387 e
388 )
389 },
390 }
391 }
392 }
393 #[doc(hidden)]
394 #[allow(non_snake_case)]
395 pub mod __lookup_set_additional_data {
396 use super::*;
397 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
398 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::object::Object as ::unity::IlType>::il_type()];
399 ::unity::lookup::method_info_on_class_with_signature(
400 <CallbackFunction as ::unity::ClassIdentity>::class(),
401 "set_AdditionalData",
402 1,
403 param_types,
404 false,
405 )
406 });
407 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
408 match &*METHOD {
409 ::core::result::Result::Ok(mi) => *mi,
410 ::core::result::Result::Err(e) => {
411 panic!(
412 "method lookup failed: {}
413::{}
414: {}
415",
416 <CallbackFunction as ::unity::ClassIdentity>::NAME,
417 "set_AdditionalData",
418 e
419 )
420 },
421 }
422 }
423 }
424 #[doc(hidden)]
425 #[allow(non_snake_case)]
426 pub mod __lookup_check_callback_signature {
427 use super::*;
428 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
429 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
430 <crate::system::reflection::methodinfo::MethodInfo as ::unity::IlType>::il_type(),
431 <bool as ::unity::IlType>::il_type(),
432 ];
433 ::unity::lookup::method_info_on_class_with_signature(
434 <CallbackFunction as ::unity::ClassIdentity>::class(),
435 "CheckCallbackSignature",
436 2,
437 param_types,
438 true,
439 )
440 });
441 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
442 match &*METHOD {
443 ::core::result::Result::Ok(mi) => *mi,
444 ::core::result::Result::Err(e) => {
445 panic!(
446 "method lookup failed: {}
447::{}
448: {}
449",
450 <CallbackFunction as ::unity::ClassIdentity>::NAME,
451 "CheckCallbackSignature",
452 e
453 )
454 },
455 }
456 }
457 }
458 #[doc(hidden)]
459 #[allow(non_snake_case)]
460 pub mod __lookup_cctor {
461 use super::*;
462 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
463 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
464 ::unity::lookup::method_info_on_class_with_signature(
465 <CallbackFunction as ::unity::ClassIdentity>::class(),
466 ".cctor",
467 0,
468 param_types,
469 true,
470 )
471 });
472 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
473 match &*METHOD {
474 ::core::result::Result::Ok(mi) => *mi,
475 ::core::result::Result::Err(e) => {
476 panic!(
477 "method lookup failed: {}
478::{}
479: {}
480",
481 <CallbackFunction as ::unity::ClassIdentity>::NAME,
482 ".cctor",
483 e
484 )
485 },
486 }
487 }
488 }
489}
490
491#[cfg(feature = "moon_sharp-interpreter-callbackfunction")]
492impl CallbackFunction {
493 #[doc = "`get_DefaultAccessMode()` overload"]
494 pub fn get_default_access_mode() -> crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode {
495 unsafe {
496 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_get_default_access_mode::get_method_info().method_ptr,crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode;
497 )
498 }
499 }
500
501 #[doc = "`set_DefaultAccessMode(crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode)` overload"]
502 pub fn set_default_access_mode(value: impl ::core::convert::Into<crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode>) -> () {
503 unsafe {
504 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_set_default_access_mode::get_method_info().method_ptr,();
505(crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode)::core::convert::Into::into(value))
506 }
507 }
508
509 #[doc = "`FromDelegate(crate::moon_sharp::interpreter::script::Script, crate::system::delegate::Delegate, crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode)` overload"]
510 pub fn from_delegate(
511 script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
512 del: impl ::core::convert::Into<crate::system::delegate::Delegate>,
513 access_mode: impl ::core::convert::Into<crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode>,
514 ) -> crate::moon_sharp::interpreter::callbackfunction::CallbackFunction {
515 unsafe {
516 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_from_delegate::get_method_info().method_ptr,crate::moon_sharp::interpreter::callbackfunction::CallbackFunction;
517(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::system::delegate::Delegate)::core::convert::Into::into(del),(crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode)::core::convert::Into::into(access_mode))
518 }
519 }
520
521 #[doc = "`FromMethodInfo(crate::moon_sharp::interpreter::script::Script, crate::system::reflection::methodinfo::MethodInfo, ::unity::IlInstance, crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode)` overload"]
522 pub fn from_method_info(
523 script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
524 mi: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
525 obj: impl ::core::convert::Into<::unity::IlInstance>,
526 access_mode: impl ::core::convert::Into<crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode>,
527 ) -> crate::moon_sharp::interpreter::callbackfunction::CallbackFunction {
528 unsafe {
529 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_from_method_info::get_method_info().method_ptr,crate::moon_sharp::interpreter::callbackfunction::CallbackFunction;
530(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(mi),(::unity::IlInstance)::core::convert::Into::into(obj),(crate::moon_sharp::interpreter::interopaccessmode::InteropAccessMode)::core::convert::Into::into(access_mode))
531 }
532 }
533
534 #[doc = "`CheckCallbackSignature(crate::system::reflection::methodinfo::MethodInfo, bool)` overload"]
535 pub fn check_callback_signature(
536 mi: impl ::core::convert::Into<crate::system::reflection::methodinfo::MethodInfo>,
537 require_public_visibility: impl ::core::convert::Into<bool>,
538 ) -> bool {
539 unsafe {
540 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_check_callback_signature::get_method_info().method_ptr,bool;
541(crate::system::reflection::methodinfo::MethodInfo)::core::convert::Into::into(mi),(bool)::core::convert::Into::into(require_public_visibility))
542 }
543 }
544
545 #[doc = "`.cctor()` overload"]
546 pub fn cctor() -> () {
547 unsafe {
548 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_cctor::get_method_info().method_ptr,();
549 )
550 }
551 }
552}
553
554#[cfg(feature = "moon_sharp-interpreter-callbackfunction")]
555pub trait ICallbackFunctionMethods: ICallbackFunction {
556 #[doc = "`get_Name()` overload"]
557 fn get_name(self) -> ::unity::Il2CppString {
558 unsafe {
559 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
560 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_get_name::get_method_info().method_ptr, ::unity::Il2CppString;
561(CallbackFunction)__receiver)
562 }
563 }
564 #[doc = "`set_Name(::unity::Il2CppString)` overload"]
565 fn set_name(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
566 unsafe {
567 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
568 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_set_name::get_method_info().method_ptr,();
569(CallbackFunction)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
570 }
571 }
572 #[doc = "`get_ClrCallback()` overload"]
573 fn get_clr_callback(
574 self,
575 ) -> crate::system::func_3::Func_3<
576 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
577 crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,
578 crate::moon_sharp::interpreter::dynvalue::DynValue,
579 > {
580 unsafe {
581 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
582 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_get_clr_callback::get_method_info().method_ptr,crate::system::func_3::Func_3<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,crate::moon_sharp::interpreter::dynvalue::DynValue> ;
583(CallbackFunction)__receiver)
584 }
585 }
586 #[doc = "`set_ClrCallback(crate::system::func_3::Func_3<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,crate::moon_sharp::interpreter::dynvalue::DynValue>)` overload"]
587 fn set_clr_callback(
588 self,
589 value: impl ::core::convert::Into<
590 crate::system::func_3::Func_3<
591 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
592 crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,
593 crate::moon_sharp::interpreter::dynvalue::DynValue,
594 >,
595 >,
596 ) -> () {
597 unsafe {
598 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
599 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_set_clr_callback::get_method_info().method_ptr,();
600(CallbackFunction)__receiver,(crate::system::func_3::Func_3<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(value))
601 }
602 }
603 #[doc = "`.ctor(crate::system::func_3::Func_3<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,crate::moon_sharp::interpreter::dynvalue::DynValue>, ::unity::Il2CppString)` overload"]
604 fn ctor(
605 self,
606 call_back: impl ::core::convert::Into<
607 crate::system::func_3::Func_3<
608 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
609 crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,
610 crate::moon_sharp::interpreter::dynvalue::DynValue,
611 >,
612 >,
613 name: impl ::core::convert::Into<::unity::Il2CppString>,
614 ) -> () {
615 unsafe {
616 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
617 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
618(CallbackFunction)__receiver,(crate::system::func_3::Func_3<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(call_back),(::unity::Il2CppString)::core::convert::Into::into(name))
619 }
620 }
621 #[doc = "`Invoke(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext, crate::system::collections::generic::ilist_1_interface::IList_1_Interface<crate::moon_sharp::interpreter::dynvalue::DynValue>, bool)` overload"]
622 fn invoke(
623 self,
624 execution_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
625 args: impl ::core::convert::Into<
626 crate::system::collections::generic::ilist_1_interface::IList_1_Interface<crate::moon_sharp::interpreter::dynvalue::DynValue>,
627 >,
628 is_method_call: impl ::core::convert::Into<bool>,
629 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
630 unsafe {
631 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
632 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_invoke::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
633(CallbackFunction)__receiver,(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(execution_context),(crate::system::collections::generic::ilist_1_interface::IList_1_Interface<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(bool)::core::convert::Into::into(is_method_call))
634 }
635 }
636 #[doc = "`get_AdditionalData()` overload"]
637 fn get_additional_data(self) -> crate::system::object::Object {
638 unsafe {
639 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
640 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_get_additional_data::get_method_info().method_ptr,crate::system::object::Object;
641(CallbackFunction)__receiver)
642 }
643 }
644 #[doc = "`set_AdditionalData(crate::system::object::Object)` overload"]
645 fn set_additional_data(self, value: impl ::core::convert::Into<crate::system::object::Object>) -> () {
646 unsafe {
647 let __receiver = <CallbackFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
648 ::unity::il2cpp_call!(__CallbackFunction_unity_raw::__lookup_set_additional_data::get_method_info().method_ptr,();
649(CallbackFunction)__receiver,(crate::system::object::Object)::core::convert::Into::into(value))
650 }
651 }
652}
653
654#[cfg(feature = "moon_sharp-interpreter-callbackfunction")]
655impl<__T: ICallbackFunction> ICallbackFunctionMethods for __T {}
656
657#[cfg(feature = "moon_sharp-interpreter-callbackfunction")]
658impl CallbackFunction {
659 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
660 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
661 }
662
663 pub fn set_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
664 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
665 }
666
667 pub fn get_clr_callback_method_info() -> &'static ::unity::il2cpp::MethodInfo {
668 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
669 }
670
671 pub fn set_clr_callback_method_info() -> &'static ::unity::il2cpp::MethodInfo {
672 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
673 }
674
675 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
676 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
677 }
678
679 pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
680 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
681 }
682
683 pub fn get_default_access_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
684 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
685 }
686
687 pub fn set_default_access_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
688 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
689 }
690
691 pub fn from_delegate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
692 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
693 }
694
695 pub fn from_method_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
696 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
697 }
698
699 pub fn get_additional_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
700 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
701 }
702
703 pub fn set_additional_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
704 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
705 }
706
707 pub fn check_callback_signature_method_info() -> &'static ::unity::il2cpp::MethodInfo {
708 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
709 }
710
711 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
712 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
713 }
714}
715
716#[cfg(feature = "moon_sharp-interpreter-callbackfunction")]
717impl CallbackFunction {
718 #[doc = "`.ctor(crate::system::func_3::Func_3<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,crate::moon_sharp::interpreter::dynvalue::DynValue>, ::unity::Il2CppString)` — overload selector"]
719 pub fn new(
720 call_back: crate::system::func_3::Func_3<
721 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
722 crate::moon_sharp::interpreter::callbackarguments::CallbackArguments,
723 crate::moon_sharp::interpreter::dynvalue::DynValue,
724 >,
725 name: ::unity::Il2CppString,
726 ) -> Self {
727 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
728 panic!(
729 "{}
730::{}
731 failed to instantiate",
732 ::core::stringify!(CallbackFunction),
733 ::core::stringify!(new),
734 )
735 });
736 <Self as ICallbackFunctionMethods>::ctor(this, call_back, name);
737 this
738 }
739}
740
741#[cfg(feature = "moon_sharp-interpreter-callbackfunction")]
742#[doc(hidden)]
743pub mod prelude {
744 pub use super::{CallbackFunction, ICallbackFunction, ICallbackFunctionMethods};
745 #[cfg(feature = "moon_sharp-interpreter-refidobject")]
746 pub use crate::moon_sharp::interpreter::refidobject::IRefIdObjectMethods;
747 #[cfg(feature = "system-object")]
748 pub use crate::system::object::IObjectMethods;
749 pub use crate::{moon_sharp::interpreter::refidobject::IRefIdObject, system::object::IObject};
750}