diff Implab/Safe.cs @ 161:2a8466f0cb8a v2

DFA refactoring
author cin
date Fri, 19 Feb 2016 18:07:17 +0300
parents 706fccb85524
children a0ff6a0e9c44
line wrap: on
line diff
--- a/Implab/Safe.cs	Thu Feb 18 19:38:54 2016 +0300
+++ b/Implab/Safe.cs	Fri Feb 19 18:07:17 2016 +0300
@@ -9,6 +9,11 @@
 {
     public static class Safe
     {
+        public static void ArgumentAssert(bool condition, string paramName) {
+            if (!condition)
+                throw new ArgumentException("The parameter is invalid", paramName);
+        }
+
         public static void ArgumentMatch(string value, string paramName, Regex rx) {
             if (rx == null)
                 throw new ArgumentNullException("rx");