1#[cfg(feature = "system-io-textreader-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/io/textreader/TextReader.md"))]
11 #[::unity::class(namespace = "System.IO", name = "TextReader")]
12 pub struct TextReader {
13 #[static_field]
14 #[rename(name = "_ReadLineDelegate")]
15 pub read_line_delegate: crate::system::func_2::Func_2<crate::system::object::Object, ::unity::Il2CppString>,
16 #[static_field]
17 #[rename(name = "_ReadDelegate")]
18 pub read_delegate: crate::system::func_2::Func_2<crate::system::object::Object, i32>,
19 #[static_field]
20 #[rename(name = "Null")]
21 pub null: crate::system::io::textreader::TextReader,
22 }
23
24 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/textreader/TextReader_NullTextReader.md"))]
25 #[::unity::class(namespace = "System.IO", name = "TextReader.NullTextReader")]
26 #[parent(crate::system::io::textreader::TextReader)]
27 pub struct TextReader_NullTextReader {}
28
29 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/textreader/TextReader_SyncTextReader.md"))]
30 #[::unity::class(namespace = "System.IO", name = "TextReader.SyncTextReader")]
31 #[parent(crate::system::io::textreader::TextReader)]
32 pub struct TextReader_SyncTextReader {
33 #[offset(24)]
34 #[rename(name = "_in")]
35 pub r#in: crate::system::io::textreader::TextReader,
36 }
37}
38
39#[cfg(feature = "system-io-textreader-types")]
40pub use __types::*;
41
42#[cfg(feature = "system-io-textreader")]
43impl TextReader {
44 #[doc = "`Synchronized(crate::system::io::textreader::TextReader)` overload"]
45 pub fn synchronized(reader: impl ::core::convert::Into<crate::system::io::textreader::TextReader>) -> crate::system::io::textreader::TextReader {
46 unsafe {
47 ::unity::il2cpp_call!((::unity::module_base()+0x34e10b0usize)as*mut u8,crate::system::io::textreader::TextReader;
48(crate::system::io::textreader::TextReader)::core::convert::Into::into(reader))
49 }
50 }
51
52 #[doc = "`.cctor()` overload"]
53 pub fn cctor() -> () {
54 unsafe {
55 ::unity::il2cpp_call!((::unity::module_base()+0x34e1170usize)as*mut u8,();
56 )
57 }
58 }
59}
60
61#[cfg(feature = "system-io-textreader")]
62pub trait ITextReaderMethods: ITextReader {
63 #[doc = "`.ctor()` overload"]
64 fn ctor(self) -> () {
65 unsafe {
66 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
67 ::unity::il2cpp_call!((::unity::module_base()+0x34e0b30usize)as*mut u8,();
68(TextReader)__receiver)
69 }
70 }
71 #[doc = "`Close()` overload"]
72 fn close(self) -> () {
73 unsafe {
74 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
75 {
76 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
77 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
78 panic!(
79 "unity: virtual slot {}
80 out of range (vtable len {}
81) on the runtime class behind {}
82 (method `{}
83`)",
84 7usize,
85 __vt.len(),
86 <TextReader as ::unity::ClassIdentity>::NAME,
87 "Close",
88 )
89 });
90 let __inner: extern "C" fn(TextReader, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
91 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
92 __inner(__receiver, __mi)
93 }
94 }
95 }
96 #[doc = "`Dispose()` overload"]
97 fn dispose(self) -> () {
98 unsafe {
99 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100 {
101 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
102 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
103 panic!(
104 "unity: virtual slot {}
105 out of range (vtable len {}
106) on the runtime class behind {}
107 (method `{}
108`)",
109 6usize,
110 __vt.len(),
111 <TextReader as ::unity::ClassIdentity>::NAME,
112 "Dispose",
113 )
114 });
115 let __inner: extern "C" fn(TextReader, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
116 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
117 __inner(__receiver, __mi)
118 }
119 }
120 }
121 #[doc = "`Dispose(bool)` overload"]
122 fn dispose_2(self, disposing: impl ::core::convert::Into<bool>) -> () {
123 unsafe {
124 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
125 {
126 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
127 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
128 panic!(
129 "unity: virtual slot {}
130 out of range (vtable len {}
131) on the runtime class behind {}
132 (method `{}
133`)",
134 8usize,
135 __vt.len(),
136 <TextReader as ::unity::ClassIdentity>::NAME,
137 "Dispose",
138 )
139 });
140 let __inner: extern "C" fn(TextReader, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
141 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
142 __inner(__receiver, ::core::convert::Into::into(disposing), __mi)
143 }
144 }
145 }
146 #[doc = "`Peek()` overload"]
147 fn peek(self) -> i32 {
148 unsafe {
149 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
150 {
151 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
152 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
153 panic!(
154 "unity: virtual slot {}
155 out of range (vtable len {}
156) on the runtime class behind {}
157 (method `{}
158`)",
159 9usize,
160 __vt.len(),
161 <TextReader as ::unity::ClassIdentity>::NAME,
162 "Peek",
163 )
164 });
165 let __inner: extern "C" fn(TextReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
166 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
167 __inner(__receiver, __mi)
168 }
169 }
170 }
171 #[doc = "`Read()` overload"]
172 fn read(self) -> i32 {
173 unsafe {
174 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
175 {
176 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
177 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
178 panic!(
179 "unity: virtual slot {}
180 out of range (vtable len {}
181) on the runtime class behind {}
182 (method `{}
183`)",
184 10usize,
185 __vt.len(),
186 <TextReader as ::unity::ClassIdentity>::NAME,
187 "Read",
188 )
189 });
190 let __inner: extern "C" fn(TextReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
191 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
192 __inner(__receiver, __mi)
193 }
194 }
195 }
196 #[doc = "`Read(::unity::Array<u16>, i32, i32)` overload"]
197 fn read_2(
198 self,
199 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
200 index: impl ::core::convert::Into<i32>,
201 count: impl ::core::convert::Into<i32>,
202 ) -> i32 {
203 unsafe {
204 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
205 {
206 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
207 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
208 panic!(
209 "unity: virtual slot {}
210 out of range (vtable len {}
211) on the runtime class behind {}
212 (method `{}
213`)",
214 11usize,
215 __vt.len(),
216 <TextReader as ::unity::ClassIdentity>::NAME,
217 "Read",
218 )
219 });
220 let __inner: extern "C" fn(TextReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
221 ::core::mem::transmute(__vi.method_ptr);
222 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
223 __inner(
224 __receiver,
225 ::core::convert::Into::into(buffer),
226 ::core::convert::Into::into(index),
227 ::core::convert::Into::into(count),
228 __mi,
229 )
230 }
231 }
232 }
233 #[doc = "`ReadToEnd()` overload"]
234 fn read_to_end(self) -> ::unity::Il2CppString {
235 unsafe {
236 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
237 {
238 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
239 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
240 panic!(
241 "unity: virtual slot {}
242 out of range (vtable len {}
243) on the runtime class behind {}
244 (method `{}
245`)",
246 12usize,
247 __vt.len(),
248 <TextReader as ::unity::ClassIdentity>::NAME,
249 "ReadToEnd",
250 )
251 });
252 let __inner: extern "C" fn(TextReader, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
253 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
254 __inner(__receiver, __mi)
255 }
256 }
257 }
258 #[doc = "`ReadBlock(::unity::Array<u16>, i32, i32)` overload"]
259 fn read_block(
260 self,
261 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
262 index: impl ::core::convert::Into<i32>,
263 count: impl ::core::convert::Into<i32>,
264 ) -> i32 {
265 unsafe {
266 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
267 {
268 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
269 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
270 panic!(
271 "unity: virtual slot {}
272 out of range (vtable len {}
273) on the runtime class behind {}
274 (method `{}
275`)",
276 13usize,
277 __vt.len(),
278 <TextReader as ::unity::ClassIdentity>::NAME,
279 "ReadBlock",
280 )
281 });
282 let __inner: extern "C" fn(TextReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
283 ::core::mem::transmute(__vi.method_ptr);
284 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
285 __inner(
286 __receiver,
287 ::core::convert::Into::into(buffer),
288 ::core::convert::Into::into(index),
289 ::core::convert::Into::into(count),
290 __mi,
291 )
292 }
293 }
294 }
295 #[doc = "`ReadLine()` overload"]
296 fn read_line(self) -> ::unity::Il2CppString {
297 unsafe {
298 let __receiver = <TextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
299 {
300 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
301 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
302 panic!(
303 "unity: virtual slot {}
304 out of range (vtable len {}
305) on the runtime class behind {}
306 (method `{}
307`)",
308 14usize,
309 __vt.len(),
310 <TextReader as ::unity::ClassIdentity>::NAME,
311 "ReadLine",
312 )
313 });
314 let __inner: extern "C" fn(TextReader, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
315 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
316 __inner(__receiver, __mi)
317 }
318 }
319 }
320}
321
322#[cfg(feature = "system-io-textreader")]
323impl<__T: ITextReader> ITextReaderMethods for __T {}
324
325#[cfg(feature = "system-io-textreader")]
326impl TextReader {
327 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
328 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
329 }
330
331 pub fn close_method_info() -> &'static ::unity::il2cpp::MethodInfo {
332 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
333 }
334
335 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
336 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
337 }
338
339 pub fn dispose_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
340 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
341 }
342
343 pub fn peek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
344 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
345 }
346
347 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
348 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
349 }
350
351 pub fn read_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
352 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
353 }
354
355 pub fn read_to_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
356 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
357 }
358
359 pub fn read_block_method_info() -> &'static ::unity::il2cpp::MethodInfo {
360 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
361 }
362
363 pub fn read_line_method_info() -> &'static ::unity::il2cpp::MethodInfo {
364 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
365 }
366
367 pub fn synchronized_method_info() -> &'static ::unity::il2cpp::MethodInfo {
368 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
369 }
370
371 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
372 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
373 }
374}
375
376#[cfg(feature = "system-io-textreader")]
377impl TextReader {
378 #[doc = "Direct (non-virtual) call to `TextReader`'s own `Close`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
379 pub unsafe fn close(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
380 let __mi = Self::close_method_info();
381 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
382 __inner(this.into(), ::core::option::Option::None)
383 }
384
385 #[doc = "Direct (non-virtual) call to `TextReader`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
386 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
387 let __mi = Self::dispose_method_info();
388 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
389 __inner(this.into(), ::core::option::Option::None)
390 }
391
392 #[doc = "Direct (non-virtual) call to `TextReader`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
393 pub unsafe fn dispose_2(this: impl ::core::convert::Into<::unity::IlInstance>, disposing: bool) -> () {
394 let __mi = Self::dispose_2_method_info();
395 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
396 __inner(this.into(), disposing, ::core::option::Option::None)
397 }
398
399 #[doc = "Direct (non-virtual) call to `TextReader`'s own `Peek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
400 pub unsafe fn peek(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
401 let __mi = Self::peek_method_info();
402 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
403 __inner(this.into(), ::core::option::Option::None)
404 }
405
406 #[doc = "Direct (non-virtual) call to `TextReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
407 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
408 let __mi = Self::read_method_info();
409 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
410 __inner(this.into(), ::core::option::Option::None)
411 }
412
413 #[doc = "Direct (non-virtual) call to `TextReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
414 pub unsafe fn read_2(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
415 let __mi = Self::read_2_method_info();
416 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
417 ::core::mem::transmute(__mi.method_ptr);
418 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
419 }
420
421 #[doc = "Direct (non-virtual) call to `TextReader`'s own `ReadToEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
422 pub unsafe fn read_to_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
423 let __mi = Self::read_to_end_method_info();
424 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
425 __inner(this.into(), ::core::option::Option::None)
426 }
427
428 #[doc = "Direct (non-virtual) call to `TextReader`'s own `ReadBlock`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
429 pub unsafe fn read_block(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
430 let __mi = Self::read_block_method_info();
431 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
432 ::core::mem::transmute(__mi.method_ptr);
433 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
434 }
435
436 #[doc = "Direct (non-virtual) call to `TextReader`'s own `ReadLine`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
437 pub unsafe fn read_line(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
438 let __mi = Self::read_line_method_info();
439 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
440 __inner(this.into(), ::core::option::Option::None)
441 }
442}
443
444#[cfg(feature = "system-io-textreader")]
445impl TextReader {
446 #[doc = "`.ctor()` — no args"]
447 pub fn new() -> Self {
448 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
449 panic!(
450 "{}
451::{}
452 failed to instantiate",
453 ::core::stringify!(TextReader),
454 ::core::stringify!(new),
455 )
456 });
457 <Self as ITextReaderMethods>::ctor(this);
458 this
459 }
460}
461
462#[cfg(feature = "system-io-textreader")]
463pub trait ITextReader_NullTextReaderMethods: ITextReader_NullTextReader {
464 #[doc = "`.ctor()` overload"]
465 fn ctor(self) -> () {
466 unsafe {
467 let __receiver =
468 <TextReader_NullTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
469 ::unity::il2cpp_call!((::unity::module_base()+0x3c5a6e0usize)as*mut u8,();
470(TextReader_NullTextReader)__receiver)
471 }
472 }
473 #[doc = "`Read(::unity::Array<u16>, i32, i32)` overload"]
474 fn read(
475 self,
476 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
477 index: impl ::core::convert::Into<i32>,
478 count: impl ::core::convert::Into<i32>,
479 ) -> i32 {
480 unsafe {
481 let __receiver =
482 <TextReader_NullTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
483 {
484 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
485 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
486 panic!(
487 "unity: virtual slot {}
488 out of range (vtable len {}
489) on the runtime class behind {}
490 (method `{}
491`)",
492 11usize,
493 __vt.len(),
494 <TextReader_NullTextReader as ::unity::ClassIdentity>::NAME,
495 "Read",
496 )
497 });
498 let __inner: extern "C" fn(TextReader_NullTextReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
499 ::core::mem::transmute(__vi.method_ptr);
500 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
501 __inner(
502 __receiver,
503 ::core::convert::Into::into(buffer),
504 ::core::convert::Into::into(index),
505 ::core::convert::Into::into(count),
506 __mi,
507 )
508 }
509 }
510 }
511 #[doc = "`ReadLine()` overload"]
512 fn read_line(self) -> ::unity::Il2CppString {
513 unsafe {
514 let __receiver =
515 <TextReader_NullTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
516 {
517 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
518 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
519 panic!(
520 "unity: virtual slot {}
521 out of range (vtable len {}
522) on the runtime class behind {}
523 (method `{}
524`)",
525 14usize,
526 __vt.len(),
527 <TextReader_NullTextReader as ::unity::ClassIdentity>::NAME,
528 "ReadLine",
529 )
530 });
531 let __inner: extern "C" fn(TextReader_NullTextReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
532 ::core::mem::transmute(__vi.method_ptr);
533 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
534 __inner(__receiver, __mi)
535 }
536 }
537 }
538}
539
540#[cfg(feature = "system-io-textreader")]
541impl<__T: ITextReader_NullTextReader> ITextReader_NullTextReaderMethods for __T {}
542
543#[cfg(feature = "system-io-textreader")]
544impl TextReader_NullTextReader {
545 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
546 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
547 }
548
549 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
550 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
551 }
552
553 pub fn read_line_method_info() -> &'static ::unity::il2cpp::MethodInfo {
554 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
555 }
556}
557
558#[cfg(feature = "system-io-textreader")]
559impl TextReader_NullTextReader {
560 #[doc = "Direct (non-virtual) call to `TextReader_NullTextReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
561 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
562 let __mi = Self::read_method_info();
563 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
564 ::core::mem::transmute(__mi.method_ptr);
565 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
566 }
567
568 #[doc = "Direct (non-virtual) call to `TextReader_NullTextReader`'s own `ReadLine`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
569 pub unsafe fn read_line(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
570 let __mi = Self::read_line_method_info();
571 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
572 __inner(this.into(), ::core::option::Option::None)
573 }
574}
575
576#[cfg(feature = "system-io-textreader")]
577impl TextReader_NullTextReader {
578 #[doc = "`.ctor()` — no args"]
579 pub fn new() -> Self {
580 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
581 panic!(
582 "{}
583::{}
584 failed to instantiate",
585 ::core::stringify!(TextReader_NullTextReader),
586 ::core::stringify!(new),
587 )
588 });
589 <Self as ITextReader_NullTextReaderMethods>::ctor(this);
590 this
591 }
592}
593
594#[cfg(feature = "system-io-textreader")]
595pub trait ITextReader_SyncTextReaderMethods: ITextReader_SyncTextReader {
596 #[doc = "`.ctor(crate::system::io::textreader::TextReader)` overload"]
597 fn ctor(self, t: impl ::core::convert::Into<crate::system::io::textreader::TextReader>) -> () {
598 unsafe {
599 let __receiver =
600 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
601 ::unity::il2cpp_call!((::unity::module_base()+0x3c5a770usize)as*mut u8,();
602(TextReader_SyncTextReader)__receiver,(crate::system::io::textreader::TextReader)::core::convert::Into::into(t))
603 }
604 }
605 #[doc = "`Close()` overload"]
606 fn close(self) -> () {
607 unsafe {
608 let __receiver =
609 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
610 {
611 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
612 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
613 panic!(
614 "unity: virtual slot {}
615 out of range (vtable len {}
616) on the runtime class behind {}
617 (method `{}
618`)",
619 7usize,
620 __vt.len(),
621 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
622 "Close",
623 )
624 });
625 let __inner: extern "C" fn(TextReader_SyncTextReader, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
626 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
627 __inner(__receiver, __mi)
628 }
629 }
630 }
631 #[doc = "`Dispose(bool)` overload"]
632 fn dispose(self, disposing: impl ::core::convert::Into<bool>) -> () {
633 unsafe {
634 let __receiver =
635 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
636 {
637 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
638 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
639 panic!(
640 "unity: virtual slot {}
641 out of range (vtable len {}
642) on the runtime class behind {}
643 (method `{}
644`)",
645 8usize,
646 __vt.len(),
647 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
648 "Dispose",
649 )
650 });
651 let __inner: extern "C" fn(TextReader_SyncTextReader, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
652 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
653 __inner(__receiver, ::core::convert::Into::into(disposing), __mi)
654 }
655 }
656 }
657 #[doc = "`Peek()` overload"]
658 fn peek(self) -> i32 {
659 unsafe {
660 let __receiver =
661 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
662 {
663 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
664 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
665 panic!(
666 "unity: virtual slot {}
667 out of range (vtable len {}
668) on the runtime class behind {}
669 (method `{}
670`)",
671 9usize,
672 __vt.len(),
673 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
674 "Peek",
675 )
676 });
677 let __inner: extern "C" fn(TextReader_SyncTextReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
678 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
679 __inner(__receiver, __mi)
680 }
681 }
682 }
683 #[doc = "`Read()` overload"]
684 fn read(self) -> i32 {
685 unsafe {
686 let __receiver =
687 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
688 {
689 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
690 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
691 panic!(
692 "unity: virtual slot {}
693 out of range (vtable len {}
694) on the runtime class behind {}
695 (method `{}
696`)",
697 10usize,
698 __vt.len(),
699 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
700 "Read",
701 )
702 });
703 let __inner: extern "C" fn(TextReader_SyncTextReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
704 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
705 __inner(__receiver, __mi)
706 }
707 }
708 }
709 #[doc = "`Read(::unity::Array<u16>, i32, i32)` overload"]
710 fn read_2(
711 self,
712 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
713 index: impl ::core::convert::Into<i32>,
714 count: impl ::core::convert::Into<i32>,
715 ) -> i32 {
716 unsafe {
717 let __receiver =
718 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
719 {
720 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
721 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
722 panic!(
723 "unity: virtual slot {}
724 out of range (vtable len {}
725) on the runtime class behind {}
726 (method `{}
727`)",
728 11usize,
729 __vt.len(),
730 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
731 "Read",
732 )
733 });
734 let __inner: extern "C" fn(TextReader_SyncTextReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
735 ::core::mem::transmute(__vi.method_ptr);
736 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
737 __inner(
738 __receiver,
739 ::core::convert::Into::into(buffer),
740 ::core::convert::Into::into(index),
741 ::core::convert::Into::into(count),
742 __mi,
743 )
744 }
745 }
746 }
747 #[doc = "`ReadBlock(::unity::Array<u16>, i32, i32)` overload"]
748 fn read_block(
749 self,
750 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
751 index: impl ::core::convert::Into<i32>,
752 count: impl ::core::convert::Into<i32>,
753 ) -> i32 {
754 unsafe {
755 let __receiver =
756 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
757 {
758 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
759 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
760 panic!(
761 "unity: virtual slot {}
762 out of range (vtable len {}
763) on the runtime class behind {}
764 (method `{}
765`)",
766 13usize,
767 __vt.len(),
768 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
769 "ReadBlock",
770 )
771 });
772 let __inner: extern "C" fn(TextReader_SyncTextReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
773 ::core::mem::transmute(__vi.method_ptr);
774 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
775 __inner(
776 __receiver,
777 ::core::convert::Into::into(buffer),
778 ::core::convert::Into::into(index),
779 ::core::convert::Into::into(count),
780 __mi,
781 )
782 }
783 }
784 }
785 #[doc = "`ReadLine()` overload"]
786 fn read_line(self) -> ::unity::Il2CppString {
787 unsafe {
788 let __receiver =
789 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
790 {
791 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
792 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
793 panic!(
794 "unity: virtual slot {}
795 out of range (vtable len {}
796) on the runtime class behind {}
797 (method `{}
798`)",
799 14usize,
800 __vt.len(),
801 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
802 "ReadLine",
803 )
804 });
805 let __inner: extern "C" fn(TextReader_SyncTextReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
806 ::core::mem::transmute(__vi.method_ptr);
807 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
808 __inner(__receiver, __mi)
809 }
810 }
811 }
812 #[doc = "`ReadToEnd()` overload"]
813 fn read_to_end(self) -> ::unity::Il2CppString {
814 unsafe {
815 let __receiver =
816 <TextReader_SyncTextReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
817 {
818 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
819 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
820 panic!(
821 "unity: virtual slot {}
822 out of range (vtable len {}
823) on the runtime class behind {}
824 (method `{}
825`)",
826 12usize,
827 __vt.len(),
828 <TextReader_SyncTextReader as ::unity::ClassIdentity>::NAME,
829 "ReadToEnd",
830 )
831 });
832 let __inner: extern "C" fn(TextReader_SyncTextReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
833 ::core::mem::transmute(__vi.method_ptr);
834 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
835 __inner(__receiver, __mi)
836 }
837 }
838 }
839}
840
841#[cfg(feature = "system-io-textreader")]
842impl<__T: ITextReader_SyncTextReader> ITextReader_SyncTextReaderMethods for __T {}
843
844#[cfg(feature = "system-io-textreader")]
845impl TextReader_SyncTextReader {
846 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
847 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
848 }
849
850 pub fn close_method_info() -> &'static ::unity::il2cpp::MethodInfo {
851 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
852 }
853
854 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
855 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
856 }
857
858 pub fn peek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
859 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
860 }
861
862 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
863 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
864 }
865
866 pub fn read_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
867 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
868 }
869
870 pub fn read_block_method_info() -> &'static ::unity::il2cpp::MethodInfo {
871 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
872 }
873
874 pub fn read_line_method_info() -> &'static ::unity::il2cpp::MethodInfo {
875 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
876 }
877
878 pub fn read_to_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
879 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
880 }
881}
882
883#[cfg(feature = "system-io-textreader")]
884impl TextReader_SyncTextReader {
885 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `Close`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
886 pub unsafe fn close(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
887 let __mi = Self::close_method_info();
888 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
889 __inner(this.into(), ::core::option::Option::None)
890 }
891
892 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
893 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>, disposing: bool) -> () {
894 let __mi = Self::dispose_method_info();
895 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
896 __inner(this.into(), disposing, ::core::option::Option::None)
897 }
898
899 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `Peek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
900 pub unsafe fn peek(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
901 let __mi = Self::peek_method_info();
902 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
903 __inner(this.into(), ::core::option::Option::None)
904 }
905
906 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
907 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
908 let __mi = Self::read_method_info();
909 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
910 __inner(this.into(), ::core::option::Option::None)
911 }
912
913 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
914 pub unsafe fn read_2(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
915 let __mi = Self::read_2_method_info();
916 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
917 ::core::mem::transmute(__mi.method_ptr);
918 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
919 }
920
921 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `ReadBlock`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
922 pub unsafe fn read_block(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
923 let __mi = Self::read_block_method_info();
924 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
925 ::core::mem::transmute(__mi.method_ptr);
926 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
927 }
928
929 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `ReadLine`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
930 pub unsafe fn read_line(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
931 let __mi = Self::read_line_method_info();
932 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
933 __inner(this.into(), ::core::option::Option::None)
934 }
935
936 #[doc = "Direct (non-virtual) call to `TextReader_SyncTextReader`'s own `ReadToEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
937 pub unsafe fn read_to_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
938 let __mi = Self::read_to_end_method_info();
939 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
940 __inner(this.into(), ::core::option::Option::None)
941 }
942}
943
944#[cfg(feature = "system-io-textreader")]
945impl TextReader_SyncTextReader {
946 #[doc = "`.ctor(crate::system::io::textreader::TextReader)` — overload selector"]
947 pub fn new(t: crate::system::io::textreader::TextReader) -> Self {
948 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
949 panic!(
950 "{}
951::{}
952 failed to instantiate",
953 ::core::stringify!(TextReader_SyncTextReader),
954 ::core::stringify!(new),
955 )
956 });
957 <Self as ITextReader_SyncTextReaderMethods>::ctor(this, t);
958 this
959 }
960}
961
962#[cfg(feature = "system-io-textreader")]
963#[doc(hidden)]
964pub mod prelude {
965 pub use super::{
966 ITextReader, ITextReaderMethods, ITextReader_NullTextReader, ITextReader_NullTextReaderMethods, ITextReader_SyncTextReader,
967 ITextReader_SyncTextReaderMethods, TextReader, TextReader_NullTextReader, TextReader_SyncTextReader,
968 };
969 pub use crate::system::object::IObject;
970 #[cfg(feature = "system-object")]
971 pub use crate::system::object::IObjectMethods;
972}