Update MemoryStreamReader.cs

pull/1/head
unknown 6 years ago
parent e1827fde6e
commit 3584465844

@ -13,7 +13,7 @@ namespace ZeroLevel.Services.Serialization
public sealed class MemoryStreamReader
: IBinaryReader
{
private readonly MemoryStream _stream;
private readonly Stream _stream;
public MemoryStreamReader(byte[] data)
{
@ -22,6 +22,13 @@ namespace ZeroLevel.Services.Serialization
_stream = new MemoryStream(data);
}
public MemoryStreamReader(Stream stream)
{
if (stream == null)
throw new ArgumentNullException(nameof(stream));
_stream = stream;
}
/// <summary>
/// Flag reading
/// </summary>

Loading…
Cancel
Save

Powered by TurnKey Linux.