示例#1
0
        public void Dump(object o, string description, int depth)
        {
            if (xhtmlDumper == null)
            {
                stringBuilder = new StringBuilder();
                stringWriter  = new StringWriter(stringBuilder);
                var renderers = IoC.GetAllInstances(typeof(IXhtmlRenderer)).Cast <IXhtmlRenderer>().ToList();
                //add the basic rederer at the end
                renderers.Add(new BasicXhtmlRenderer());
                xhtmlDumper = new XhtmlDumper.XhtmlDumper(stringWriter);
            }

            xhtmlDumper.WriteObject(o, description, depth);
            text = stringBuilder.ToString();
            //append the closing HTML closing tags to the string
            text += Environment.NewLine + "</body></html>";

            NotifyOfPropertyChange(() => Text);
        }
示例#2
0
        public void Dump(object o, string description, int depth)
        {
            if (xhtmlDumper == null)
            {
                stringBuilder = new StringBuilder();
                stringWriter = new StringWriter(stringBuilder);
                var renderers = IoC.GetAllInstances(typeof(IXhtmlRenderer)).Cast<IXhtmlRenderer>().ToList();
                //add the basic rederer at the end
                renderers.Add(new BasicXhtmlRenderer());
                xhtmlDumper = new XhtmlDumper.XhtmlDumper(stringWriter);
            }

            xhtmlDumper.WriteObject(o, description, depth);
            text = stringBuilder.ToString();
            //append the closing HTML closing tags to the string
            text += Environment.NewLine + "</body></html>";

            NotifyOfPropertyChange(()=>Text);
        }