# HG changeset patch # User cin # Date 1413118234 -14400 # Node ID efcb076407a741fa7a2a77905d0b90696a5601e4 # Parent ce0171cacec4901ab67b30524551fea7a4f0cf8c code cleanup diff -r ce0171cacec4 -r efcb076407a7 Implab/Safe.cs --- a/Implab/Safe.cs Wed Oct 08 02:19:45 2014 +0400 +++ b/Implab/Safe.cs Sun Oct 12 16:50:34 2014 +0400 @@ -13,12 +13,17 @@ if (rx == null) throw new ArgumentNullException("rx"); if (!rx.IsMatch(param)) - throw new ArgumentException(String.Format("A prameter value must match {0}", rx), name); + throw new ArgumentException(String.Format("The prameter value must match {0}", rx), name); } public static void ArgumentNotEmpty(string param, string name) { if (String.IsNullOrEmpty(param)) - throw new ArgumentException("A parameter can't be empty", name); + throw new ArgumentException("The parameter can't be empty", name); + } + + public static void ArgumentNotEmpty(T[] param, string name) { + if (param == null || param.Length == 0) + throw new ArgumentException("The array must be not emty"); } public static void ArgumentNotNull(object param, string name) {