From 16aa3cf86a9b8be30526a6974c9d09e15205be9e Mon Sep 17 00:00:00 2001 From: Jason Nelson Date: Fri, 24 Aug 2018 12:03:38 -0700 Subject: [PATCH] [SL.Core] Remove unused DebugGuard methods --- src/SixLabors.Core/Helpers/DebugGuard.cs | 47 +----------------------- 1 file changed, 2 insertions(+), 45 deletions(-) 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.