示例#1
0
        public static void Require <TParameter>(string parameterName, TParameter parameterValue,
                                                Expression <Func <TParameter, bool> > requirementExpression)
        {
            var message = ContractSupport.GetErrorMessageIfFalse(parameterName, parameterValue, requirementExpression);

            MaybeThrowException(message);
        }
示例#2
0
        public static void Require(Expression <Func <bool> > requirementExpression)
        {
            var message = ContractSupport.GetErrorMessageIfFalse(requirementExpression);

            MaybeThrowException(message);
        }