public static void HasItems <T>(this Param <IList <T> > param)
        {
            if (!Ensure.IsActive)
            {
                return;
            }

            param.IsNotNull();

            if (param.Value.Count < 1)
            {
                throw ExceptionFactory.CreateForParamValidation(param, ExceptionMessages.Collections_HasItemsFailed);
            }
        }
        public static void Any <T>(this Param <T[]> param, Func <T, bool> predicate)
        {
            if (!Ensure.IsActive)
            {
                return;
            }

            param.IsNotNull();

            if (!param.Value.Any(predicate))
            {
                throw ExceptionFactory.CreateForParamValidation(param, ExceptionMessages.Collections_Any_Failed);
            }
        }
        public static void SizeIs <TKey, TValue>(this Param <IDictionary <TKey, TValue> > param, long expected)
        {
            if (!Ensure.IsActive)
            {
                return;
            }

            param.IsNotNull();

            if (param.Value.Count != expected)
            {
                throw ExceptionFactory.CreateForParamValidation(param, ExceptionMessages.Collections_SizeIs_Failed.Inject(expected, param.Value.Count));
            }
        }
        public static void ContainsKey <TKey, TValue>(this Param <Dictionary <TKey, TValue> > param, TKey key)
        {
            if (!Ensure.IsActive)
            {
                return;
            }

            param.IsNotNull();

            if (!param.Value.ContainsKey(key))
            {
                throw ExceptionFactory.CreateForParamValidation(param, ExceptionMessages.Collections_ContainsKey_Failed.Inject(key));
            }
        }
        public static void SizeIs <T>(this Param <T> param, int expected) where T : ICollection
        {
            if (!Ensure.IsActive)
            {
                return;
            }

            param.IsNotNull();

            if (param.Value.Count != expected)
            {
                throw ExceptionFactory.CreateForParamValidation(param, ExceptionMessages.Collections_SizeIs_Failed.Inject(expected, param.Value.Count));
            }
        }