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