diff --git a/src/SixLabors.Core/Helpers/DebugGuard.cs b/src/SixLabors.Core/Helpers/DebugGuard.cs index f41d7eacfb..210b13c998 100644 --- a/src/SixLabors.Core/Helpers/DebugGuard.cs +++ b/src/SixLabors.Core/Helpers/DebugGuard.cs @@ -24,7 +24,7 @@ namespace SixLabors public static void NotNull(T target, string parameterName) where T : class { - if (target == null) + if (target is null) { throw new ArgumentNullException(parameterName); } @@ -115,50 +115,7 @@ namespace SixLabors throw new ArgumentOutOfRangeException(parameterName, $"Value must be greater than or equal to {min}."); } } - - /// - /// Verifies, that the method parameter with specified target value is true - /// and throws an exception if it is found to be so. - /// - /// - /// The target value, which cannot be false. - /// - /// - /// The name of the parameter that is to be checked. - /// - /// - /// The error message, if any to add to the exception. - /// - /// - /// is false - /// - [Conditional("DEBUG")] - public static void IsTrue(bool target, string parameterName, string message) - { - if (!target) - { - throw new ArgumentException(message, parameterName); - } - } - - /// - /// Verifies, that the method parameter with specified target value is false - /// and throws an exception if it is found to be so. - /// - /// The target value, which cannot be true. - /// The name of the parameter that is to be checked. - /// The error message, if any to add to the exception. - /// - /// is true - /// - [Conditional("DEBUG")] - public static void IsFalse(bool target, string parameterName, string message) - { - if (target) - { - throw new ArgumentException(message, parameterName); - } - } + /// /// Verifies, that the `target` array has declared the length or longer.