예제 #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);
 }