How to customize Dump for basic types?
It seems that static ToDump customization is only called for complex types. It is not invoked for basic types like strings, int, etc. Is there a way to customize string output?
Here's my reason for wanting to do this. Part of my code is emitting strings with ascii color codes. Linqpad doesn't properly visualize them (btw would you consider adding that as a feature?). But as a workaround I wanted to customize Dump for strings to rewrite ascii color codes as html coloring tags. But it doesn't seem to be possible to override that atm.
Comments
Run as
C# Program
. See also LINQPad help (Ctrl
+F1
) forToDump
and related samples.Glorious! Thanks!!!
You can also implement
ToDump
as a class method, look forCustomizing Dump
in LINQPad samples.