private static string GetRuleConditionsHtml(XElement rule)
        {
            Assert.ArgumentNotNull(rule, "rule");
            HtmlTextWriter htmlTextWriter = new HtmlTextWriter(new StringWriter());
            RulesRenderer  rulesRenderer  = new RulesRenderer(string.Concat("<ruleset>", rule, "</ruleset>"))
            {
                // SkipActions = true    // SECOND CHANGE
            };

            rulesRenderer.Render(htmlTextWriter);
            return(htmlTextWriter.InnerWriter.ToString());
        }
Пример #2
0
        private static string GetRuleConditionsHtml(string rule)
        {
            Assert.ArgumentNotNull(rule, "rule");
            var output    = new HtmlTextWriter(new StringWriter());
            var renderer2 = new RulesRenderer(rule)
            {
                SkipActions   = true,
                AllowMultiple = false
            };

            renderer2.Render(output);
            return(output.InnerWriter.ToString());
        }
Пример #3
0
        protected string GetRuleConditionsHtml([NotNull] XElement rule)
        {
            Assert.ArgumentNotNull(rule, "rule");

            var output = new HtmlTextWriter(new StringWriter(CultureInfo.CurrentCulture));
            var rules  = new RulesRenderer("<ruleset>" + rule + "</ruleset>")
            {
                SkipActions = true,
                IsEditable  = false
            };

            rules.Render(output);
            return(output.InnerWriter.ToString());
        }
 private static string GetRuleDescription(Item item)
 {
     var stringOutput = new StringWriter();
     var output = new HtmlTextWriter(stringOutput);
     var renderer2 = new RulesRenderer(item.Fields["Rule"].Value);
     renderer2.Render(output);
     return stringOutput.ToString();
 }
Пример #5
0
 private static string GetRuleConditionsHtml(string rule)
 {
     Assert.ArgumentNotNull(rule, "rule");
     HtmlTextWriter output = new HtmlTextWriter(new StringWriter());
     RulesRenderer renderer2 = new RulesRenderer(rule)
     {
         SkipActions = true,
         AllowMultiple = false
     };
     renderer2.Render(output);
     return output.InnerWriter.ToString();
 }