public static TypeParam IsOfType(this TypeParam param, Type type)
        {
            if (!param.Type.Equals(type))
            {
                throw ExceptionFactory.CreateForParamValidation(param,
                                                                ExceptionMessages.EnsureExtensions_IsNotOfType.Inject(param.Type.FullName));
            }

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