Skip to main content

engage/generated/system/io/
memorystream.rs

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