mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-11-16 17:31:10 +00:00
more clean up
This commit is contained in:
@@ -85,10 +85,7 @@ public class LargeMemoryStream : Stream
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (buffer == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(buffer));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(buffer);
|
||||
|
||||
if (offset < 0 || count < 0 || offset + count > buffer.Length)
|
||||
{
|
||||
@@ -130,10 +127,7 @@ public class LargeMemoryStream : Stream
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (buffer == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(buffer));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(buffer);
|
||||
|
||||
if (offset < 0 || count < 0 || offset + count > buffer.Length)
|
||||
{
|
||||
@@ -292,10 +286,7 @@ public class LargeMemoryStream : Stream
|
||||
|
||||
private void ThrowIfDisposed()
|
||||
{
|
||||
if (_isDisposed)
|
||||
{
|
||||
throw new ObjectDisposedException(GetType().Name);
|
||||
}
|
||||
ObjectDisposedException.ThrowIf(_isDisposed, this);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
|
||||
Reference in New Issue
Block a user