Added FisheryLib.Collections.FishTable and Mono.Cecil extension methods
A bit of refactoring has been done too
This commit is contained in:
@@ -19,9 +19,8 @@ public partial class Guard
|
||||
/// <remarks>This method is needed because <see cref="Span{T}"/> can't be used as a generic type parameter.</remarks>
|
||||
[DoesNotReturn]
|
||||
public static void ThrowArgumentExceptionForIsNotEmptyWithSpan<T>(string name)
|
||||
{
|
||||
throw new ArgumentException($"Parameter {AssertString(name)} ({typeof(Span<T>).ToTypeString()}) must not be empty.", name);
|
||||
}
|
||||
=> throw new ArgumentException(
|
||||
$"Parameter {AssertString(name)} ({typeof(Span<T>).ToTypeString()}) must not be empty.", name);
|
||||
|
||||
/// <summary>
|
||||
/// Throws an <see cref="ArgumentException"/> when <see cref="IsNotEmpty{T}(ReadOnlySpan{T},string)"/> fails.
|
||||
@@ -30,9 +29,8 @@ public partial class Guard
|
||||
/// <remarks>This method is needed because <see cref="ReadOnlySpan{T}"/> can't be used as a generic type parameter.</remarks>
|
||||
[DoesNotReturn]
|
||||
public static void ThrowArgumentExceptionForIsNotEmptyWithReadOnlySpan<T>(string name)
|
||||
{
|
||||
throw new ArgumentException($"Parameter {AssertString(name)} ({typeof(ReadOnlySpan<T>).ToTypeString()}) must not be empty.", name);
|
||||
}
|
||||
=> throw new ArgumentException(
|
||||
$"Parameter {AssertString(name)} ({typeof(ReadOnlySpan<T>).ToTypeString()}) must not be empty.", name);
|
||||
|
||||
/// <summary>
|
||||
/// Throws an <see cref="ArgumentException"/> when <see cref="IsNotEmpty{T}(T[],string)"/> (or an overload) fails.
|
||||
@@ -40,8 +38,7 @@ public partial class Guard
|
||||
/// <typeparam name="T">The item of items in the input collection.</typeparam>
|
||||
[DoesNotReturn]
|
||||
public static void ThrowArgumentExceptionForIsNotEmpty<T>(string name)
|
||||
{
|
||||
throw new ArgumentException($"Parameter {AssertString(name)} ({typeof(T).ToTypeString()}) must not be empty.", name);
|
||||
}
|
||||
=> throw new ArgumentException(
|
||||
$"Parameter {AssertString(name)} ({typeof(T).ToTypeString()}) must not be empty.", name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user