Esempio n. 1
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);
 }
Esempio n. 2
0
 public static void ThrowExceptionWhenIsNegativeOrZero(Expression <Func <object> > paramExpression)
 {
     Validators.EnsureValidParamExpression(paramExpression);
     Validators.ThrowExceptionWhenIsNegativeOrZero(Validators.GetParamName(paramExpression), (int)Validators.GetParamValue(paramExpression));
 }