Beispiel #1
0
        protected override string DescribeImpliesRule(ImpliesRule <T> rule)
        {
            var leftDescription = Describe(rule.Left);

            if (NeedsParenthesis(rule, rule.Left))
            {
                leftDescription = string.Format("({0})", leftDescription);
            }

            var rightDescription = Describe(rule.Right);

            if (NeedsParenthesis(rule, rule.Right))
            {
                rightDescription = string.Format("({0})", rightDescription);
            }

            return(string.Format("{0} IMPLIES {1}", leftDescription, rightDescription));
        }
        protected override string DescribeImpliesRule(ImpliesRule <T> rule)
        {
            var result          = DescribeResult(rule.IsTrueFor(evaluateWith));
            var leftDescription = Describe(rule.Left);

            if (NeedsParenthesis(rule, rule.Left))
            {
                leftDescription = string.Format("({0})", leftDescription);
            }

            var rightDescription = Describe(rule.Right);

            if (NeedsParenthesis(rule, rule.Right))
            {
                rightDescription = string.Format("({0})", rightDescription);
            }

            return(string.Format("{0} IMPLIES[{2}] {1}", leftDescription, rightDescription, result));
        }
Beispiel #3
0
        protected override string DescribeImpliesRule(ImpliesRule <T> rule)
        {
            var result = DescribeResult(rule.IsTrueFor(evaluateWith));

            return(string.Format("({0} IMPLIES {1})[{2}]", Describe(rule.Left), Describe(rule.Right), result));
        }
 protected abstract string DescribeImpliesRule(ImpliesRule <T> rule);
 protected override string DescribeImpliesRule(ImpliesRule <T> rule)
 {
     return(string.Format("({0} IMPLIES {1})", Describe(rule.Left), Describe(rule.Right)));
 }