Esempio n. 1
0
 private static HtmlAttributes Attributes(
     this HtmlAttributes attributes,
     SiteSettings ss,
     Aggregation aggregation,
     Column groupBy, string key)
 {
     return(groupBy != null
         ? attributes
            .Class("data" + (groupBy != null
                 ? " link"
                 : string.Empty))
            .DataSelector(Selector(ss, aggregation.GroupBy))
            .DataValue(DataValue(groupBy, key))
         : attributes
            .Class("data"));
 }
Esempio n. 2
0
        public void HtmlAttributes_mixed_with_indexer_args_can_be_used_for_attributes()
        {
            var attr = new HtmlAttributes();

            string output = section[attr.Class("info"), style : "color:red"]("some content").ToString();

            output.Should().Be("<section class=\"info\" style=\"color:red\">some content</section>");
        }
Esempio n. 3
0
        public void HtmlAttributes_can_be_used_for_attributes()
        {
            var attr = new HtmlAttributes();

            string output = section[attr.Class("info")]("some content").ToString();

            output.Should()
            .Be("<section class=\"info\">some content</section>");
        }