Force Rich HTML on XML Dump()?
Comments
-
Thanks!
-
Yes - use PanelManager.DisplaySyntaxColoredText.
DisplaySyntaxColoredText(string text, SyntaxLanguageStyle language) enum SyntaxLanguageStyle { None, CSharp, VB, FSharp, SQL, ESQL, CSS, HTML, JavaScript, PowerShell, Python, XAML, XML }
-
Hey, thanks for the prompt response!
But now I realize I didn't explained myself correctly, this what I meant (tried to):this.GetType().Assembly.Dump(); xml.Dump();
-
Try Util.ToExpando()
See: https://www.linqpad.net/CustomizingDump.aspx
Section "Forcing Object Expansion" -
Great, thanks a lot 😊
-
Is it possible to dump the PanelManager.DisplaySyntaxColoredText output into the default "Results" panel instead of separate one? I noticed XDocument dumps into default whereas PanelManager.DisplaySyntaxColoredText always into an ad hoc one. Also XDocument doesn't contain expander whereas PanelManager.DisplaySyntaxColoredText does.
-
Good point - it should offer both options. Try the latest beta:
https://www.linqpad.net/linqpad7.aspx#betaSee What's New notes for info.
-
Works nicely. Thanks.
-
Util.SyntaxColorText(sql, SyntaxLanguageStyle.SQL) emits
div style='font-family:Consolas, monospace; font-size:10pt'>
at the beginning which effectively overrides whatever style is set on parent element. Is this intended? Would be nicer if font family and size, in fact almost everything but color, is inherited.