more clean up

This commit is contained in:
Adam Hathcock
2026-02-16 10:58:01 +00:00
parent 17776d0659
commit eca7bcb515
71 changed files with 284 additions and 345 deletions

View File

@@ -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)