BUG: can't hook up toDump extension method with F# program

per https://www.linqpad.net/CustomizingDump.aspx
I should be able to make it customize the dump of a `Newtonsoft.Json.Linq.JProperty`

However, no matter what I try, (trying not to use MyExtensions since it is C# only) it won't hook up


produces just the value, not the name and value, nor do any of the print statements get hit.


  • The global ToDump hook is only valid in My Extensions, not individual queries.

    I've taken a look at whether it would easy to allow My Extensions to be written in F#, but unfortunately, there's a fair bit of work involved. So the only option right now is to write the ToDump in C#.
  • I was under the impression that you could use C# extension methods to customize dump behavior in individual queries, is that not the case? One of my attempts above should be seen by C# as toDump extension methods on object.
  • Any word on this possibility? Are all the ToDump hooks, available to F#, only available per type, with no ability to hook in or inject?
    type Newtonsoft.Json.Linq.JProperty with
        member x.ToDump() = x.Name
        member x.toDump() = x.Name
    is something like this possible?
  • edited December 2018
    Can we please have a way to hook/override type-specific (for types we aren't creating) (or global) dumping in linqpad for F#?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!