public static void Require <TParameter>(string parameterName, TParameter parameterValue, Expression <Func <TParameter, bool> > requirementExpression) { var message = ContractSupport.GetErrorMessageIfFalse(parameterName, parameterValue, requirementExpression); MaybeThrowException(message); }
public static void Require(Expression <Func <bool> > requirementExpression) { var message = ContractSupport.GetErrorMessageIfFalse(requirementExpression); MaybeThrowException(message); }