mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 17:28:00 +02:00
Allow passing in memory list
This commit is contained in:
parent
9879f64b4a
commit
7e75a24807
1 changed files with 11 additions and 1 deletions
|
@ -4,7 +4,7 @@ namespace System.IO
|
|||
{
|
||||
class MemoryStream : Stream
|
||||
{
|
||||
List<uint8> mMemory = new List<uint8>() ~ delete _;
|
||||
List<uint8> mMemory ~ delete _;
|
||||
int mPosition = 0;
|
||||
|
||||
public override int64 Position
|
||||
|
@ -44,6 +44,16 @@ namespace System.IO
|
|||
}
|
||||
}
|
||||
|
||||
public this()
|
||||
{
|
||||
mMemory = new List<uint8>();
|
||||
}
|
||||
|
||||
public this(List<uint8> memory)
|
||||
{
|
||||
mMemory = memory;
|
||||
}
|
||||
|
||||
public override Result<int> TryRead(Span<uint8> data)
|
||||
{
|
||||
let count = data.Length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue