示例#1
0
 public static void ThrowExceptionWhenIsNotValidIdentifier(Expression <Func <object> > paramExpression)
 {
     Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression);
     Validators.ThrowExceptionWhenIsNotValidIdentifier(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string);
 }
示例#2
0
 public static void ThrowExceptionWhenIsNotHexString(Expression <Func <object> > paramExpression)
 {
     Validators.ThrowExceptionWhenIsNull((Expression <Func <object> >)(() => paramExpression));
     Validators.ThrowExceptionWhenIsNotHexString(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string);
 }
示例#3
0
 public static void ThrowExceptionWhenIsNullOrWhiteSpace(Expression <Func <object> > paramExpression)
 {
     Validators.EnsureValidParamExpression(paramExpression);
     Validators.ThrowExceptionWhenIsNullOrWhiteSpace(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string);
 }
示例#4
0
 public static void ThrowExceptionWhenIsTooLong(Expression <Func <object> > paramExpression, int maxLength)
 {
     Validators.ThrowExceptionWhenIsNull((Expression <Func <object> >)(() => paramExpression));
     Validators.ThrowExceptionWhenIsNegativeOrZero((Expression <Func <object> >)(() => (object)maxLength));
     Validators.ThrowExceptionWhenIsTooLong(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string, maxLength);
 }
示例#5
0
 public static void ThrowExceptionWhenIsNotEquals(Expression <Func <object> > paramExpression, object expectedValue)
 {
     Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression);
     Validators.ThrowExceptionWhenIsNotEquals(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression), expectedValue);
 }
示例#6
0
 public static void ThrowExceptionWhenIsNegativeOrZero(Expression <Func <object> > paramExpression)
 {
     Validators.EnsureValidParamExpression(paramExpression);
     Validators.ThrowExceptionWhenIsNegativeOrZero(Validators.GetParamName(paramExpression), (int)Validators.GetParamValue(paramExpression));
 }
示例#7
0
 public static void ThrowExceptionWhenIsNegative(Expression <Func <object> > paramExpression)
 {
     Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression);
     Validators.ThrowExceptionWhenIsNegative(Validators.GetParamName(paramExpression), (int)Validators.GetParamValue(paramExpression));
 }
示例#8
0
 public static void ThrowExceptionWhenNotInEnum(Expression <Func <object> > paramExpression, Type enumType)
 {
     Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression);
     Validators.ThrowExceptionWhenNotInEnum(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression), enumType);
 }