1#[cfg(feature = "system-io-streamreader-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 io::textreader::{ITextReader, TextReader},
10 object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/streamreader/StreamReader_NullStreamReader.md"))]
14 #[::unity::class(namespace = "System.IO", name = "StreamReader.NullStreamReader")]
15 #[parent(crate::system::io::streamreader::StreamReader)]
16 pub struct StreamReader_NullStreamReader {}
17
18 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/streamreader/StreamReader.md"))]
19 #[::unity::class(namespace = "System.IO", name = "StreamReader")]
20 #[parent(crate::system::io::textreader::TextReader)]
21 pub struct StreamReader {
22 #[static_field]
23 #[rename(name = "Null")]
24 pub null: crate::system::io::streamreader::StreamReader,
25 #[offset(24)]
26 #[rename(name = "stream")]
27 pub stream: crate::system::io::stream::Stream,
28 #[offset(48)]
29 #[rename(name = "byteBuffer")]
30 pub byte_buffer: ::unity::Array<u8>,
31 #[offset(56)]
32 #[rename(name = "charBuffer")]
33 pub char_buffer: ::unity::Array<u16>,
34 #[offset(64)]
35 #[rename(name = "_preamble")]
36 pub preamble: ::unity::Array<u8>,
37 #[offset(72)]
38 #[rename(name = "charPos")]
39 pub char_pos: i32,
40 #[offset(76)]
41 #[rename(name = "charLen")]
42 pub char_len: i32,
43 #[offset(80)]
44 #[rename(name = "byteLen")]
45 pub byte_len: i32,
46 #[offset(84)]
47 #[rename(name = "bytePos")]
48 pub byte_pos: i32,
49 #[offset(88)]
50 #[rename(name = "_maxCharsPerBuffer")]
51 pub max_chars_per_buffer: i32,
52 #[offset(92)]
53 #[rename(name = "_detectEncoding")]
54 pub detect_encoding_field: bool,
55 #[offset(93)]
56 #[rename(name = "_checkPreamble")]
57 pub check_preamble: bool,
58 #[offset(94)]
59 #[rename(name = "_isBlocked")]
60 pub is_blocked: bool,
61 #[offset(95)]
62 #[rename(name = "_closable")]
63 pub closable: bool,
64 }
65}
66
67#[cfg(feature = "system-io-streamreader-types")]
68pub use __types::*;
69
70#[cfg(feature = "system-io-streamreader")]
71pub trait IStreamReader_NullStreamReaderMethods: IStreamReader_NullStreamReader {
72 #[doc = "`.ctor()` overload"]
73 fn ctor(self) -> () {
74 unsafe {
75 let __receiver =
76 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
77 ::unity::il2cpp_call!((::unity::module_base()+0x3c59120usize)as*mut u8,();
78(StreamReader_NullStreamReader)__receiver)
79 }
80 }
81 #[doc = "`get_BaseStream()` overload"]
82 fn get_base_stream(self) -> crate::system::io::stream::Stream {
83 unsafe {
84 let __receiver =
85 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86 {
87 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
88 let __vi = *__vt.get(16usize).unwrap_or_else(|| {
89 panic!(
90 "unity: virtual slot {}
91 out of range (vtable len {}
92) on the runtime class behind {}
93 (method `{}
94`)",
95 16usize,
96 __vt.len(),
97 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
98 "get_BaseStream",
99 )
100 });
101 let __inner: extern "C" fn(StreamReader_NullStreamReader, ::unity::OptionalMethod) -> crate::system::io::stream::Stream =
102 ::core::mem::transmute(__vi.method_ptr);
103 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
104 __inner(__receiver, __mi)
105 }
106 }
107 }
108 #[doc = "`Dispose(bool)` overload"]
109 fn dispose(self, disposing: impl ::core::convert::Into<bool>) -> () {
110 unsafe {
111 let __receiver =
112 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
113 {
114 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
115 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
116 panic!(
117 "unity: virtual slot {}
118 out of range (vtable len {}
119) on the runtime class behind {}
120 (method `{}
121`)",
122 8usize,
123 __vt.len(),
124 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
125 "Dispose",
126 )
127 });
128 let __inner: extern "C" fn(StreamReader_NullStreamReader, bool, ::unity::OptionalMethod) -> () =
129 ::core::mem::transmute(__vi.method_ptr);
130 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
131 __inner(__receiver, ::core::convert::Into::into(disposing), __mi)
132 }
133 }
134 }
135 #[doc = "`Peek()` overload"]
136 fn peek(self) -> i32 {
137 unsafe {
138 let __receiver =
139 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 {
141 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
142 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
143 panic!(
144 "unity: virtual slot {}
145 out of range (vtable len {}
146) on the runtime class behind {}
147 (method `{}
148`)",
149 9usize,
150 __vt.len(),
151 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
152 "Peek",
153 )
154 });
155 let __inner: extern "C" fn(StreamReader_NullStreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
156 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
157 __inner(__receiver, __mi)
158 }
159 }
160 }
161 #[doc = "`Read()` overload"]
162 fn read(self) -> i32 {
163 unsafe {
164 let __receiver =
165 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
166 {
167 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
168 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
169 panic!(
170 "unity: virtual slot {}
171 out of range (vtable len {}
172) on the runtime class behind {}
173 (method `{}
174`)",
175 10usize,
176 __vt.len(),
177 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
178 "Read",
179 )
180 });
181 let __inner: extern "C" fn(StreamReader_NullStreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
182 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
183 __inner(__receiver, __mi)
184 }
185 }
186 }
187 #[doc = "`Read(::unity::Array<u16>, i32, i32)` overload"]
188 fn read_2(
189 self,
190 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
191 index: impl ::core::convert::Into<i32>,
192 count: impl ::core::convert::Into<i32>,
193 ) -> i32 {
194 unsafe {
195 let __receiver =
196 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
197 {
198 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
199 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
200 panic!(
201 "unity: virtual slot {}
202 out of range (vtable len {}
203) on the runtime class behind {}
204 (method `{}
205`)",
206 11usize,
207 __vt.len(),
208 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
209 "Read",
210 )
211 });
212 let __inner: extern "C" fn(StreamReader_NullStreamReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
213 ::core::mem::transmute(__vi.method_ptr);
214 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
215 __inner(
216 __receiver,
217 ::core::convert::Into::into(buffer),
218 ::core::convert::Into::into(index),
219 ::core::convert::Into::into(count),
220 __mi,
221 )
222 }
223 }
224 }
225 #[doc = "`ReadLine()` overload"]
226 fn read_line(self) -> ::unity::Il2CppString {
227 unsafe {
228 let __receiver =
229 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
230 {
231 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
232 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
233 panic!(
234 "unity: virtual slot {}
235 out of range (vtable len {}
236) on the runtime class behind {}
237 (method `{}
238`)",
239 14usize,
240 __vt.len(),
241 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
242 "ReadLine",
243 )
244 });
245 let __inner: extern "C" fn(StreamReader_NullStreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
246 ::core::mem::transmute(__vi.method_ptr);
247 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
248 __inner(__receiver, __mi)
249 }
250 }
251 }
252 #[doc = "`ReadToEnd()` overload"]
253 fn read_to_end(self) -> ::unity::Il2CppString {
254 unsafe {
255 let __receiver =
256 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
257 {
258 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
259 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
260 panic!(
261 "unity: virtual slot {}
262 out of range (vtable len {}
263) on the runtime class behind {}
264 (method `{}
265`)",
266 12usize,
267 __vt.len(),
268 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
269 "ReadToEnd",
270 )
271 });
272 let __inner: extern "C" fn(StreamReader_NullStreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
273 ::core::mem::transmute(__vi.method_ptr);
274 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
275 __inner(__receiver, __mi)
276 }
277 }
278 }
279 #[doc = "`ReadBuffer()` overload"]
280 fn read_buffer(self) -> i32 {
281 unsafe {
282 let __receiver =
283 <StreamReader_NullStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
284 {
285 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
286 let __vi = *__vt.get(17usize).unwrap_or_else(|| {
287 panic!(
288 "unity: virtual slot {}
289 out of range (vtable len {}
290) on the runtime class behind {}
291 (method `{}
292`)",
293 17usize,
294 __vt.len(),
295 <StreamReader_NullStreamReader as ::unity::ClassIdentity>::NAME,
296 "ReadBuffer",
297 )
298 });
299 let __inner: extern "C" fn(StreamReader_NullStreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
300 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
301 __inner(__receiver, __mi)
302 }
303 }
304 }
305}
306
307#[cfg(feature = "system-io-streamreader")]
308impl<__T: IStreamReader_NullStreamReader> IStreamReader_NullStreamReaderMethods for __T {}
309
310#[cfg(feature = "system-io-streamreader")]
311impl StreamReader_NullStreamReader {
312 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
313 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
314 }
315
316 pub fn get_base_stream_method_info() -> &'static ::unity::il2cpp::MethodInfo {
317 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
318 }
319
320 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
321 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
322 }
323
324 pub fn peek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
325 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
326 }
327
328 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
329 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
330 }
331
332 pub fn read_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
333 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
334 }
335
336 pub fn read_line_method_info() -> &'static ::unity::il2cpp::MethodInfo {
337 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
338 }
339
340 pub fn read_to_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
341 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
342 }
343
344 pub fn read_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
345 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
346 }
347}
348
349#[cfg(feature = "system-io-streamreader")]
350impl StreamReader_NullStreamReader {
351 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `get_BaseStream`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
352 pub unsafe fn get_base_stream(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::io::stream::Stream {
353 let __mi = Self::get_base_stream_method_info();
354 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::io::stream::Stream =
355 ::core::mem::transmute(__mi.method_ptr);
356 __inner(this.into(), ::core::option::Option::None)
357 }
358
359 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
360 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>, disposing: bool) -> () {
361 let __mi = Self::dispose_method_info();
362 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
363 __inner(this.into(), disposing, ::core::option::Option::None)
364 }
365
366 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `Peek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
367 pub unsafe fn peek(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
368 let __mi = Self::peek_method_info();
369 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
370 __inner(this.into(), ::core::option::Option::None)
371 }
372
373 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
374 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
375 let __mi = Self::read_method_info();
376 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
377 __inner(this.into(), ::core::option::Option::None)
378 }
379
380 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
381 pub unsafe fn read_2(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
382 let __mi = Self::read_2_method_info();
383 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
384 ::core::mem::transmute(__mi.method_ptr);
385 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
386 }
387
388 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `ReadLine`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
389 pub unsafe fn read_line(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
390 let __mi = Self::read_line_method_info();
391 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
392 __inner(this.into(), ::core::option::Option::None)
393 }
394
395 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `ReadToEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
396 pub unsafe fn read_to_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
397 let __mi = Self::read_to_end_method_info();
398 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
399 __inner(this.into(), ::core::option::Option::None)
400 }
401
402 #[doc = "Direct (non-virtual) call to `StreamReader_NullStreamReader`'s own `ReadBuffer`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
403 pub unsafe fn read_buffer(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
404 let __mi = Self::read_buffer_method_info();
405 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
406 __inner(this.into(), ::core::option::Option::None)
407 }
408}
409
410#[cfg(feature = "system-io-streamreader")]
411impl StreamReader_NullStreamReader {
412 #[doc = "`.ctor()` — no args"]
413 pub fn new() -> Self {
414 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
415 panic!(
416 "{}
417::{}
418 failed to instantiate",
419 ::core::stringify!(StreamReader_NullStreamReader),
420 ::core::stringify!(new),
421 )
422 });
423 <Self as IStreamReader_NullStreamReaderMethods>::ctor(this);
424 this
425 }
426}
427
428#[cfg(feature = "system-io-streamreader")]
429impl StreamReader {
430 #[doc = "`get_DefaultBufferSize()` overload"]
431 pub fn get_default_buffer_size() -> i32 {
432 unsafe {
433 ::unity::il2cpp_call!((::unity::module_base()+0x377c060usize)as*mut u8,i32;
434 )
435 }
436 }
437
438 #[doc = "`.cctor()` overload"]
439 pub fn cctor() -> () {
440 unsafe {
441 ::unity::il2cpp_call!((::unity::module_base()+0x377dd40usize)as*mut u8,();
442 )
443 }
444 }
445}
446
447#[cfg(feature = "system-io-streamreader")]
448pub trait IStreamReaderMethods: IStreamReader {
449 #[doc = "`CheckAsyncTaskInProgress()` overload"]
450 fn check_async_task_in_progress(self) -> () {
451 unsafe {
452 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
453 ::unity::il2cpp_call!((::unity::module_base()+0x377c070usize)as*mut u8,();
454(StreamReader)__receiver)
455 }
456 }
457 #[doc = "`.ctor()` overload"]
458 fn ctor(self) -> () {
459 unsafe {
460 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
461 ::unity::il2cpp_call!((::unity::module_base()+0x377c100usize)as*mut u8,();
462(StreamReader)__receiver)
463 }
464 }
465 #[doc = "`.ctor(crate::system::io::stream::Stream)` overload"]
466 fn ctor_2(self, stream: impl ::core::convert::Into<crate::system::io::stream::Stream>) -> () {
467 unsafe {
468 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
469 ::unity::il2cpp_call!((::unity::module_base()+0x377c170usize)as*mut u8,();
470(StreamReader)__receiver,(crate::system::io::stream::Stream)::core::convert::Into::into(stream))
471 }
472 }
473 #[doc = "`.ctor(crate::system::io::stream::Stream, bool)` overload"]
474 fn ctor_3(
475 self,
476 stream: impl ::core::convert::Into<crate::system::io::stream::Stream>,
477 detect_encoding_from_byte_order_marks: impl ::core::convert::Into<bool>,
478 ) -> () {
479 unsafe {
480 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
481 ::unity::il2cpp_call!((::unity::module_base()+0x377c200usize)as*mut u8,();
482(StreamReader)__receiver,(crate::system::io::stream::Stream)::core::convert::Into::into(stream),(bool)::core::convert::Into::into(detect_encoding_from_byte_order_marks))
483 }
484 }
485 #[doc = "`.ctor(::unity::Il2CppString)` overload"]
486 fn ctor_4(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
487 unsafe {
488 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
489 ::unity::il2cpp_call!((::unity::module_base()+0x377c700usize)as*mut u8,();
490(StreamReader)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path))
491 }
492 }
493 #[doc = "`.ctor(::unity::Il2CppString, bool)` overload"]
494 fn ctor_5(
495 self,
496 path: impl ::core::convert::Into<::unity::Il2CppString>,
497 detect_encoding_from_byte_order_marks: impl ::core::convert::Into<bool>,
498 ) -> () {
499 unsafe {
500 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
501 ::unity::il2cpp_call!((::unity::module_base()+0x377c790usize)as*mut u8,();
502(StreamReader)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path),(bool)::core::convert::Into::into(detect_encoding_from_byte_order_marks))
503 }
504 }
505 #[doc = "`Init(crate::system::io::stream::Stream)` overload"]
506 fn init(self, stream: impl ::core::convert::Into<crate::system::io::stream::Stream>) -> () {
507 unsafe {
508 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
509 ::unity::il2cpp_call!((::unity::module_base()+0x377cb10usize)as*mut u8,();
510(StreamReader)__receiver,(crate::system::io::stream::Stream)::core::convert::Into::into(stream))
511 }
512 }
513 #[doc = "`Close()` overload"]
514 fn close(self) -> () {
515 unsafe {
516 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
517 {
518 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
519 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
520 panic!(
521 "unity: virtual slot {}
522 out of range (vtable len {}
523) on the runtime class behind {}
524 (method `{}
525`)",
526 7usize,
527 __vt.len(),
528 <StreamReader as ::unity::ClassIdentity>::NAME,
529 "Close",
530 )
531 });
532 let __inner: extern "C" fn(StreamReader, ::unity::OptionalMethod) -> () = ::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 #[doc = "`Dispose(bool)` overload"]
539 fn dispose(self, disposing: impl ::core::convert::Into<bool>) -> () {
540 unsafe {
541 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
542 {
543 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
544 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
545 panic!(
546 "unity: virtual slot {}
547 out of range (vtable len {}
548) on the runtime class behind {}
549 (method `{}
550`)",
551 8usize,
552 __vt.len(),
553 <StreamReader as ::unity::ClassIdentity>::NAME,
554 "Dispose",
555 )
556 });
557 let __inner: extern "C" fn(StreamReader, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
558 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
559 __inner(__receiver, ::core::convert::Into::into(disposing), __mi)
560 }
561 }
562 }
563 #[doc = "`get_BaseStream()` overload"]
564 fn get_base_stream(self) -> crate::system::io::stream::Stream {
565 unsafe {
566 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
567 {
568 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
569 let __vi = *__vt.get(16usize).unwrap_or_else(|| {
570 panic!(
571 "unity: virtual slot {}
572 out of range (vtable len {}
573) on the runtime class behind {}
574 (method `{}
575`)",
576 16usize,
577 __vt.len(),
578 <StreamReader as ::unity::ClassIdentity>::NAME,
579 "get_BaseStream",
580 )
581 });
582 let __inner: extern "C" fn(StreamReader, ::unity::OptionalMethod) -> crate::system::io::stream::Stream =
583 ::core::mem::transmute(__vi.method_ptr);
584 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
585 __inner(__receiver, __mi)
586 }
587 }
588 }
589 #[doc = "`get_LeaveOpen()` overload"]
590 fn get_leave_open(self) -> bool {
591 unsafe {
592 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
593 ::unity::il2cpp_call!((::unity::module_base()+0x377cc90usize)as*mut u8,bool;
594(StreamReader)__receiver)
595 }
596 }
597 #[doc = "`get_EndOfStream()` overload"]
598 fn get_end_of_stream(self) -> bool {
599 unsafe {
600 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
601 ::unity::il2cpp_call!((::unity::module_base()+0x377ccc0usize)as*mut u8,bool;
602(StreamReader)__receiver)
603 }
604 }
605 #[doc = "`Peek()` overload"]
606 fn peek(self) -> i32 {
607 unsafe {
608 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
609 {
610 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
611 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
612 panic!(
613 "unity: virtual slot {}
614 out of range (vtable len {}
615) on the runtime class behind {}
616 (method `{}
617`)",
618 9usize,
619 __vt.len(),
620 <StreamReader as ::unity::ClassIdentity>::NAME,
621 "Peek",
622 )
623 });
624 let __inner: extern "C" fn(StreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
625 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
626 __inner(__receiver, __mi)
627 }
628 }
629 }
630 #[doc = "`DataAvailable()` overload"]
631 fn data_available(self) -> bool {
632 unsafe {
633 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
634 ::unity::il2cpp_call!((::unity::module_base()+0x377cdd0usize)as*mut u8,bool;
635(StreamReader)__receiver)
636 }
637 }
638 #[doc = "`Read()` overload"]
639 fn read(self) -> i32 {
640 unsafe {
641 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
642 {
643 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
644 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
645 panic!(
646 "unity: virtual slot {}
647 out of range (vtable len {}
648) on the runtime class behind {}
649 (method `{}
650`)",
651 10usize,
652 __vt.len(),
653 <StreamReader as ::unity::ClassIdentity>::NAME,
654 "Read",
655 )
656 });
657 let __inner: extern "C" fn(StreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
658 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
659 __inner(__receiver, __mi)
660 }
661 }
662 }
663 #[doc = "`Read(::unity::Array<u16>, i32, i32)` overload"]
664 fn read_2(
665 self,
666 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
667 index: impl ::core::convert::Into<i32>,
668 count: impl ::core::convert::Into<i32>,
669 ) -> i32 {
670 unsafe {
671 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
672 {
673 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
674 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
675 panic!(
676 "unity: virtual slot {}
677 out of range (vtable len {}
678) on the runtime class behind {}
679 (method `{}
680`)",
681 11usize,
682 __vt.len(),
683 <StreamReader as ::unity::ClassIdentity>::NAME,
684 "Read",
685 )
686 });
687 let __inner: extern "C" fn(StreamReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
688 ::core::mem::transmute(__vi.method_ptr);
689 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
690 __inner(
691 __receiver,
692 ::core::convert::Into::into(buffer),
693 ::core::convert::Into::into(index),
694 ::core::convert::Into::into(count),
695 __mi,
696 )
697 }
698 }
699 }
700 #[doc = "`ReadToEnd()` overload"]
701 fn read_to_end(self) -> ::unity::Il2CppString {
702 unsafe {
703 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
704 {
705 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
706 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
707 panic!(
708 "unity: virtual slot {}
709 out of range (vtable len {}
710) on the runtime class behind {}
711 (method `{}
712`)",
713 12usize,
714 __vt.len(),
715 <StreamReader as ::unity::ClassIdentity>::NAME,
716 "ReadToEnd",
717 )
718 });
719 let __inner: extern "C" fn(StreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
720 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
721 __inner(__receiver, __mi)
722 }
723 }
724 }
725 #[doc = "`ReadBlock(::unity::Array<u16>, i32, i32)` overload"]
726 fn read_block(
727 self,
728 buffer: impl ::core::convert::Into<::unity::Array<u16>>,
729 index: impl ::core::convert::Into<i32>,
730 count: impl ::core::convert::Into<i32>,
731 ) -> i32 {
732 unsafe {
733 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
734 {
735 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
736 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
737 panic!(
738 "unity: virtual slot {}
739 out of range (vtable len {}
740) on the runtime class behind {}
741 (method `{}
742`)",
743 13usize,
744 __vt.len(),
745 <StreamReader as ::unity::ClassIdentity>::NAME,
746 "ReadBlock",
747 )
748 });
749 let __inner: extern "C" fn(StreamReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
750 ::core::mem::transmute(__vi.method_ptr);
751 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
752 __inner(
753 __receiver,
754 ::core::convert::Into::into(buffer),
755 ::core::convert::Into::into(index),
756 ::core::convert::Into::into(count),
757 __mi,
758 )
759 }
760 }
761 }
762 #[doc = "`CompressBuffer(i32)` overload"]
763 fn compress_buffer(self, n: impl ::core::convert::Into<i32>) -> () {
764 unsafe {
765 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
766 ::unity::il2cpp_call!((::unity::module_base()+0x377d520usize)as*mut u8,();
767(StreamReader)__receiver,(i32)::core::convert::Into::into(n))
768 }
769 }
770 #[doc = "`DetectEncoding()` overload"]
771 fn detect_encoding(self) -> () {
772 unsafe {
773 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
774 ::unity::il2cpp_call!((::unity::module_base()+0x377d570usize)as*mut u8,();
775(StreamReader)__receiver)
776 }
777 }
778 #[doc = "`IsPreamble()` overload"]
779 fn is_preamble(self) -> bool {
780 unsafe {
781 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
782 ::unity::il2cpp_call!((::unity::module_base()+0x377d8a0usize)as*mut u8,bool;
783(StreamReader)__receiver)
784 }
785 }
786 #[doc = "`ReadBuffer()` overload"]
787 fn read_buffer(self) -> i32 {
788 unsafe {
789 let __receiver = <StreamReader 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(17usize).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 17usize,
800 __vt.len(),
801 <StreamReader as ::unity::ClassIdentity>::NAME,
802 "ReadBuffer",
803 )
804 });
805 let __inner: extern "C" fn(StreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
806 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
807 __inner(__receiver, __mi)
808 }
809 }
810 }
811 #[doc = "`ReadBuffer(::unity::Array<u16>, i32, i32, *mutbool)` overload"]
812 fn read_buffer_2(
813 self,
814 user_buffer: impl ::core::convert::Into<::unity::Array<u16>>,
815 user_offset: impl ::core::convert::Into<i32>,
816 desired_chars: impl ::core::convert::Into<i32>,
817 ) -> (i32, bool) {
818 unsafe {
819 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
820 let mut __out_0 = ::core::mem::MaybeUninit::<bool>::uninit();
821 let __ret = {
822 ::unity::il2cpp_call!((::unity::module_base()+0x377d0c0usize)as*mut u8,i32;
823(StreamReader)__receiver,(::unity::Array<u16>)::core::convert::Into::into(user_buffer),(i32)::core::convert::Into::into(user_offset),(i32)::core::convert::Into::into(desired_chars),(*mut bool)__out_0.as_mut_ptr())
824 };
825 (__ret, __out_0.assume_init())
826 }
827 }
828 #[doc = "`ReadLine()` overload"]
829 fn read_line(self) -> ::unity::Il2CppString {
830 unsafe {
831 let __receiver = <StreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
832 {
833 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
834 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
835 panic!(
836 "unity: virtual slot {}
837 out of range (vtable len {}
838) on the runtime class behind {}
839 (method `{}
840`)",
841 14usize,
842 __vt.len(),
843 <StreamReader as ::unity::ClassIdentity>::NAME,
844 "ReadLine",
845 )
846 });
847 let __inner: extern "C" fn(StreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
848 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
849 __inner(__receiver, __mi)
850 }
851 }
852 }
853}
854
855#[cfg(feature = "system-io-streamreader")]
856impl<__T: IStreamReader> IStreamReaderMethods for __T {}
857
858#[cfg(feature = "system-io-streamreader")]
859impl StreamReader {
860 pub fn get_default_buffer_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
861 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
862 }
863
864 pub fn check_async_task_in_progress_method_info() -> &'static ::unity::il2cpp::MethodInfo {
865 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
866 }
867
868 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
869 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
870 }
871
872 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
873 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
874 }
875
876 pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
877 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
878 }
879
880 pub fn ctor_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
881 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
882 }
883
884 pub fn ctor_5_method_info() -> &'static ::unity::il2cpp::MethodInfo {
885 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
886 }
887
888 pub fn init_method_info() -> &'static ::unity::il2cpp::MethodInfo {
889 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
890 }
891
892 pub fn close_method_info() -> &'static ::unity::il2cpp::MethodInfo {
893 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
894 }
895
896 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
897 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
898 }
899
900 pub fn get_base_stream_method_info() -> &'static ::unity::il2cpp::MethodInfo {
901 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
902 }
903
904 pub fn get_leave_open_method_info() -> &'static ::unity::il2cpp::MethodInfo {
905 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
906 }
907
908 pub fn get_end_of_stream_method_info() -> &'static ::unity::il2cpp::MethodInfo {
909 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
910 }
911
912 pub fn peek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
913 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
914 }
915
916 pub fn data_available_method_info() -> &'static ::unity::il2cpp::MethodInfo {
917 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
918 }
919
920 pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
921 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
922 }
923
924 pub fn read_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
925 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
926 }
927
928 pub fn read_to_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
929 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
930 }
931
932 pub fn read_block_method_info() -> &'static ::unity::il2cpp::MethodInfo {
933 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
934 }
935
936 pub fn compress_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
937 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
938 }
939
940 pub fn detect_encoding_method_info() -> &'static ::unity::il2cpp::MethodInfo {
941 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
942 }
943
944 pub fn is_preamble_method_info() -> &'static ::unity::il2cpp::MethodInfo {
945 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[29]
946 }
947
948 pub fn read_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
949 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[30]
950 }
951
952 pub fn read_buffer_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
953 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[31]
954 }
955
956 pub fn read_line_method_info() -> &'static ::unity::il2cpp::MethodInfo {
957 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[32]
958 }
959
960 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
961 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[33]
962 }
963}
964
965#[cfg(feature = "system-io-streamreader")]
966impl StreamReader {
967 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `Close`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
968 pub unsafe fn close(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
969 let __mi = Self::close_method_info();
970 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
971 __inner(this.into(), ::core::option::Option::None)
972 }
973
974 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
975 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>, disposing: bool) -> () {
976 let __mi = Self::dispose_method_info();
977 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
978 __inner(this.into(), disposing, ::core::option::Option::None)
979 }
980
981 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `get_BaseStream`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
982 pub unsafe fn get_base_stream(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::io::stream::Stream {
983 let __mi = Self::get_base_stream_method_info();
984 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::io::stream::Stream =
985 ::core::mem::transmute(__mi.method_ptr);
986 __inner(this.into(), ::core::option::Option::None)
987 }
988
989 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `Peek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
990 pub unsafe fn peek(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
991 let __mi = Self::peek_method_info();
992 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
993 __inner(this.into(), ::core::option::Option::None)
994 }
995
996 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
997 pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
998 let __mi = Self::read_method_info();
999 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
1000 __inner(this.into(), ::core::option::Option::None)
1001 }
1002
1003 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
1004 pub unsafe fn read_2(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
1005 let __mi = Self::read_2_method_info();
1006 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
1007 ::core::mem::transmute(__mi.method_ptr);
1008 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
1009 }
1010
1011 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `ReadToEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
1012 pub unsafe fn read_to_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
1013 let __mi = Self::read_to_end_method_info();
1014 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
1015 __inner(this.into(), ::core::option::Option::None)
1016 }
1017
1018 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `ReadBlock`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
1019 pub unsafe fn read_block(this: impl ::core::convert::Into<::unity::IlInstance>, buffer: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
1020 let __mi = Self::read_block_method_info();
1021 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
1022 ::core::mem::transmute(__mi.method_ptr);
1023 __inner(this.into(), buffer, index, count, ::core::option::Option::None)
1024 }
1025
1026 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `ReadBuffer`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
1027 pub unsafe fn read_buffer(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
1028 let __mi = Self::read_buffer_method_info();
1029 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
1030 __inner(this.into(), ::core::option::Option::None)
1031 }
1032
1033 #[doc = "Direct (non-virtual) call to `StreamReader`'s own `ReadLine`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
1034 pub unsafe fn read_line(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
1035 let __mi = Self::read_line_method_info();
1036 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
1037 __inner(this.into(), ::core::option::Option::None)
1038 }
1039}
1040
1041#[cfg(feature = "system-io-streamreader")]
1042impl StreamReader {
1043 #[doc = "`.ctor()` — no args"]
1044 pub fn new() -> Self {
1045 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1046 panic!(
1047 "{}
1048::{}
1049 failed to instantiate",
1050 ::core::stringify!(StreamReader),
1051 ::core::stringify!(new),
1052 )
1053 });
1054 <Self as IStreamReaderMethods>::ctor(this);
1055 this
1056 }
1057
1058 #[doc = "`.ctor(crate::system::io::stream::Stream)` — overload selector"]
1059 pub fn new_2(stream: crate::system::io::stream::Stream) -> Self {
1060 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1061 panic!(
1062 "{}
1063::{}
1064 failed to instantiate",
1065 ::core::stringify!(StreamReader),
1066 ::core::stringify!(new_2),
1067 )
1068 });
1069 <Self as IStreamReaderMethods>::ctor_2(this, stream);
1070 this
1071 }
1072
1073 #[doc = "`.ctor(crate::system::io::stream::Stream, bool)` — overload selector"]
1074 pub fn new_3(stream: crate::system::io::stream::Stream, detect_encoding_from_byte_order_marks: bool) -> Self {
1075 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1076 panic!(
1077 "{}
1078::{}
1079 failed to instantiate",
1080 ::core::stringify!(StreamReader),
1081 ::core::stringify!(new_3),
1082 )
1083 });
1084 <Self as IStreamReaderMethods>::ctor_3(this, stream, detect_encoding_from_byte_order_marks);
1085 this
1086 }
1087
1088 #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
1089 pub fn new_4(path: ::unity::Il2CppString) -> Self {
1090 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1091 panic!(
1092 "{}
1093::{}
1094 failed to instantiate",
1095 ::core::stringify!(StreamReader),
1096 ::core::stringify!(new_4),
1097 )
1098 });
1099 <Self as IStreamReaderMethods>::ctor_4(this, path);
1100 this
1101 }
1102
1103 #[doc = "`.ctor(::unity::Il2CppString, bool)` — overload selector"]
1104 pub fn new_5(path: ::unity::Il2CppString, detect_encoding_from_byte_order_marks: bool) -> Self {
1105 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1106 panic!(
1107 "{}
1108::{}
1109 failed to instantiate",
1110 ::core::stringify!(StreamReader),
1111 ::core::stringify!(new_5),
1112 )
1113 });
1114 <Self as IStreamReaderMethods>::ctor_5(this, path, detect_encoding_from_byte_order_marks);
1115 this
1116 }
1117}
1118
1119#[cfg(feature = "system-io-streamreader")]
1120#[doc(hidden)]
1121pub mod prelude {
1122 pub use super::{
1123 IStreamReader, IStreamReaderMethods, IStreamReader_NullStreamReader, IStreamReader_NullStreamReaderMethods, StreamReader,
1124 StreamReader_NullStreamReader,
1125 };
1126 #[cfg(feature = "system-io-textreader")]
1127 pub use crate::system::io::textreader::ITextReaderMethods;
1128 #[cfg(feature = "system-object")]
1129 pub use crate::system::object::IObjectMethods;
1130 pub use crate::system::{io::textreader::ITextReader, object::IObject};
1131}