public static TypeParam IsNotOfType(this TypeParam param, Type type)
        {
            if (!Ensure.IsActive)
            {
                return(param);
            }

            if (param.Type == type)
            {
                throw ExceptionFactory.CreateForParamValidation(param, ExceptionMessages.Types_IsNotOfType_Failed.Inject(type.FullName));
            }

            return(param);
        }
        public static TypeParam IsClass(this TypeParam param)
        {
            if (!Ensure.IsActive)
            {
                return(param);
            }

            if (!param.Type.GetTypeInfo().IsClass)
            {
                throw ExceptionFactory.CreateForParamValidation(param,
                                                                ExceptionMessages.Types_IsClass_Failed.Inject(param.Type.FullName));
            }

            return(param);
        }
 public static TypeParam IsString(this TypeParam param) => IsOfType(param, Types.StringType);
 public static TypeParam IsDateTime(this TypeParam param) => IsOfType(param, Types.DateTimeType);
 public static TypeParam IsBool(this TypeParam param) => IsOfType(param, Types.BoolType);
 public static TypeParam IsFloat(this TypeParam param) => IsOfType(param, Types.FloatType);
 public static TypeParam IsDouble(this TypeParam param) => IsOfType(param, Types.DoubleType);
 public static TypeParam IsDecimal(this TypeParam param) => IsOfType(param, Types.DecimalType);
 public static TypeParam IsShort(this TypeParam param) => IsOfType(param, Types.ShortType);
 public static TypeParam IsInt(this TypeParam param) => IsOfType(param, Types.IntType);