Beispiel #1
0
        public override string ToString()
        {
            var tag = new CollapsibleTag(_id, _title);
            tag.AppendContent(_content().ToString());

            return tag.ToString();
        }
        public override string ToString()
        {
            var tag = new CollapsibleTag(_id, _title);

            tag.AppendContent(_content().ToString());

            return(tag.ToString());
        }
        public HtmlTag VisualizePartial(ModelBindingLog log)
        {
            var title = "Model Binding for " + log.Report.ModelType.FullName;

            var collapsible = new CollapsibleTag(log.Id.ToString(), title);

            var description = Description.For(log.Report.Binder);

            collapsible.AppendContent(new HtmlTag("div").AddClass("model-binder-title").Text("Used " + description.Title));

            if (log.Report.OrderedProperties().Any())
            {
                var report = new ModelBindingHtmlReport();
                log.Report.AcceptVisitor(report);
                collapsible.AppendContent(report.Table);
            }
            else
            {
                var tag = new DescriptionBodyTag(description);
                collapsible.AppendContent(tag);
            }

            return collapsible;
        }