예제 #1
0
        public static TypeParam IsOfType(this TypeParam param, Type type)
        {
            if (!param.Type.Equals(type))
            {
                throw ExceptionFactory.CreateForParamValidation(param,
                                                                Properties.Ensure.Ensure_IsNotOfType.Inject(param.Type.FullName));
            }

            return(param);
        }
예제 #2
0
 public static TypeParam IsString(this TypeParam param)
 {
     return(IsOfType(param, Types.StringType));
 }
예제 #3
0
 public static TypeParam IsBool(this TypeParam param)
 {
     return(IsOfType(param, Types.BoolType));
 }
예제 #4
0
 public static TypeParam IsDateTime(this TypeParam param)
 {
     return(IsOfType(param, Types.DateTimeType));
 }
예제 #5
0
 public static TypeParam IsFloat(this TypeParam param)
 {
     return(IsOfType(param, Types.FloatType));
 }
예제 #6
0
 public static TypeParam IsDouble(this TypeParam param)
 {
     return(IsOfType(param, Types.DoubleType));
 }
예제 #7
0
 public static TypeParam IsDecimal(this TypeParam param)
 {
     return(IsOfType(param, Types.DecimalType));
 }
예제 #8
0
 public static TypeParam IsShort(this TypeParam param)
 {
     return(IsOfType(param, Types.ShortType));
 }
예제 #9
0
 public static TypeParam IsInt(this TypeParam param)
 {
     return(IsOfType(param, Types.IntType));
 }