1#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode-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/moon_sharp/interpreter/debugging/sourcecode/SourceCode.md"))]
11 #[::unity::class(namespace = "MoonSharp.Interpreter.Debugging", name = "SourceCode")]
12 #[parent(crate::system::object::Object)]
13 pub struct SourceCode {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __SourceCode_unity_raw {
23 use super::*;
24 #[doc(hidden)]
25 #[allow(non_snake_case)]
26 pub mod __lookup_get_name {
27 use super::*;
28 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
29 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
30 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "get_Name", 0, param_types, false)
31 });
32 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
33 match &*METHOD {
34 ::core::result::Result::Ok(mi) => *mi,
35 ::core::result::Result::Err(e) => {
36 panic!(
37 "method lookup failed: {}
38::{}
39: {}
40",
41 <SourceCode as ::unity::ClassIdentity>::NAME,
42 "get_Name",
43 e
44 )
45 },
46 }
47 }
48 }
49 #[doc(hidden)]
50 #[allow(non_snake_case)]
51 pub mod __lookup_set_name {
52 use super::*;
53 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
54 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<::unity::Il2CppString as ::unity::IlType>::il_type()];
55 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "set_Name", 1, param_types, false)
56 });
57 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
58 match &*METHOD {
59 ::core::result::Result::Ok(mi) => *mi,
60 ::core::result::Result::Err(e) => {
61 panic!(
62 "method lookup failed: {}
63::{}
64: {}
65",
66 <SourceCode as ::unity::ClassIdentity>::NAME,
67 "set_Name",
68 e
69 )
70 },
71 }
72 }
73 }
74 #[doc(hidden)]
75 #[allow(non_snake_case)]
76 pub mod __lookup_get_code {
77 use super::*;
78 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
79 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
80 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "get_Code", 0, param_types, false)
81 });
82 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
83 match &*METHOD {
84 ::core::result::Result::Ok(mi) => *mi,
85 ::core::result::Result::Err(e) => {
86 panic!(
87 "method lookup failed: {}
88::{}
89: {}
90",
91 <SourceCode as ::unity::ClassIdentity>::NAME,
92 "get_Code",
93 e
94 )
95 },
96 }
97 }
98 }
99 #[doc(hidden)]
100 #[allow(non_snake_case)]
101 pub mod __lookup_set_code {
102 use super::*;
103 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
104 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<::unity::Il2CppString as ::unity::IlType>::il_type()];
105 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "set_Code", 1, param_types, false)
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 <SourceCode as ::unity::ClassIdentity>::NAME,
117 "set_Code",
118 e
119 )
120 },
121 }
122 }
123 }
124 #[doc(hidden)]
125 #[allow(non_snake_case)]
126 pub mod __lookup_get_lines {
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] = &[];
130 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "get_Lines", 0, param_types, false)
131 });
132 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
133 match &*METHOD {
134 ::core::result::Result::Ok(mi) => *mi,
135 ::core::result::Result::Err(e) => {
136 panic!(
137 "method lookup failed: {}
138::{}
139: {}
140",
141 <SourceCode as ::unity::ClassIdentity>::NAME,
142 "get_Lines",
143 e
144 )
145 },
146 }
147 }
148 }
149 #[doc(hidden)]
150 #[allow(non_snake_case)]
151 pub mod __lookup_set_lines {
152 use super::*;
153 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
154 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<::unity::Array<::unity::Il2CppString> as ::unity::IlType>::il_type()];
155 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "set_Lines", 1, param_types, false)
156 });
157 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158 match &*METHOD {
159 ::core::result::Result::Ok(mi) => *mi,
160 ::core::result::Result::Err(e) => {
161 panic!(
162 "method lookup failed: {}
163::{}
164: {}
165",
166 <SourceCode as ::unity::ClassIdentity>::NAME,
167 "set_Lines",
168 e
169 )
170 },
171 }
172 }
173 }
174 #[doc(hidden)]
175 #[allow(non_snake_case)]
176 pub mod __lookup_set_owner_script {
177 use super::*;
178 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
179 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
180 &[<crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type()];
181 ::unity::lookup::method_info_on_class_with_signature(
182 <SourceCode as ::unity::ClassIdentity>::class(),
183 "set_OwnerScript",
184 1,
185 param_types,
186 false,
187 )
188 });
189 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190 match &*METHOD {
191 ::core::result::Result::Ok(mi) => *mi,
192 ::core::result::Result::Err(e) => {
193 panic!(
194 "method lookup failed: {}
195::{}
196: {}
197",
198 <SourceCode as ::unity::ClassIdentity>::NAME,
199 "set_OwnerScript",
200 e
201 )
202 },
203 }
204 }
205 }
206 #[doc(hidden)]
207 #[allow(non_snake_case)]
208 pub mod __lookup_get_source_id {
209 use super::*;
210 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
211 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
212 ::unity::lookup::method_info_on_class_with_signature(
213 <SourceCode as ::unity::ClassIdentity>::class(),
214 "get_SourceID",
215 0,
216 param_types,
217 false,
218 )
219 });
220 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221 match &*METHOD {
222 ::core::result::Result::Ok(mi) => *mi,
223 ::core::result::Result::Err(e) => {
224 panic!(
225 "method lookup failed: {}
226::{}
227: {}
228",
229 <SourceCode as ::unity::ClassIdentity>::NAME,
230 "get_SourceID",
231 e
232 )
233 },
234 }
235 }
236 }
237 #[doc(hidden)]
238 #[allow(non_snake_case)]
239 pub mod __lookup_set_source_id {
240 use super::*;
241 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
242 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<i32 as ::unity::IlType>::il_type()];
243 ::unity::lookup::method_info_on_class_with_signature(
244 <SourceCode as ::unity::ClassIdentity>::class(),
245 "set_SourceID",
246 1,
247 param_types,
248 false,
249 )
250 });
251 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
252 match &*METHOD {
253 ::core::result::Result::Ok(mi) => *mi,
254 ::core::result::Result::Err(e) => {
255 panic!(
256 "method lookup failed: {}
257::{}
258: {}
259",
260 <SourceCode as ::unity::ClassIdentity>::NAME,
261 "set_SourceID",
262 e
263 )
264 },
265 }
266 }
267 }
268 #[doc(hidden)]
269 #[allow(non_snake_case)]
270 pub mod __lookup_get_refs {
271 use super::*;
272 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
273 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
274 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "get_Refs", 0, param_types, false)
275 });
276 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
277 match &*METHOD {
278 ::core::result::Result::Ok(mi) => *mi,
279 ::core::result::Result::Err(e) => {
280 panic!(
281 "method lookup failed: {}
282::{}
283: {}
284",
285 <SourceCode as ::unity::ClassIdentity>::NAME,
286 "get_Refs",
287 e
288 )
289 },
290 }
291 }
292 }
293 #[doc(hidden)]
294 #[allow(non_snake_case)]
295 pub mod __lookup_set_refs {
296 use super::*;
297 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
298 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::collections::generic::list_1::List_1<
299 crate::moon_sharp::interpreter::debugging::sourceref::SourceRef,
300 > as ::unity::IlType>::il_type()];
301 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), "set_Refs", 1, param_types, false)
302 });
303 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
304 match &*METHOD {
305 ::core::result::Result::Ok(mi) => *mi,
306 ::core::result::Result::Err(e) => {
307 panic!(
308 "method lookup failed: {}
309::{}
310: {}
311",
312 <SourceCode as ::unity::ClassIdentity>::NAME,
313 "set_Refs",
314 e
315 )
316 },
317 }
318 }
319 }
320 #[doc(hidden)]
321 #[allow(non_snake_case)]
322 pub mod __lookup_ctor {
323 use super::*;
324 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
325 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
326 <::unity::Il2CppString as ::unity::IlType>::il_type(),
327 <::unity::Il2CppString as ::unity::IlType>::il_type(),
328 <i32 as ::unity::IlType>::il_type(),
329 <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
330 ];
331 ::unity::lookup::method_info_on_class_with_signature(<SourceCode as ::unity::ClassIdentity>::class(), ".ctor", 4, param_types, false)
332 });
333 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
334 match &*METHOD {
335 ::core::result::Result::Ok(mi) => *mi,
336 ::core::result::Result::Err(e) => {
337 panic!(
338 "method lookup failed: {}
339::{}
340: {}
341",
342 <SourceCode as ::unity::ClassIdentity>::NAME,
343 ".ctor",
344 e
345 )
346 },
347 }
348 }
349 }
350 #[doc(hidden)]
351 #[allow(non_snake_case)]
352 pub mod __lookup_get_code_snippet {
353 use super::*;
354 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
355 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
356 &[<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef as ::unity::IlType>::il_type()];
357 ::unity::lookup::method_info_on_class_with_signature(
358 <SourceCode as ::unity::ClassIdentity>::class(),
359 "GetCodeSnippet",
360 1,
361 param_types,
362 false,
363 )
364 });
365 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
366 match &*METHOD {
367 ::core::result::Result::Ok(mi) => *mi,
368 ::core::result::Result::Err(e) => {
369 panic!(
370 "method lookup failed: {}
371::{}
372: {}
373",
374 <SourceCode as ::unity::ClassIdentity>::NAME,
375 "GetCodeSnippet",
376 e
377 )
378 },
379 }
380 }
381 }
382 #[doc(hidden)]
383 #[allow(non_snake_case)]
384 pub mod __lookup_adjust_str_index {
385 use super::*;
386 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
387 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
388 &[<::unity::Il2CppString as ::unity::IlType>::il_type(), <i32 as ::unity::IlType>::il_type()];
389 ::unity::lookup::method_info_on_class_with_signature(
390 <SourceCode as ::unity::ClassIdentity>::class(),
391 "AdjustStrIndex",
392 2,
393 param_types,
394 false,
395 )
396 });
397 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
398 match &*METHOD {
399 ::core::result::Result::Ok(mi) => *mi,
400 ::core::result::Result::Err(e) => {
401 panic!(
402 "method lookup failed: {}
403::{}
404: {}
405",
406 <SourceCode as ::unity::ClassIdentity>::NAME,
407 "AdjustStrIndex",
408 e
409 )
410 },
411 }
412 }
413 }
414}
415
416#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode")]
417pub trait ISourceCodeMethods: ISourceCode {
418 #[doc = "`get_Name()` overload"]
419 fn get_name(self) -> ::unity::Il2CppString {
420 unsafe {
421 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
422 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_get_name::get_method_info().method_ptr, ::unity::Il2CppString;
423(SourceCode)__receiver)
424 }
425 }
426 #[doc = "`set_Name(::unity::Il2CppString)` overload"]
427 fn set_name(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
428 unsafe {
429 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
430 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_set_name::get_method_info().method_ptr,();
431(SourceCode)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
432 }
433 }
434 #[doc = "`get_Code()` overload"]
435 fn get_code(self) -> ::unity::Il2CppString {
436 unsafe {
437 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
438 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_get_code::get_method_info().method_ptr, ::unity::Il2CppString;
439(SourceCode)__receiver)
440 }
441 }
442 #[doc = "`set_Code(::unity::Il2CppString)` overload"]
443 fn set_code(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
444 unsafe {
445 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
446 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_set_code::get_method_info().method_ptr,();
447(SourceCode)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
448 }
449 }
450 #[doc = "`get_Lines()` overload"]
451 fn get_lines(self) -> ::unity::Array<::unity::Il2CppString> {
452 unsafe {
453 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
454 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_get_lines::get_method_info().method_ptr, ::unity::Array< ::unity::Il2CppString> ;
455(SourceCode)__receiver)
456 }
457 }
458 #[doc = "`set_Lines(::unity::Array<::unity::Il2CppString>)` overload"]
459 fn set_lines(self, value: impl ::core::convert::Into<::unity::Array<::unity::Il2CppString>>) -> () {
460 unsafe {
461 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
462 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_set_lines::get_method_info().method_ptr,();
463(SourceCode)__receiver,(::unity::Array< ::unity::Il2CppString>)::core::convert::Into::into(value))
464 }
465 }
466 #[doc = "`get_OwnerScript()` overload"]
467 fn get_owner_script(self) -> crate::moon_sharp::interpreter::script::Script {
468 unsafe {
469 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
470 {
471 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
472 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
473 panic!(
474 "unity: virtual slot {}
475 out of range (vtable len {}
476) on the runtime class behind {}
477 (method `{}
478`)",
479 4usize,
480 __vt.len(),
481 <SourceCode as ::unity::ClassIdentity>::NAME,
482 "get_OwnerScript",
483 )
484 });
485 let __inner: extern "C" fn(SourceCode, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
486 ::core::mem::transmute(__vi.method_ptr);
487 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
488 __inner(__receiver, __mi)
489 }
490 }
491 }
492 #[doc = "`set_OwnerScript(crate::moon_sharp::interpreter::script::Script)` overload"]
493 fn set_owner_script(self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>) -> () {
494 unsafe {
495 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
496 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_set_owner_script::get_method_info().method_ptr,();
497(SourceCode)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(value))
498 }
499 }
500 #[doc = "`get_SourceID()` overload"]
501 fn get_source_id(self) -> i32 {
502 unsafe {
503 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
504 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_get_source_id::get_method_info().method_ptr,i32;
505(SourceCode)__receiver)
506 }
507 }
508 #[doc = "`set_SourceID(i32)` overload"]
509 fn set_source_id(self, value: impl ::core::convert::Into<i32>) -> () {
510 unsafe {
511 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
512 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_set_source_id::get_method_info().method_ptr,();
513(SourceCode)__receiver,(i32)::core::convert::Into::into(value))
514 }
515 }
516 #[doc = "`get_Refs()` overload"]
517 fn get_refs(self) -> crate::system::collections::generic::list_1::List_1<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef> {
518 unsafe {
519 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
520 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_get_refs::get_method_info().method_ptr,crate::system::collections::generic::list_1::List_1<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef> ;
521(SourceCode)__receiver)
522 }
523 }
524 #[doc = "`set_Refs(crate::system::collections::generic::list_1::List_1<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef>)` overload"]
525 fn set_refs(
526 self,
527 value: impl ::core::convert::Into<
528 crate::system::collections::generic::list_1::List_1<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef>,
529 >,
530 ) -> () {
531 unsafe {
532 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
533 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_set_refs::get_method_info().method_ptr,();
534(SourceCode)__receiver,(crate::system::collections::generic::list_1::List_1<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef>)::core::convert::Into::into(value))
535 }
536 }
537 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString, i32, crate::moon_sharp::interpreter::script::Script)` overload"]
538 fn ctor(
539 self,
540 name: impl ::core::convert::Into<::unity::Il2CppString>,
541 code: impl ::core::convert::Into<::unity::Il2CppString>,
542 source_id: impl ::core::convert::Into<i32>,
543 owner_script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
544 ) -> () {
545 unsafe {
546 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
547 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
548(SourceCode)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(::unity::Il2CppString)::core::convert::Into::into(code),(i32)::core::convert::Into::into(source_id),(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(owner_script))
549 }
550 }
551 #[doc = "`GetCodeSnippet(crate::moon_sharp::interpreter::debugging::sourceref::SourceRef)` overload"]
552 fn get_code_snippet(
553 self,
554 source_code_ref: impl ::core::convert::Into<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef>,
555 ) -> ::unity::Il2CppString {
556 unsafe {
557 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
558 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_get_code_snippet::get_method_info().method_ptr, ::unity::Il2CppString;
559(SourceCode)__receiver,(crate::moon_sharp::interpreter::debugging::sourceref::SourceRef)::core::convert::Into::into(source_code_ref))
560 }
561 }
562 #[doc = "`AdjustStrIndex(::unity::Il2CppString, i32)` overload"]
563 fn adjust_str_index(self, str: impl ::core::convert::Into<::unity::Il2CppString>, loc: impl ::core::convert::Into<i32>) -> i32 {
564 unsafe {
565 let __receiver = <SourceCode as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
566 ::unity::il2cpp_call!(__SourceCode_unity_raw::__lookup_adjust_str_index::get_method_info().method_ptr,i32;
567(SourceCode)__receiver,(::unity::Il2CppString)::core::convert::Into::into(str),(i32)::core::convert::Into::into(loc))
568 }
569 }
570}
571
572#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode")]
573impl<__T: ISourceCode> ISourceCodeMethods for __T {}
574
575#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode")]
576impl SourceCode {
577 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
578 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
579 }
580
581 pub fn set_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
582 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
583 }
584
585 pub fn get_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
586 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
587 }
588
589 pub fn set_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
590 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
591 }
592
593 pub fn get_lines_method_info() -> &'static ::unity::il2cpp::MethodInfo {
594 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
595 }
596
597 pub fn set_lines_method_info() -> &'static ::unity::il2cpp::MethodInfo {
598 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
599 }
600
601 pub fn get_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
602 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
603 }
604
605 pub fn set_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
606 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
607 }
608
609 pub fn get_source_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
610 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
611 }
612
613 pub fn set_source_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
614 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
615 }
616
617 pub fn get_refs_method_info() -> &'static ::unity::il2cpp::MethodInfo {
618 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
619 }
620
621 pub fn set_refs_method_info() -> &'static ::unity::il2cpp::MethodInfo {
622 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
623 }
624
625 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
626 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
627 }
628
629 pub fn get_code_snippet_method_info() -> &'static ::unity::il2cpp::MethodInfo {
630 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
631 }
632
633 pub fn adjust_str_index_method_info() -> &'static ::unity::il2cpp::MethodInfo {
634 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
635 }
636}
637
638#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode")]
639impl SourceCode {
640 #[doc = "Direct (non-virtual) call to `SourceCode`'s own `get_OwnerScript`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
641 pub unsafe fn get_owner_script(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::moon_sharp::interpreter::script::Script {
642 let __mi = Self::get_owner_script_method_info();
643 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
644 ::core::mem::transmute(__mi.method_ptr);
645 __inner(this.into(), ::core::option::Option::None)
646 }
647}
648
649#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode")]
650impl SourceCode {
651 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString, i32, crate::moon_sharp::interpreter::script::Script)` — overload selector"]
652 pub fn new(
653 name: ::unity::Il2CppString,
654 code: ::unity::Il2CppString,
655 source_id: i32,
656 owner_script: crate::moon_sharp::interpreter::script::Script,
657 ) -> Self {
658 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
659 panic!(
660 "{}
661::{}
662 failed to instantiate",
663 ::core::stringify!(SourceCode),
664 ::core::stringify!(new),
665 )
666 });
667 <Self as ISourceCodeMethods>::ctor(this, name, code, source_id, owner_script);
668 this
669 }
670}
671
672#[cfg(feature = "moon_sharp-interpreter-debugging-sourcecode")]
673#[doc(hidden)]
674pub mod prelude {
675 pub use super::{ISourceCode, ISourceCodeMethods, SourceCode};
676 pub use crate::system::object::IObject;
677 #[cfg(feature = "system-object")]
678 pub use crate::system::object::IObjectMethods;
679}