Added FisheryLib.Collections.FishTable and Mono.Cecil extension methods

A bit of refactoring has been done too
This commit is contained in:
bbradson
2023-06-03 20:10:58 +02:00
parent 8fa92f15a6
commit cdf209eb02
72 changed files with 8145 additions and 2098 deletions
+1 -9
View File
@@ -20,9 +20,7 @@ public partial class Guard
public static void CanRead(Stream stream, [CallerArgumentExpression("stream")] string name = "")
{
if (stream.CanRead)
{
return;
}
ThrowHelper.ThrowArgumentExceptionForCanRead(stream, name);
}
@@ -37,9 +35,7 @@ public partial class Guard
public static void CanWrite(Stream stream, [CallerArgumentExpression("stream")] string name = "")
{
if (stream.CanWrite)
{
return;
}
ThrowHelper.ThrowArgumentExceptionForCanWrite(stream, name);
}
@@ -54,9 +50,7 @@ public partial class Guard
public static void CanSeek(Stream stream, [CallerArgumentExpression("stream")] string name = "")
{
if (stream.CanSeek)
{
return;
}
ThrowHelper.ThrowArgumentExceptionForCanSeek(stream, name);
}
@@ -71,10 +65,8 @@ public partial class Guard
public static void IsAtStartPosition(Stream stream, [CallerArgumentExpression("stream")] string name = "")
{
if (stream.Position == 0)
{
return;
}
ThrowHelper.ThrowArgumentExceptionForIsAtStartPosition(stream, name);
}
}
}