public static void ThrowExceptionWhenIsNotValidIdentifier(Expression <Func <object> > paramExpression) { Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression); Validators.ThrowExceptionWhenIsNotValidIdentifier(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string); }
public static void ThrowExceptionWhenIsNotHexString(Expression <Func <object> > paramExpression) { Validators.ThrowExceptionWhenIsNull((Expression <Func <object> >)(() => paramExpression)); Validators.ThrowExceptionWhenIsNotHexString(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string); }
public static void ThrowExceptionWhenIsNullOrWhiteSpace(Expression <Func <object> > paramExpression) { Validators.EnsureValidParamExpression(paramExpression); Validators.ThrowExceptionWhenIsNullOrWhiteSpace(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string); }
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 ThrowExceptionWhenIsNotEquals(Expression <Func <object> > paramExpression, object expectedValue) { Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression); Validators.ThrowExceptionWhenIsNotEquals(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression), expectedValue); }
public static void ThrowExceptionWhenIsNegativeOrZero(Expression <Func <object> > paramExpression) { Validators.EnsureValidParamExpression(paramExpression); Validators.ThrowExceptionWhenIsNegativeOrZero(Validators.GetParamName(paramExpression), (int)Validators.GetParamValue(paramExpression)); }
public static void ThrowExceptionWhenIsNegative(Expression <Func <object> > paramExpression) { Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression); Validators.ThrowExceptionWhenIsNegative(Validators.GetParamName(paramExpression), (int)Validators.GetParamValue(paramExpression)); }
public static void ThrowExceptionWhenNotInEnum(Expression <Func <object> > paramExpression, Type enumType) { Validators.ThrowExceptionWhenIsNull("paramExpression", (object)paramExpression); Validators.ThrowExceptionWhenNotInEnum(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression), enumType); }