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")); }
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>"); }
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>"); }